let msg = new SpeechSynthesisUtterance();
msg.lang = "en-GB" ;
msg.rate = 1.1 ;
msg.pitch = 1.1 ;
msg.text = txt ;
window.speechSynthesis.speak(msg);
Is there any way to predict how many seconds it will take to pronounce the text ?
let msg = new SpeechSynthesisUtterance();
msg.lang = "en-GB" ;
msg.rate = 1.1 ;
msg.pitch = 1.1 ;
msg.text = txt ;
window.speechSynthesis.speak(msg);
Is there any way to predict how many seconds it will take to pronounce the text ?
Copyright © 2021 Jogjafile Inc.
Assuming the answer is 1 sentence, about 7 seconds
Assuming the sentence is randomly generated: The average person speaks 140 words/minute. https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&cad=rja&uact=8&ved=2ahUKEwi-qIOmhun_AhWiEGIAHYLuCo0QFnoECCgQAQ&url=https%3A%2F%2Fdebatrix.com%2Fen%2Fspeech-calculator%2F&usg=AOvVaw1HajfLbTNv8Oaxf3u20l-M&opi=89978449 140 * 1.1 = 154 wpm The average sentence length is 15-20 words. https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&cad=rja&uact=8&ved=2ahUKEwifxfGdhun_AhUNEVkFHWaXAPAQFnoECA0QAw&url=https%3A%2F%2Fbecomeawritertoday.com%2Faverage-sentence-length%2F&usg=AOvVaw3xJ54svQ7VpSPTCufTnDIV&opi=89978449 1/154 * 17.5 = 0.11 * 60 = 6.818 seconds