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