Hi
I've been looking at this also, but on IOS.
User Media uses the HTML5 text to speech API. Example:
var utterance = new SpeechSynthesisUtterance('Hello world');
window.speechSynthesis.speak(utterance);
This works fine on Safari on iPhone and iPad as standalone javascript. However, once it is compiled via Cordova (PhoneGap) it doesn't work.
It doesn't produce an error, and debug shows that window.speechSynthesis is an object. But the call to .speak doesn't produce sound. I attached it to a user interaction (e.g. click a button to .speech) in case it required user interactivity, still no joy.
I tried using the Cordova TTS plugin instead but it clashed with the Construct 2 audio system.
Once I've looked into this more I'll update this post with my findings.
Good luck!
Hi AaronSmithUK
Thanks for your reply on this not sure if your problems with Cordova TTS relate to the ones I have had where I am switching spoken languages and even when I do the speech sometimes ends up in the wrong language.
What I have found with the User Audio TTS is if you open the example capx file that comes with Construct 2 and compile it for Android , the app immediately warns you that it cannot find the speech data or something of that kind.
I have emailed the author of the Cordova TTS about the need of a rate control but I have not heard anything back