Hello, I am trying to insert code for a text-to-speech function. However, my survey is based in English with select Spanish words. I tried using the solution posted here but it only picks up the English words and skips the Spanish words. Is there a way I can adjust this code or insert a second code to catch the second language?
Page 1 / 1
We need to split the text to speech into multiple parts based on the sequece of words. We can use the code from the question post for english and then for spanish use below code:
var msg = new SpeechSynthesisUtterance('Spanish text goes here.....');
msg.lang = 'es-ES';
window.speechSynthesis.speak(msg);
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.