Search code examples
javascriptspeech-synthesis

voice output smartphones(JS)


So,I have already a code for voice output :

<script type="text/javascript">
var msg = new SpeechSynthesisUtterance('Hello World');
window.speechSynthesis.speak(msg);

</script>

But on my smartphone that dont work!(I already tryed with a webside link and as HTML data on phone.)

Thx for every answer!


Solution

  • As you can see here SpeechSynthesisUtterance isn't supported everywhere and you are apparently using a browser on your phone that doesn't support it.