I’m brand new to Ionic, have quite a bit of experience with AngularJS
I’m trying to included a text to speech feature in my app. I used the following plugin:
cordova plugin add org.apache.cordova.plugin.tts
My desktop browser speaks just fine with:
Ionic serve
But when I upload the app to my Samsung GS4 (Ionic run android) it never speaks.
What am I missing?
.run(function($ionicPlatform) {
$ionicPlatform.ready(function() {
if (window.cordova && window.cordova.plugins.Keyboard) {
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
cordova.plugins.Keyboard.disableScroll(true);
}
//just to to test it out quickly.
var speech = new SpeechSynthesisUtterance('hello world');
speech.lang = 'en-US';
speechSynthesis.speak(speech);
if (window.StatusBar) {
// org.apache.cordova.statusbar required
StatusBar.styleDefault();
}
});
})
and I’m getting Cannot read property 'speak' error. I’m missing the module name after $scope in controller, but I’m not sure what to put there (I tried tts and didnt work)
appreciate if you could point me to right direction, thanks a lot
Hi,
I am trying to use TTS.tts and passing a long string approx 5000 charecters but it it not speaking while shrten the string with less then 4000 charetcerts, it is speaking the text.