Text to Speech

Text to Speech

by Spiral Code Studio

View and activate on the Corona Store

The Text-To-Speech plugin enables your applications on Android and iOS to speak various text in various languages. You can control pitch, rate and volume.

Documentation

I am running the GM build of El Capitan. I am using Version 2015.2646 (2015.5.27) of Corona.

(I realize this may be fallout of running this OS and not a daily build, but thought I’d ask before installing new versions!)

It’s likely me, but when I run the sample project listed with the plugin, it is failing.

I get this error: Corona Simulator[75118:4998891] WARNING: The ‘plugin.texttospeech’ library is not available on this platform.

I did run another project (not TTS related on Corona and it ran OK on this version). 

Is there a OS check on the plugin?

The plugin is only implemented on iOS and Android. There’s no support for OS X or Windows. I am not sure if Lerg plans to add it.

OK, I think maybe I didn’t think it all the way through, while I am running it in the simulator for IOS (Not MacOS), I assume the sound would only work on device, so I’ll run it there and see how it handles it.

I guess I would have expected a ‘Is not supported in the simulator’ message like some of the other functionality we run into.

Thanks

The plugin is designed only for iOS and Android. It is, however, possible to implement it for both OS X and Windows, but that’s not on my TODO list anytime soon.

Hello,
I’m trying out the sample version from github and I keep getting this error:

?:0: attempt to index global ‘network’ (a nil value)
stack traceback:
?:in function ‘downloadManifest’
?”in function ‘downloadQueuedManifests’
?:in function
?:in main chunk

Do you have an idea of whats going on?

It would be great to make a speech to text

Do you have a list of languages that this plugin supports? In particular, are Spanish and Japanese included? I’ve attempted the following but hear no audio. I suspect the japanese locale might not be the correct one for this lib but I can’t find a list of valid locales in the docs.

local texttospeech = require('plugin.texttospeech') local options = { language = 'ja\_JP', } texttospeech.speak('こんにちわ 世界', options)  

Cheers!

No, maybe try a different daily build?

‘ja_JP’ is incorrect, try ‘ja-JP’

List for iOS:
 

Arabic (Saudi Arabia) - ar-SA Chinese (China) - zh-CN Chinese (Hong Kong SAR China) - zh-HK Chinese (Taiwan) - zh-TW Czech (Czech Republic) - cs-CZ Danish (Denmark) - da-DK Dutch (Belgium) - nl-BE Dutch (Netherlands) - nl-NL English (Australia) - en-AU English (Ireland) - en-IE English (South Africa) - en-ZA English (United Kingdom) - en-GB English (United States) - en-US Finnish (Finland) - fi-FI French (Canada) - fr-CA French (France) - fr-FR German (Germany) - de-DE Greek (Greece) - el-GR Hebrew (Israel) - he-IL Hindi (India) - hi-IN Hungarian (Hungary) - hu-HU Indonesian (Indonesia) - id-ID Italian (Italy) - it-IT Japanese (Japan) - ja-JP Korean (South Korea) - ko-KR Norwegian (Norway) - no-NO Polish (Poland) - pl-PL Portuguese (Brazil) - pt-BR Portuguese (Portugal) - pt-PT Romanian (Romania) - ro-RO Russian (Russia) - ru-RU Slovak (Slovakia) - sk-SK Spanish (Mexico) - es-MX Spanish (Spain) - es-ES Swedish (Sweden) - sv-SE Thai (Thailand) - th-TH Turkish (Turkey) - tr-TR

Not sure about android. Most probably lists overlap to a great extend.

Thank you, it works perfectly now. 

By the way, I’ve been writing an educational app on the side, whose main feature was having text-to-speech (which I was doing with the iSpeech SDK). Since I couldn’t do it in Corona I was doing it in Objective-C. Now that you’ve made this available I can rewrite it in Corona and will be able to publish it for Android too. Many thanks for that!

Great to hear that! Honestly, I didn’t expect that this plugin will be so demanded.

That’s possible, I’ll put it on my long waiting list (won’t be made anytime soon).

Yes it is. Most of my clients want now Accesibility and TTS support in apps so thank you very much. As far as I get paid for first one app I just finish I will make some donation by PayPal :slight_smile:

Best regards
Greg

Does this plugin require active internet connection ?

Also can the text be any language, for instance say English text but speech is Spanish?

Dave

No it doesn’t require internet connection because it’s use internal system feature. And yes, it’s possible but it will read English words in Spanish with Spanish accent. Sometimes it’s quite funny but mostly useless :slight_smile: For supported languages you have to check Apple iOS ang Android documentation for TTS.

Great plugin!!! What about changing gender? Is that possible yet?

Thanks! No, changing gender is not possible on iOS and not possible on Android for most languages. So overall - no.

Here you go:  https://en.wikipedia.org/wiki/Sex_reassignment_surgery   :smiley:

Har d har har