Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Text to Speech
Started by Michael W. Sep 15 2015 02:43 PM

316 replies to this topic
release android ios
[TOPIC CONTROLS]
Page 1 of 13 1 2 3 »
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

Michael W.

[GLOBAL: userInfoPane.html]
Michael W.
  • Contributor

  • 276 posts
  • Alumni

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

[TOPIC: post.html]
#2

graham07

[GLOBAL: userInfoPane.html]
graham07
  • Contributor

  • 256 posts
  • Corona SDK

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?



[TOPIC: post.html]
#3

Michael W.

[GLOBAL: userInfoPane.html]
Michael W.
  • Contributor

  • 276 posts
  • Alumni

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.

[TOPIC: post.html]
#4

graham07

[GLOBAL: userInfoPane.html]
graham07
  • Contributor

  • 256 posts
  • Corona SDK

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



[TOPIC: post.html]
#5

Lerg

[GLOBAL: userInfoPane.html]
Lerg
  • Contributor

  • 538 posts
  • Corona Staff

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 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.



[TOPIC: post.html]
#6

joshuacalebbryan

[GLOBAL: userInfoPane.html]
joshuacalebbryan
  • Enthusiast

  • 32 posts
  • Corona SDK

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?



[TOPIC: post.html]
#7

GamingStudio17

[GLOBAL: userInfoPane.html]
GamingStudio17
  • Contributor

  • 168 posts
  • Corona SDK

It would be great to make a speech to text



[TOPIC: post.html]
#8

chillfok

[GLOBAL: userInfoPane.html]
chillfok
  • Enthusiast

  • 98 posts
  • Corona SDK

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!



[TOPIC: post.html]
#9

Lerg

[GLOBAL: userInfoPane.html]
Lerg
  • Contributor

  • 538 posts
  • Corona Staff

 

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?

 

No, maybe try a different daily build?



[TOPIC: post.html]
#10

Lerg

[GLOBAL: userInfoPane.html]
Lerg
  • Contributor

  • 538 posts
  • Corona Staff

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.

'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.



[TOPIC: post.html]
#11

chillfok

[GLOBAL: userInfoPane.html]
chillfok
  • Enthusiast

  • 98 posts
  • Corona SDK

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!



[TOPIC: post.html]
#12

Lerg

[GLOBAL: userInfoPane.html]
Lerg
  • Contributor

  • 538 posts
  • Corona Staff

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.



[TOPIC: post.html]
#13

Lerg

[GLOBAL: userInfoPane.html]
Lerg
  • Contributor

  • 538 posts
  • Corona Staff

It would be great to make a speech to text

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


  • farjadfarabi_czs likes this

[TOPIC: post.html]
#14

gtatarkin

[GLOBAL: userInfoPane.html]
gtatarkin
  • Contributor

  • 366 posts
  • Corona SDK

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

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 :)

Best regards
Greg



[TOPIC: post.html]
#15

thedavebaxter

[GLOBAL: userInfoPane.html]
thedavebaxter
  • Contributor

  • 559 posts
  • Corona SDK

Does this plugin require active internet connection ?


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


Dave

[TOPIC: post.html]
#16

gtatarkin

[GLOBAL: userInfoPane.html]
gtatarkin
  • Contributor

  • 366 posts
  • Corona SDK

Does this plugin require active internet connection ?


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

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 :) For supported languages you have to check Apple iOS ang Android documentation for TTS.



[TOPIC: post.html]
#17

john.armstrong

[GLOBAL: userInfoPane.html]
john.armstrong
  • Contributor

  • 134 posts
  • Corona SDK

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



[TOPIC: post.html]
#18

Lerg

[GLOBAL: userInfoPane.html]
Lerg
  • Contributor

  • 538 posts
  • Corona Staff

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.



[TOPIC: post.html]
#19

gtatarkin

[GLOBAL: userInfoPane.html]
gtatarkin
  • Contributor

  • 366 posts
  • Corona SDK

What about changing gender? Is that possible yet?

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



[TOPIC: post.html]
#20

john.armstrong

[GLOBAL: userInfoPane.html]
john.armstrong
  • Contributor

  • 134 posts
  • Corona SDK

Har d har har

[TOPIC: post.html]
#21

thedavebaxter

[GLOBAL: userInfoPane.html]
thedavebaxter
  • Contributor

  • 559 posts
  • Corona SDK

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 :) For supported languages you have to check Apple iOS ang Android documentation for TTS.

Cheers for that.

 

Yeah I suppose it can't work like that, wouldn't make sense for the person listening. Same if you try and use Google translate for app descriptions, it doesn't read well.

 

EDIT -

 

Another 2 questions.

 

Does your locale match system.getPreference( "locale", "identifier" ) ?

 

So I could set the language of the plugin from using this Corona function (iOS only)?

 

Is the default language always english or the default language of the device?

 

 

Dave



[TOPIC: post.html]
#22

runewinse

[GLOBAL: userInfoPane.html]
runewinse
  • Contributor

  • 503 posts
  • Corona SDK

I've used this plugin for a while now and I have to say, it's working very well!

 

One thing though - is there some kind of return value / error number that can be used? I've been trying to use "no-NO" as the lanugage string (Norwegian). It's on your list, but it doesn't seem to work. What's happening is that the previous language seems to be used instead of Norwegian.

 

Is there any way to find out what happens in this case? 

 

I'm running on Android by the way.



[TOPIC: post.html]
#23

gtatarkin

[GLOBAL: userInfoPane.html]
gtatarkin
  • Contributor

  • 366 posts
  • Corona SDK

Guys,

in iOS9 speak rate is changed. For iOS 7/8 value rate = 0.6 was enough but now you should aim for rate = 1



[TOPIC: post.html]
#24

Lerg

[GLOBAL: userInfoPane.html]
Lerg
  • Contributor

  • 538 posts
  • Corona Staff

I've used this plugin for a while now and I have to say, it's working very well!

 

One thing though - is there some kind of return value / error number that can be used? I've been trying to use "no-NO" as the lanugage string (Norwegian). It's on your list, but it doesn't seem to work. What's happening is that the previous language seems to be used instead of Norwegian.

 

Is there any way to find out what happens in this case? 

 

I'm runing Android by the way.

It's possible, I'll try to implement it the meantime.



[TOPIC: post.html]
#25

Lerg

[GLOBAL: userInfoPane.html]
Lerg
  • Contributor

  • 538 posts
  • Corona Staff

Guys,

in iOS9 speak rate is changed. For iOS 7/8 value rate = 0.6 was enough but now you should aim for rate = 1

Good to know, thanks!




[topic_controls]
Page 1 of 13 1 2 3 »
 
[/topic_controls]

Also tagged with one or more of these keywords: release, android, ios