ken107 / read-aloud

An awesome browser extension that reads aloud webpage content with one click
https://readaloud.app
MIT License
1.38k stars 235 forks source link

Words are sometimes skipped. Reading from a text file that is opened in the browser by using Ctrl-O in Chrome on Lubuntu. #91

Open davidbelliveau opened 5 years ago

davidbelliveau commented 5 years ago

For example, the program gets to this block of text in my text file:

thallium, manganese (to 5394 ppm), copper (to 665 ppm), lead (to 108,162 ppm) and zinc (to 2,355 ppm) with one sample giving an anomalous value in molybdenum (33 ppm).

and stops speaking after the word "one" and before "sample". The program then goes on to the next paragraph without reading the rest of the sentence.

ken107 commented 5 years ago

Thank you for the details. The reason is with the selected voice, which defaults to Google US English. Due to a Chrome bug, all Google voices get stuck if the speech is longer than 15 seconds. To work around this bug, the extension breaks up your document into 15-second fragments. If you notice, each segment of speech is no longer than 15 seconds.

The fragmentation is based on the number words, and it works well in most cases. Sometimes, such as in this case, a fragment ends up taking longer than 15 seconds, and thus gets truncated. Your fragment contains some scientific words and numbers, which takes longer to speak than expected by the fragmentation algorithm.

It's difficult to improve the fragmentation algorithm much further. So if you would, please go to Options and pick some of the other non-Google voices. They won't have this issue.