ken107 / read-aloud

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

Ignoring text wrapped in << xxx xxx >> #344

Closed ecstasy01 closed 9 months ago

ecstasy01 commented 9 months ago

I noticed that the speech just skips past sentences and words wrapped in << >> such as << Text here >>.

Could someone tell me whats causing this or how to fix it? thanks

ken107 commented 9 months ago

We know this happens if you are using one of the Microsoft voices such as "Microsoft David", etc. Is that what you're using?

The Microsoft TTS engine apparently trips on the angle brackets. I haven't implemented a workaround because:

  1. it's an ugly hack that only applies to a few voices
  2. it's not clear what to replace the angle brackets with, or whether to just replace them with whitespace. Depending on the context, they may need to be read aloud as "less than", "greater than", or maybe they need to be ignored altogether such as in your case.

We probably should do something about this though, because it's a problem not likely to go away any time soon. In the meantime, you can pick other voices that won't have the issue. You can install this offline voice from Google that works pretty well: https://blog.readaloud.app/2020/09