Text to Speech

https://www.theverge.com/2019/6/3/18650906/siri-new-voice-ios-13-iphone-homepod-neutral-text-to-speech-technology-natural-wwdc-2019

Hi Lerg,

New Siri is coming to iOS 13. Any news if current versions of Siri will be accessible to developers?

Ben

Hi Lerg,

06-08 13:06:35.471 26071 27886 I Corona  :     “es-es-x-ana-local”:“es-ES”,
06-08 13:06:35.471 26071 27886 I Corona  :     “id-id-x-dfz-network”:"

When executing getLanguagesAndVoices, i notice the last line is always truncated. Happens on both android and ios. From the example above, it’s missing the locale. Not sure if this is the last line in the query.

Ben

Hi Ben, it’s too soon to tell about voices, we should wait for the final release.
The truncation happens in the print statement, not in the actual data. Corona started to truncate long print statements.
I should replace json.prettify() with a for loop in the sample someday…

Hi Lerg,

I just install iPadOS 13 Beta on my iPad Air 2 today. When I launched my app, there was no TTS playback at all.

I ran getLanguagesAndVoices and this is the result from Console:

Languages and voices: { "languages":[], "name":"getLanguagesAndVoices", "voices":{ "default":"" }, "isError":false }

Then, I opened the Settings app > Accessibility > VoiceOver > Speech > Voice, and I saw the window refreshed with text “Loading Voices…”

I think there is a bug here. Nothing happens after mins. If you reload the Voice window, you’ll now see a list of English voices. Apple made some changes here. If you go back, you’ll see a setting that is turned on “Detect Languages”. Voices are now displayed based on your current device language.

I relaunched my app and TTS playback resumed to work. At this point, if I run getLanguagesAndVoices, i can see the list of voices in iOS normally.

So, coming back to my initial point, why wasn’t there any TTS playback when I ran my app immediately after iOS upgrade? Did I trigger a process when I navigated to the voice list window? What happens if users don’t do this, will iOS do this in the background?

Ben

Hi Ben,

When iPad OS comes out I will make sure the plugin works as expected, before that it’s most likely a bug in the beta.

Hi Lerg,

Does TTS plugin work in Android 4.3 to 4.4.4? I can’t seem to be able to get it to work.

Ben

09-05 02:22:25.007  2020  2244 V Corona  : > Class.forName: plugin.texttospeech.LuaLoader
09-05 02:22:25.007  2020  2244 I dalvikvm: Could not find method android.speech.tts.TextToSpeech.getAvailableLanguages, referenced from method plugin.texttospeech.LuaLoader.getLanguagesAndVoices
09-05 02:22:25.007  2020  2244 W dalvikvm: VFY: unable to resolve virtual method 1045: Landroid/speech/tts/TextToSpeech;.getAvailableLanguages ()Ljava/util/Set;
09-05 02:22:25.007  2020  2244 D dalvikvm: VFY: replacing opcode 0x6e at 0x001d
09-05 02:22:25.017  2020  2244 E dalvikvm: Could not find class ‘android.speech.tts.Voice’, referenced from method plugin.texttospeech.LuaLoader.getLanguagesAndVoices
09-05 02:22:25.017  2020  2244 W dalvikvm: VFY: unable to resolve check-cast 275 (Landroid/speech/tts/Voice;) in Lplugin/texttospeech/LuaLoader;
09-05 02:22:25.017  2020  2244 D dalvikvm: VFY: replacing opcode 0x1f at 0x0086
09-05 02:22:25.017  2020  2244 I dalvikvm: Could not find method android.speech.tts.TextToSpeech.getVoices, referenced from method plugin.texttospeech.LuaLoader.speak
09-05 02:22:25.017  2020  2244 W dalvikvm: VFY: unable to resolve virtual method 1049: Landroid/speech/tts/TextToSpeech;.getVoices ()Ljava/util/Set;
09-05 02:22:25.017  2020  2244 D dalvikvm: VFY: replacing opcode 0x6e at 0x0198
09-05 02:22:25.017  2020  2244 E dalvikvm: Could not find class ‘android.speech.tts.Voice’, referenced from method plugin.texttospeech.LuaLoader.speak
09-05 02:22:25.017  2020  2244 W dalvikvm: VFY: unable to resolve check-cast 275 (Landroid/speech/tts/Voice;) in Lplugin/texttospeech/LuaLoader;
09-05 02:22:25.017  2020  2244 D dalvikvm: VFY: replacing opcode 0x1f at 0x01b5
09-05 02:22:25.017  2020  2244 I dalvikvm: Could not find method android.speech.tts.TextToSpeech.synthesizeToFile, referenced from method plugin.texttospeech.LuaLoader.speak
09-05 02:22:25.017  2020  2244 W dalvikvm: VFY: unable to resolve virtual method 1060: Landroid/speech/tts/TextToSpeech;.synthesizeToFile (Ljava/lang/CharSequence;Landroid/os/Bundle;Ljava/io/File;Ljava/lang/String;)I
09-05 02:22:25.017  2020  2244 D dalvikvm: VFY: replacing opcode 0x6e at 0x01e9
09-05 02:22:25.017  2020  2244 I dalvikvm: Could not find method android.speech.tts.TextToSpeech.speak, referenced from method plugin.texttospeech.LuaLoader.speak
09-05 02:22:25.017  2020  2244 W dalvikvm: VFY: unable to resolve virtual method 1057: Landroid/speech/tts/TextToSpeech;.speak (Ljava/lang/CharSequence;ILandroid/os/Bundle;Ljava/lang/String;)I
09-05 02:22:25.017  2020  2244 D dalvikvm: VFY: replacing opcode 0x6e at 0x01f2

gamebit.labs, some features require android 5.0, seems that I forgot to specify which ones.

Is this plugin still supported? I can’t get it to work when trying to build to iOS.

Hi @Lerg, can you please look?
I’ve got your sample, filled in the email and token, and here goes “mach-o, but wrong architecture”.
Is it all about my M1 MacBook, or what?

Error loading module 'plugin_texttospeech' from file '/Users/max/Library/Application Support/Corona/Simulator/Plugins/plugin_texttospeech.dylib':

dlopen(/Users/max/Library/Application Support/Corona/Simulator/Plugins/plugin_texttospeech.dylib, 2): no suitable image found. Did find:

/Users/max/Library/Application Support/Corona/Simulator/Plugins/plugin_texttospeech.dylib: mach-o, but wrong architecture

/Users/max/Library/Application Support/Corona/Simulator/Plugins/plugin_texttospeech.dylib: mach-o, but wrong architecture

File: error loading module 'plugin_texttospeech' from file '/Users/max/Library/Application Support/Corona/Simulator/Plugins/plugin_texttospeech.dylib'

Native plugins has to be rebuilt for m1. To do that one just needs to rebuild the plugin with Xcode 12+. I did it for all first party plugins except openssl already.

1 Like

You can run the Corona Simulator in the x86 compatibility mode for now until I update the plugin.

1 Like

Thanks Vlad, keep up the good job.

Thanks for your rapid reply.
It will be difficult, but I will try.
Just in case: how long will it take?

BTW: Your work is awesome, looking forward for the updates.

Hey @Lerg, any good news about the updates?

Will do it this weekend!

I’ve updated the plugins. Please try now.

Seems like it’s ok for now, the test project compiled in no time. Thanks for your help, will tell my little daughter that she’s free to run her own projects with those updates. She’s almost 16 and her passion is pretty much overwhelming :slight_smile:

1 Like

How to purchase a one-time license? I used this years ago and want to use it again. Just for the plug-in, no subscription please.

Not needed. I use this to announce numbers (1-99) and I can do the same with *wav files freely available.

Hey,
I have a question related to this TTS:
So I’ve been using this text to speech tool from Wavel.
How does your Mexican Spanish tutorial stack, with voices like “Hilda” and “Miguel,” distinguish itself from Wavel’s Text to Speech plugin by Spiral Code Studio?