OH3 - Google TTS - Only white noise

Hi, I’m struggling around 2 days with the following problem. When I want to use Google TTS, the only thing I hear is white noise.

On my openhab2 server i don’t have any problems. But it is configured differently, via JSON file in paper UI. In OH3 we have configure it via UI, so i installed a clean version of OH3, configured it including Google TTS and it worked. As I transfer all my Things, items and rules to OH3 i had to reboot. After this reboot Google TTS didn’t work anymore, as i remember, no sound. So i configured everyting again and now i get white noise (same as [speaker-test] in commandline). I created a new secret on google cloud, Got a new autorisation code. Stopped the binding, stopped openhab and cleaned the cache. But it just doesn’t speak anymore. The normal VoiceRSS does work, but it sounds awefull in comparisson to Google TTS.

Does anyone have a clue whats going on here. Especially the first reboot which ‘deleted’ the voice, sort off. It’s the 3th time i reinstalled OH3 and reproduced this problem every time.

Hi,
are all your Google Voices present? I.e. can you select them in the UI?
Are you using Wavenet voices and did you check your google limits (depending on what plan you are on).

Are you specifiying a special voice in the say command, or are you using the default voice?

What kind of application did you select generating the ClientID on google?

Good questions, i should have mentioned them at first.

  • All google voices are present
  • I can select them in the UI, i tried a couple Wavenet and the ‘default-ones’, doesn’t change
  • Google limits < don’t understand, but on my OH2 server wavenet is working perfectly
  • I’m just using openhab:voice say test on karaf
  • I selected Desktop generating the client ID on google

[edit]
I have a api key in my google Cloud TTS but i don’t use it. I think that one is used with OH2?

By limits I meant the limited amount of characters (I think?) that you get in the free plan of google cloud TTS. But since it’s working on your OH2 it should be fine…

Can you play a different sound than voice through the audio sink?

Yes, Just tested barking.mp3 via karaf:

openhab:audio play barking.mp3

And the barking was so clear, our cat got scared and ran away! :wink:

(Checked the plan on google, and i have no limitations on my free plan)

[edit]

I also have this in my logs:

Cannot determine master volume level - assuming 100%

But I also got it when Google was speaking in OH3 (before the reboots), looks like a problem in openhabian of some kind. Something to do with Headphone output in stead of Master.

Well I found something interresting. When i navigate to the cache folder: $OPENHAB_USERDATA/cache/org.openhab.voice.googletts there are a the wav files from the tests i did. When i play them at my computer they sound perfect. If I play them via karaf: openhab:audio play test.wav they have a very high pitch and are way to fast.

Not sure what is going on, but it looks like google is outputting the right data (the file is received and written on the raspberry pi correctly). But after that is just being interperted wrong because when i play it on my laptop, it just sounds fine.

I’m going to restart openhab and clear the cache… to be continued

The reboot did fix the problem. I did not clean the cache, just a restart [sudo systemctl stop/start openhab.service] with the settings as they where before the reboot.

Had to reboot again to apply changed to my log4j2.xml file… and the problem is back.

Can someone confirm this is a bug in OH3? Or help me fix this. It’s getting really frustrating hearing a loud white noise everytime openhab executes a say command…

I restarted openhab again but GoogleTTS is not working anymore (I hear a white noise). Not sure why it doesn’t work. I thougt maybe because my other OH2.5 is using GoogleTTS and it blocks somehow (strange because the files are written to the system but are played as white noise). So i stopped that googletts instance and tried a reboot again but Voice isn’t working anymore.

I feels like random, after every restart, it will work, or it won’t but i’m out of options and hope someone can help me with this. Pretty strange though i’m the only one with this problem.

[edit]
I stopped openhab.service cleared the cache and started again and now Vocie is working again… maybe i cleared the cache earlier and i forgot. But i’m just lost now.

[edit 2]
Had to stop start openhab again because of a plugwise binding which didn’t work well. So i made sure to clear the cache before reboot and had white noise again. So it’s random, sometimes GoogleTTS works, sometimes not. Cannot link it to anything…

Still hoping someone could help me with this :slight_smile:

Some data for the experts on this: Looks like everything is doing fine while i was hearing white noise

2021-01-04 15:57:02.221 [DEBUG] [.googletts.internal.GoogleTTSService] - Synthesize 'test ' for voice 'googletts:nlNLWavenetA' in format AudioFormat [codec=PCM_SIGNED, container=WAVE, bigEndian=true, bitDepth=16, bitRate=705600, frequency=44100]

2021-01-04 15:57:02.229 [DEBUG] [ce.googletts.internal.GoogleCloudAPI] - Audio file nlNLWavenetA_871fa5f3a79d6f144b0d9a21fe438338.wav was found in cache.

2021-01-04 15:57:02.270 [WARN ] [nternal.javasound.JavaSoundAudioSink] - Cannot determine master volume level - assuming 100%

2021-01-04 15:57:27.591 [DEBUG] [.googletts.internal.GoogleTTSService] - Synthesize 'test ' for voice 'googletts:nlNLWavenetA' in format AudioFormat [codec=PCM_SIGNED, container=WAVE, bigEndian=true, bitDepth=16, bitRate=705600, frequency=44100]

2021-01-04 15:57:27.604 [DEBUG] [ce.googletts.internal.GoogleCloudAPI] - Audio file nlNLWavenetA_871fa5f3a79d6f144b0d9a21fe438338.wav was found in cache.

2021-01-04 15:57:27.649 [WARN ] [nternal.javasound.JavaSoundAudioSink] - Cannot determine master volume level - assuming 100%

2021-01-04 15:57:47.309 [DEBUG] [.googletts.internal.GoogleTTSService] - Synthesize 'fliepflap ' for voice 'googletts:nlNLWavenetA' in format AudioFormat [codec=PCM_SIGNED, container=WAVE, bigEndian=true, bitDepth=16, bitRate=705600, frequency=44100]

2021-01-04 15:57:47.971 [DEBUG] [ce.googletts.internal.GoogleCloudAPI] - Caching audio file nlNLWavenetA_c589655bc162086c6de880f18fdf8ac8.wav

2021-01-04 15:57:47.976 [DEBUG] [ce.googletts.internal.GoogleCloudAPI] - Caching text file nlNLWavenetA_c589655bc162086c6de880f18fdf8ac8.txt

And the story continues, I changed the playback to chromecast via Audio in Settings, and then it works… it speaks nicely via chromecast, when i change back to system speaker i only get noise. So there is something wrong there… not sure how to investigate or solve…

At least I can confirm the same behavior here. Although I restarted OH multiple times, it’s not possible to get a valid tts output on the system speaker, only white noise. Playing back audio files works fine. And the cache files seem to be okay since they can be played back on another PC.

1 Like

The strange this is, sometimes is just works. I’m running a raspberry pi with OH3 for testing and reboots a lot. Just out of curiosity I test if it works, sometimes is does, sometimes is doesn’t. It’s only on 3.5mm and we get an error about the Mastervolume in the log. I think it has something to do with eachother but I don’t know how to fix it.

I had the same problem: Google TTS was fine with Webaudio, but only white noise when I selected Systemspeaker. I tried Openhab 3.1 via Unstable, and since then: everything worked fine! Maybe they’re fixing this currently in the unstable builds?

1 Like

Exactly the same here. White noise when using openhab while the google wavenet file has been down loaded and is playeable:
aplay /var/lib/openhab/cache/org.openhab.voice.googletts/nlNLWavenetD_6179d3a6c123b27a18f507a8b065cfed.wav

The sollution for me is completely reboot the raspberry pi. If i only restart openhab, the voice is white noise. If I reboot the pi afterwards the voice is normal again. That’s why it looked random, because I ran a test pi, sometimes I powered it on, sometimes is was running and i had te restart openhab.

Now OH3 is my default smarthome engine and it’s always on, that’s why I noticed that only a reboot would fixe the voice.

I don’t dare to use the unstable versions… not sure what it will do…

It seems that the google sound files come in two formats wav or mp3. The wav files work well, the mp3 files don’t. Perhaps it is possible to explicitly ask in the ssml request to return a wav formated file?

I upgraded to 3.1.0 snapshot, but it didn’t solve. first no problem. Have a black screen as main UI so cleared cache and restarted openhab, again the white noise…

Want to bump this again. Just upgraded to 3.0.1 version and this still sometimes happens.

Also, completely rebooting the pi doesn’t work either every time.

Does anyone know how to investigate or solve this?

I ran into the same problem now. I had to restart openhab (not the pi) and suddenly only white noise instead of voice. Sounds are played fine…
I’m on 3.1M2, so there’s no fix in there!

1 Like