ixrock / XTranslate

Easy translate text on web pages (chrome extension)
https://chrome.google.com/webstore/detail/xtranslate/gfgpkepllngchpmcippidfhmbhlljhoo
114 stars 27 forks source link

Use SpeechSynthesis api for text-to-speech #58

Closed ixrock closed 4 months ago

ixrock commented 1 year ago

Instead of chrome.tts (which is not supported in Firefox, but works in Brave/Edge?)

Docs: https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesis

Quick example for checking support in browsers: speechSynthesis.speak(new SpeechSynthesisUtterance("test")) // say out loud "test"

Extras: