Text To Speech API Not Working on iOS Safari

For the following code, it does not work on iOS Safari(iPad Air 2 with iOS 9.x). It works everywhere else (Safari on Mac, Chrome on windows)


When I tried to debug the script below on the iPad's Safari (connected to Mac), it does not give any error. It is just silent. No speech.


Please not that this is the simple script, I created many others, such as setting up the voice etc.Nothing works..There is also a separate problem getting the voices, but I want to see if it works with the default voice first.


P.S. If I do XCode programming, using swift to develop native code on iPad (not in Safari), speech works on the iPad. But my goal is to create a web page using the Speech API


Thanks.


<!DOCTYPE html>

<html>

<head>

<title></title>

<meta charset="utf-8" />

</head>

<body>

<script>

function Speak() {

speechSynthesis.speak(new SpeechSynthesisUtterance("Hello, this is my voice on a webpage"));



var speech = new SpeechSynthesisUtterance();

speech.text = "Hello";

speech.volume = 1; // 0 to 1

speech.rate = 1; // 0.1 to 9

speech.pitch = 1; // 0 to 2, 1=normal

speech.lang = "en-US";

speechSynthesis.speak(speech);

}

</script>

<a id="trigger_me" onclick="Speak()">Speakme</a>

</body>

</html>

I'm facing similar issue, was this resolved?? Safari seems like the new IE!

That feature is not supported on IOS Safari but I would love to know if and when apple will support this. Chrome seems to have the most supported features of this API.

What about nowadays? Any success?

speechSynthesis.speak() worked for me in my iPhone 6 running 11.2.5. It did not work on my iPad Pro also running 11.2.5. I wonder if there's some setting I need to tweak.

I had all the same symptoms on IOS Safari 11.3, with some devices working and one not working. This thread https://forums.developer.apple.com/message/293874#293874 had the answer for me. The device was soft muted, so sounds works on things like Siri but didn't work on Safari.

Text To Speech API Not Working on iOS Safari
 
 
Q