bookreader
bookreader copied to clipboard
Add support for TTS to work in Firefox and Brave browser.
Description
Many users use the book-reader TTS feature for listening to audiobooks. But readers who use browsers like firefox and brave are not able to take benifit from this feature.
Evidence / Screenshot (if possible)
When we click on read out loud button on firefox web browser it just highlights the text without speaking out any audio.
typing speechSynthesis.getVoices()
returns an empty array in the console.
Note: I have just tested this on Ubuntu operating system the results can vary with different OS
Expectation
TTS should read out the text.
Tested On
Ubuntu 19.10
Mozilla Firefox for Ubuntu canonical 1.0
Browser version 74.0 (64-bit)
Proposal & Constraints
speechSynthesis varies with respect to browser thus there is a need for writing separate code to handle other browser support.
Stakeholders
@-tag any stakeholders of this bug
Well in ubuntu to get the tts feature you need to install (SpeechD)SpeechDispatcher, I checked about this and the reason this was working on Chrome but not Firefox is that Firefox doesn't invoke speechSynthesis.onvoiceschanged
Here is the Thread
https://bugzilla.mozilla.org/show_bug.cgi?id=1003464
you can know more about