jimmckeeth / FireMonkey-Android-Voice

Speech Recognition and Text to Speech for Android with FireMonkey (written in Object Pascal and Delphi XE6)
http://delphi.org/2014/07/android-voice/
38 stars 15 forks source link

Delphi 10.2 Tokyo (How-To make work for this version) #1

Open War3Evo opened 7 years ago

War3Evo commented 7 years ago

I haven't programmed Delphi since 2010, and this is the way I have gotten this to work for Delphi 10.2 Tokyo

To get speech to work: (Using this method to create the other components too)

  1. Create a package
  2. add JNIBridge\Androidapi.JNI.TTS.pas
  3. add AndroidTTS.pas
  4. requires fmx.dcu (remove all other requirements)

    Make sure you have both windows and android target environments (Make sure windows is the active environment)

  5. Save the project as 'AndroidTTS_Speech_Package'
  6. Right click on the name 'AndroidTTS_Speech_Package.bpl' and choose build
  7. Right click on the name 'AndroidTTS_Speech_Package.bpl' and choose install

This should install the component.

When you put this component into your FMX android application form, you'll need to have both sources added to your project. So...

  1. add JNIBridge\Androidapi.JNI.TTS.pas
  2. add AndroidTTS.pas

After you add those sources to your project, you can then call 'AndroidTTS1.Speak('Hello');'

I haven't figured out how to make the component work any other way... Anyone have clues on how to make it work without having to also add the sources to your project?

sdzccs commented 4 years ago

delphi 10.3 error

sdzccs commented 4 years ago

Android TTS_ Speech in rad 10.3 has a conflict

War3Evo commented 4 years ago

Build as a windows 32 target, and install.

Then when you get to your project target Android and then you can run it on your android device.

If you try to build targeting Android, you will get many errors!

War3Evo commented 4 years ago

Here is a picture of my package before I install it as components.

AndroidTTS_Speech_Package_bpl

Also add this to your project library path (or where ever you stored it) \android-object-pascal-wrapper\android-25 you can find it here: https://github.com/FMXExpress/android-object-pascal-wrapper .... I'm using Delphi 10.4.1 and it targets android 25, so I'm using that one. Depending on your android version and what it targets is what you should use for your project.

michelinok commented 3 years ago

do someone got it working with 10.3 ?