MikeyParton / react-speech-kit

React hooks for Speech Recognition and Speech Synthesis
https://mikeyparton.github.io/react-speech-kit
237 stars 63 forks source link

Speech does not stop on page refresh #83

Open swap0804 opened 1 year ago

swap0804 commented 1 year ago

on the refresh of page, speech does not stop

vivek07542 commented 1 year ago

I am also facing this issue, does this issue get addressed?

lisandropat commented 12 months ago

I solved this in a very rustic and not recommended way, but if you are using a layout file that is imported in all of your pages, include:

React.useEffect(() => { window.speechSynthesis.cancel() }, []);

Don't laugh at me, I'm not a good developer, but it works lol