Hello!
I sat down again and tried to make my openHAB instance a bit “smarter”.
So far I have never had any success in realizing anything with sound with openHAB.
Now I wanted to ask here what I’m always doing wrong that nothing works.
I’m going to try implementing TTS and STT.
So I installed Piper for TTS and Whisper for STT.
In Settings → System Settings → Audio I have set the output to “Web Audio”.
Under Settings → System Settings → Language I have set Piper for TTS and Whisper for STT and selected “Piper - German - Thorsten” as the voice.
If I now create a script that should output something to me, unfortunately nothing happens.
If I just want to play a sound like doorbell.mp3, nothing happens either.
“Web Audio” is selected as the audio sink.
And here we come to my actual problem.
With openHAB I have never been able to output sound via the web browser.
I see the following entry in the event.log when I play doorbell.mp3:
2024-12-20 21:49:08.149 [INFO ] [openhab.event.PlayURLEvent ] - Play URL '/audio/849944c6-256d-4daf-accf-38f6b0ec449b'.
Unfortunately, nothing happens in the browser.
Using the dev options, I also don’t see that the browser ever wants to access anything from /audio/XXXXX.
Sound effects such as the “snap sound” when the blocks are linked in the Blockly editor are played in the browser without any problems.
The devices can play sound as such. So that’s not the problem.
I have already tried the following applications:
- Firefox
- Libre Wolf (Firefox Fork)
- Ungoogled Chromium
- OH Android App (Android 15 - F-Droid)
What am I doing wrong?
I have found the problem several times while searching the net, but as usual in forums, no answer that works.
Some answers are also from OH2 times, which is partly no longer valid for OH4.
Yes, I use nginx as a proxy, but it doesn’t work either if I access OH directly via port 8080.
The actual goal used to be that the sound data would end up in a file that could be distributed in the home network with Snapcast, for example.
But this is apparently not so easy to implement.
I don’t have a “smart speaker” like Alexa, Google & Co. So I can’t test it with that and have to rely on the browser.