Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Text to Speech in Corona SDK
Started by magadistudio Jun 19 2013 07:55 PM

* * * * * 1 votes
1 reply to this topic
tts speech type text and play audio

Best Answer magadistudio , 24 June 2013 - 11:41 AM

Okay everyone,

 

It seems like this feature hasn't made it to the API's yet, but a while a go a great developer shared the following post:

http://developer.coronalabs.com/code/text-speech-using-networkdownload#comment-22659

 

And it's great as it helped me getting the issue resolved.  However, if you want it to work properly, makes sure to replace:

 

"http://translate.google.com/translate_tts?tl=I+love+Corona",

 

with :

"http://www.translate.google.com/translate_tts?tl=en&q=I+love+Corona",

So it will all look like the following:

 

network.download( 
 
        "http://www.translate.google.com/translate_tts?tl=en&q=I+love+Corona",
        "GET", 
        networkListener, 
        "corona.mp3", 
        system.TemporaryDirectory )

 

I hope this helps anyone who's been struggling to get this TTS to work!

 

Regards,

 

magadistudio

[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

magadistudio

[GLOBAL: userInfoPane.html]
magadistudio
  • Contributor

  • 117 posts
  • Corona SDK

Hello everyone,

 

This maybe a very simple and naive question, but I was wondering if anyone knows how to, basically, allow users to enter a name, a word... or text in a textfield and then hit a 'speak' button, for example to hear the word/text they entered?

 

It seems like Corona SDK doesn't support TTS, but is there an API or a work around I can use for this app I am building?

 

Any help is highly appreciated.

 

Thank you guys!



[TOPIC: post.html]
#2

magadistudio

[GLOBAL: userInfoPane.html]
magadistudio
  • Contributor

  • 117 posts
  • Corona SDK

  Best Answer

Okay everyone,

 

It seems like this feature hasn't made it to the API's yet, but a while a go a great developer shared the following post:

http://developer.coronalabs.com/code/text-speech-using-networkdownload#comment-22659

 

And it's great as it helped me getting the issue resolved.  However, if you want it to work properly, makes sure to replace:

 

"http://translate.google.com/translate_tts?tl=I+love+Corona",

 

with :

"http://www.translate.google.com/translate_tts?tl=en&q=I+love+Corona",

So it will all look like the following:

 

network.download( 
 
        "http://www.translate.google.com/translate_tts?tl=en&q=I+love+Corona",
        "GET", 
        networkListener, 
        "corona.mp3", 
        system.TemporaryDirectory )

 

I hope this helps anyone who's been struggling to get this TTS to work!

 

Regards,

 

magadistudio




[topic_controls]
[/topic_controls]