The_nooB
TTCTheo's Typesafe Cult
•Created by The_nooB on 5/30/2024 in #questions
Get speech duration before starting narrating using the speechSynthesis API in browser, JS/TS
Requirement -
1. Text to speech inside browser on frontend, preferrably reactjs
2. Geet the time period for which the browser will speack out the given text
The speechSynthesis API doesn't provide any methods like this
If I try to calculate the time based on the text and rate of the speech, I think that might be a bit un-reliable
Wasn't able to find any references online, the one I found calculated the duration post narration 🥲
2 replies