6

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.

Whymarrh
  • 13,139
  • 14
  • 57
  • 108
pujitav
  • 528
  • 1
  • 5
  • 17

3 Answers3

5

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!

Duke
  • 1,731
  • 2
  • 17
  • 33
  • thanks..will it work in android os??,bcoz i'm developing this app in android os for phonegap iphone.. – pujitav Sep 18 '12 at 11:15
  • for android you need a TTS java library there are some like : http://freetts.sourceforge.net/docs/index.php and then connect it with a simple plugin – Duke Sep 18 '12 at 11:27
3

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

Raymond Camden
  • 10,661
  • 3
  • 34
  • 68
1

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.

Carlos Delgado
  • 2,930
  • 4
  • 23
  • 49