gikopoi2 icon indicating copy to clipboard operation
gikopoi2 copied to clipboard

TTS gets stuck on chrome on long sentences

Open iccanobif opened this issue 3 years ago • 0 comments

probably because of this bug: https://bugs.chromium.org/p/chromium/issues/detail?id=679437

this sentence someone posted on _gen can reproduce the issue for me 100% of the time, the voice stops after 15 seconds, but speechSynthesis.speaking stays == true, effectively blocking every other message. あや:悲報】木村花さんへの中傷で提訴された男、ゲハで有名な任天堂アンチだった…… 任天堂信者のふりをして故人に誹謗中傷しまくることで任天堂下げを行う専門のキチガイだった模様wwwww

the bugs.chromium.org link proposes some workarounds, let's see if they can be used without breaking other browsers.

Possible workaround: https://justmarkup.com/articles/2020-05-19-text-to-speech/#chrome-bug

just tried this and it seems to fix the problem on chrome. need to test it on other browsers and in case use it only when navigator.userAgent.match(/Chrome/) && !navigator.userAgent.match(/Edg/)

    setInterval(() => {
        speechSynthesis.pause()
        speechSynthesis.resume()
    }, 14000)

iccanobif avatar Jun 08 '21 09:06 iccanobif