Voice and Language Support HTML5 Speech Synthesis API

I am trying to use speech synthesis in html5 for speaking in Arabic, but it does not work. I run the following script to check for languages ​​supported by chrome, and Arabic is not one of them.

window.addEventListener("DOMContentLoaded", function () { if (window.speechSynthesis != undefined) { document.getElementById("playback").addEventListener("click", function () { var stimmen = window.speechSynthesis.getVoices(); for (var i = 0; i < stimmen.length; i++) { console.log("Voice " + i.toString() + " " + stimmen[i].name); } }, false) } }, false) 

and this is the script i used

 var msg = new SpeechSynthesisUtterance(); msg.text = 'تجربة اللغة العربية'; msg.lang = 'ar-SA'; window.speechSynthesis.speak(msg); 

Is there any way to set the voice / language in Arabic for this feature to work. If not, can someone lead me to a built-in text service for websites, should it support Arabic? or anything that does this? I contacted readspeech, but their prices are higher than my budget

+7
html5 text-to-speech freetts
source share
1 answer

Not sure if Arabic will be supported, but for a list:

 // List available voices speechSynthesis.onvoiceschanged = function () { var voices = this.getVoices(); console.log(voices); }; 
+4
source share

All Articles