Read aloud not working (Linux/Chrome/Brave))

Hi Steve,

read aloud functionality is not working for me . I cannot see the Play/Pause button.

I am running Linux Mint 20.3. I tried both in

Chrome Version 125.0.6422.141 (Official Build) (64-bit)

and

Brave Version 1.66.118 Chromium: 125.0.6422.147 (Official Build) (64-bit.

When i click on individual word everything sounds fine.

thanks a lot

The Play/Pause button only appears if thereā€™s a local TTS voice available for the language you are learning according to the Web Speech API in the browser. It could be that thereā€™s a way to install such local voices on your Linux Mint system. I had a quick search online and didnā€™t find an obviously good article about this but I presume thereā€™s some way of doing it!

The TTS that plays when you click on individual words/phrases is fetched from an external service so it doesnā€™t depend on your local system. Unfortunately Iā€™m not offering the Read Aloud feature with this remotely generated TTS voice primarily due to the cost (and secondarily the extra complexity of implementing).

Hi Steve

thanks for you fast reply.

I will try to see what is missing from my setup and i will post back here.

Web Speech Api seems to be supported out of the box for Chrome and Firefox in Linux.

I installed locally TTS but the button does not appear.

The only alternative is to use a Read Aloud plugin in the browser but thatā€™s a completely different thing.

I will stick for now with the read aloud functionality in my mobile which works fine.

Thanks for the support and for this amazing app.

Sorry I donā€™t have a Linux desktop machine to test this on at the moment. If you want to help investigate, please:

  1. Open Chrome
  2. Press Control+Shift+J to open the Javascript console
  3. Enter this code followed by Return:
JSON.stringify(window.speechSynthesis.getVoices().map(v => ({uri: v.voiceURI, lang: v.lang})))
  1. Copy the output and paste it here for me to see

Here it is:

[{ā€œuriā€:ā€œGoogle Deutschā€,ā€œlangā€:ā€œde-DEā€},{ā€œuriā€:ā€œGoogle US Englishā€,ā€œlangā€:ā€œen-USā€},{ā€œuriā€:ā€œGoogle UK English Femaleā€,ā€œlangā€:ā€œen-GBā€},{ā€œuriā€:ā€œGoogle UK English Maleā€,ā€œlangā€:ā€œen-GBā€},{ā€œuriā€:ā€œGoogle espaƱolā€,ā€œlangā€:ā€œes-ESā€},{ā€œuriā€:ā€œGoogle espaƱol de Estados Unidosā€,ā€œlangā€:ā€œes-USā€},{ā€œuriā€:ā€œGoogle franƧaisā€,ā€œlangā€:ā€œfr-FRā€},{ā€œuriā€:ā€œGoogle ą¤¹ą¤æą¤Øą„ą¤¦ą„€ā€,ā€œlangā€:ā€œhi-INā€},{ā€œuriā€:ā€œGoogle Bahasa Indonesiaā€,ā€œlangā€:ā€œid-IDā€},{ā€œuriā€:ā€œGoogle italianoā€,ā€œlangā€:ā€œit-ITā€},{ā€œuriā€:ā€œGoogle ę—„ęœ¬čŖžā€,ā€œlangā€:ā€œja-JPā€},{ā€œuriā€:ā€œGoogle ķ•œźµ­ģ˜ā€,ā€œlangā€:ā€œko-KRā€},{ā€œuriā€:ā€œGoogle Nederlandsā€,ā€œlangā€:ā€œnl-NLā€},{ā€œuriā€:ā€œGoogle polskiā€,ā€œlangā€:ā€œpl-PLā€},{ā€œuriā€:ā€œGoogle portuguĆŖs do Brasilā€,ā€œlangā€:ā€œpt-BRā€},{ā€œuriā€:ā€œGoogle руссŠŗŠøŠ¹ā€,ā€œlangā€:ā€œru-RUā€},{ā€œuriā€:ā€œGoogle ꙮ通čƝļ¼ˆäø­å›½å¤§é™†ļ¼‰ā€,ā€œlangā€:ā€œzh-CNā€},{ā€œuriā€:ā€œGoogle ē²¤čŖžļ¼ˆé¦™ęøÆļ¼‰ā€,ā€œlangā€:ā€œzh-HKā€},{ā€œuriā€:ā€œGoogle 國čŖžļ¼ˆč‡ŗē£ļ¼‰ā€,ā€œlangā€:ā€œzh-TWā€}]

Thanks. It looks like you have voices covering a bunch of languages. But please try this to see if they are local voices or not (only local voices are supported):

JSON.stringify(window.speechSynthesis.getVoices().map(v => ({uri: v.voiceURI, lang: v.lang, localService: v.localService})))

Also, which language are you currently learning?

Here is the output of the second command:

[{ā€œuriā€:ā€œGoogle Deutschā€,ā€œlangā€:ā€œde-DEā€,ā€œlocalServiceā€:false},{ā€œuriā€:ā€œGoogle US Englishā€,ā€œlangā€:ā€œen-USā€,ā€œlocalServiceā€:false},{ā€œuriā€:ā€œGoogle UK English Femaleā€,ā€œlangā€:ā€œen-GBā€,ā€œlocalServiceā€:false},{ā€œuriā€:ā€œGoogle UK English Maleā€,ā€œlangā€:ā€œen-GBā€,ā€œlocalServiceā€:false},{ā€œuriā€:ā€œGoogle espaƱolā€,ā€œlangā€:ā€œes-ESā€,ā€œlocalServiceā€:false},{ā€œuriā€:ā€œGoogle espaƱol de Estados Unidosā€,ā€œlangā€:ā€œes-USā€,ā€œlocalServiceā€:false},{ā€œuriā€:ā€œGoogle franƧaisā€,ā€œlangā€:ā€œfr-FRā€,ā€œlocalServiceā€:false},{ā€œuriā€:ā€œGoogle ą¤¹ą¤æą¤Øą„ą¤¦ą„€ā€,ā€œlangā€:ā€œhi-INā€,ā€œlocalServiceā€:false},{ā€œuriā€:ā€œGoogle Bahasa Indonesiaā€,ā€œlangā€:ā€œid-IDā€,ā€œlocalServiceā€:false},{ā€œuriā€:ā€œGoogle italianoā€,ā€œlangā€:ā€œit-ITā€,ā€œlocalServiceā€:false},{ā€œuriā€:ā€œGoogle ę—„ęœ¬čŖžā€,ā€œlangā€:ā€œja-JPā€,ā€œlocalServiceā€:false},{ā€œuriā€:ā€œGoogle ķ•œźµ­ģ˜ā€,ā€œlangā€:ā€œko-KRā€,ā€œlocalServiceā€:false},{ā€œuriā€:ā€œGoogle Nederlandsā€,ā€œlangā€:ā€œnl-NLā€,ā€œlocalServiceā€:false},{ā€œuriā€:ā€œGoogle polskiā€,ā€œlangā€:ā€œpl-PLā€,ā€œlocalServiceā€:false},{ā€œuriā€:ā€œGoogle portuguĆŖs do Brasilā€,ā€œlangā€:ā€œpt-BRā€,ā€œlocalServiceā€:false},{ā€œuriā€:ā€œGoogle руссŠŗŠøŠ¹ā€,ā€œlangā€:ā€œru-RUā€,ā€œlocalServiceā€:false},{ā€œuriā€:ā€œGoogle ꙮ通čƝļ¼ˆäø­å›½å¤§é™†ļ¼‰ā€,ā€œlangā€:ā€œzh-CNā€,ā€œlocalServiceā€:false},{ā€œuriā€:ā€œGoogle ē²¤čŖžļ¼ˆé¦™ęøÆļ¼‰ā€,ā€œlangā€:ā€œzh-HKā€,ā€œlocalServiceā€:false},{ā€œuriā€:ā€œGoogle 國čŖžļ¼ˆč‡ŗē£ļ¼‰ā€,ā€œlangā€:ā€œzh-TWā€,ā€œlocalServiceā€:false}]

I am learning German and from what i see it is not local

{ā€œuriā€:ā€œGoogle Deutschā€,ā€œlangā€:ā€œde-DEā€,ā€œlocalServiceā€:false}

I do not know if this helps but I tried this in javascript console and it works perfectly.

var utterance = new SpeechSynthesisUtterance();
utterance.text = "Es gibt Wettervorhersagen im Fernsehen oder im Radio, die die Aussichten fĆ¼r die nƤchsten Tage liefern.";

speechSynthesis.onvoiceschanged = function() {
  var voices = speechSynthesis.getVoices();
  utterance.voice = voices.find(voice => voice.lang === "de-DE");
  speechSynthesis.speak(utterance);
};

There are a few problems with non-local voices (at least in my testing as they are implemented in Chrome at the moment):

  • they donā€™t generate boundary events, needed for word highlighting
  • they donā€™t generate end events when the TTS has finished speaking, which is required to switch the play/pause toggle button back to play mode or to turn to the next page
  • for long passages, the TTS just cuts off mid sentence

Iā€™ve just tried again to see if I could switch on these non-local voices for a more basic TTS experience without word highlighting, but the browser support isnā€™t good enough at the moment so it feels too buggy. Sorry.

Thatā€™s fine. It would be ideal to have this working on my laptop, but since it works on my phone I am happy. Thank you for spending time on this.

2 Likes