You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@royale.apache.org by GitBox <gi...@apache.org> on 2020/01/17 05:45:10 UTC

[GitHub] [royale-asjs] vinidiktov commented on issue #674: How to use standard Web APIs such as Web Speech API?

vinidiktov commented on issue #674: How to use standard Web APIs such as Web Speech API?
URL: https://github.com/apache/royale-asjs/issues/674#issuecomment-575474368
 
 
   @Harbs 
   
   Should I wait for an updated version of Royale?
   
   How can I use the updated typedefs right now?
   
   Will SpeechSynthesisUtterance  also be accessible? 
   
   Do you mean I'll be able to write code exactly like this, or do I have to change it up?:
   
   Will the events also work?
   
   `
   var synth = window.speechSynthesis;
   var voices = [];
   voices = synth.getVoices()
   
   var utterThis = new SpeechSynthesisUtterance("hello-world");
   utterThis.onend = function (event) {
   console.log('SpeechSynthesisUtterance.onend');
   }
   utterThis.onerror = function (event) {
   console.error('SpeechSynthesisUtterance.onerror');
   }
   
   utterThis.voice = voices[0];
   
   synth.speak(utterThis);
   `

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services