Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I convert text to speech for using PhoneGap on the iPhone

I have a list of words which I want to convert the text to voice functionality for PhoneGap iPhone. Is there any API or Plugin for TTS? Please let me know of any alternatives.

like image 765
pujitav Avatar asked Sep 03 '12 12:09

pujitav


3 Answers

because there is not any phonegap way(javascript) way to do this i recommend using one of the native TTS opensource libraries like :

https://bitbucket.org/sfoster/iphone-tts/src

or

https://github.com/todoroo/iPhone-Speech-To-Text

and then connect them to your javascript-html code with simple plugin(find more about writing a plugin : http://docs.phonegap.com/en/2.0.0/guide_plugin-development_index.md.html

just simple as that!

like image 123
Duke Programmer Avatar answered Nov 14 '22 22:11

Duke Programmer


Did you check the Github repo for PhoneGap Plugins? (Located here: https://github.com/phonegap/phonegap-plugins) There is indeed a TTS plugin for Android: https://github.com/phonegap/phonegap-plugins/tree/master/Android/TTS

like image 22
Raymond Camden Avatar answered Nov 14 '22 23:11

Raymond Camden


The cordova plugin tts works in iPhone:

  TTS
    .speak('hello, world!', function () {
        alert('text spoken');
    }, function (reason) {
        alert(reason);
    });

The plugin uses the AVSpeechSynthesizer class in iOS and works in Android, Windows Phone too.

like image 29
Carlos Delgado Avatar answered Nov 15 '22 00:11

Carlos Delgado