User Media and Text To Speech

0 favourites
  • 6 posts
From the Asset Store
Customizable speech bubble dialogue system! With this dialogue system, you can finally have speech bubbles in your game!
  • Hi

    I have been working on a project now and to start with I have been using the Cordova plugin TTS however this does have some limitations to it such as no control over the rate of speech etc.

    Then I discovered that the user media does all of this but where I am struggling to get it to work , is on mobile platforms such as Android. Does this mean that the user media is only designed to work on a desktop environment ?

    This would be a blow if so because it has so much more control that the Cordova plugin.

  • 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!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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

  • It's not just a TTS problem with User Media plugin. The entire User Media plugin doesn't work when you export to cordova, and it's not able to access mobile device camera, mic, etc... from native apps.

  • hi

    I too would like to get TTS working in my spelling game.

    I found this plugin "cordova-plugin-tts" in the cocoon.io in the plugin section of your project within the project setting options.

    I think requires the "Cordova TextToSpeech: text to speech" from the Construct2 Cordova Plugins.

    Have a look at this link

    https://github.com/vilic/cordova-plugin-tts#readme

    hope this helps

  • hi

    I too would like to get TTS working in my spelling game.

    I found this plugin "cordova-plugin-tts" in the cocoon.io in the plugin section of your project within the project setting options.

    I think requires the "Cordova TextToSpeech: text to speech" from the Construct2 Cordova Plugins.

    Have a look at this link

    https://github.com/vilic/cordova-plugin-tts#readme

    hope this helps

    I have this plug in but I still cannot get it to work with phonegap

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)