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
html5 text-to-speech freetts
Elss
source share