Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

web speech api safari

I have been looking into the web speech api. The web speech api works in chrome and mozilla but I can not figure out if the web speech api, for converting speech to text is already working for safari 11. Apple said this function would be included in safari 11 but I could not find any information whether they implemented the web speech api for speech to text conversion in safari 11. So my question is if anybody knows whether speech to text conversion is working for safari 11 already?

like image 919
cees Avatar asked Nov 08 '22 11:11

cees


1 Answers

For Safari, the Web Speech API refers to text to speech for accessibility purposes. Unfortunately there is no built in way to convert speech > text in Safari.

However, their text > speech api is accessible through speechSynthesis.

You must first create an instance of a SpeechSynthesisUtterance to pass to the speechSynthesis.speak() method.

var x = new SpeechSynthesisUtterance();
x.text = "hello";
speechSynthesis.speak(x);

More info: https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesis

like image 118
cfg Avatar answered Nov 15 '22 13:11

cfg