TTS: Polly No Sound on Sonos One

Hello together

I want to use ther polly tts for my Sonos One Speaker. But ther is no sound at all. It looks like the mp3 file is created but the Sonos one does not want to play it. Does anyone have an idea why?

Here is my simple rule:

here is the log:

Im am using Openhab 3.2.0

The log shows that a generated .mp3 file should be played, have you tried to listen to that file in another way? If such test would not produce a sound, the TTS is 't working.
As of the log, the actually played song got interrupted, correct?
Canā€™t say if the change to UNDEF of the ā€œFernbedienungā€ is correct ( it does not sound so).
The change of volume should match your Config Setting of the Things Volume for Notifications. However your setting of 21 could be overheard.

The current song is interrupted and plays again after playing the tts mp3. Where can i find the mp3 file or how can i play the mp3 on another way? shouldnt the mp3 be a URL?

The TTS service creates this file. As I do not use Polly Iā€™d have to search in the documentation as well in order to know where the file is stored.
If you copy that file to another machine( the device you are presently using?) with a connected speaker, you should be able to play it there.
I noticed that it doesnā€™t work ā€œsometimesā€, stopping the actually played music and trying the say command then helps. Reason is unknown to me ( there used to be a problem when the music was started via Alexa, like starting a radio station with a voicecommand instead of the sonosapp).

Tested it at my system, the problem with a started radio station via voicecommand ( used ARD Mediathek) is back. If the radiostation is started via the Sonos App it works. If I remember it correctly the old problem was when another service ( not ARD Mediathek) was used by the Sonos player, this problem was solved, the change to ARD raised it again. I did not file an issue for that yet. Note that the music does NOT stop in this case.

I have now tried it with the radio playing, the playlist playing and without anything playing. When something is playing, it is paused and then resumed. I could not find the path for the MP3 file in the addon description.

Which TTS Service do you use? Perhabs i should just change the service.

Iā€™m using VoiceRSS.

Just hab a look into the Polly docs, if previous TTS requests are cached, they have to bestored somewhere on your system.

Edit: In case of VoiceRSS on raspi with openhabian the cache is at: var/lib/openhab/voicerss/cache

I searched now just for *.mp3 instead of the name in the logs. And now i found the files in this path:


I can play the files with the normal media player.
I noticed that the name in the log and the name on the filesystem are different.
Filesystem: a6f39546-7b48-4629-ac34-a47584b6b981.mp3
Log: Vicki_b1fdec37144d030b8b86a612b75dc865.mp3

Just a guess, Vicki is the name of the used voice? Iā€™d say that is of no factor.
Iā€™m out of ideas on your problem.

Edit: is the function to play just a standard sound ( barking.mp3 or doorbell.mp3) working?

Did another check on my system, this time with the channels Fernbedienung and volume linked to items.
Your line: " Item xxx_Fernbedienung changed from PAUSE to UNDEF" seems to indicate the culprit, on my system it changed to PLAY.
A solution is unknown to me, sorry for that.

Did you setup openHAB to use Polly and your desired voice under the menu ā€œEinstellungen " ā€œSpracheā€( to be found in the section System Servicesā€)?

Yes i set it up under ā€œSpracheā€ i tried a new Rule with Blockly and barking.mp3 or doorbell.mp3 it does not work either. Perhabs there is something wrong with the Sonos Add In? I am able to use the Sonos speaker in Openhab like play pause and so on. Perhabs its the blockly rule?

You can try the say or play command from the karaf console. Look into the docs under Configuration Guide Multimedia.

Normally i dont use the Console but i tried this:

but nothing happend. The Log is also empty

The core t usage would have been:
openhab:voice say Hallo Welt

In this case the commands would not print in red :wink:

The other is
openhab:audio play doorbell.mp3

Thanks i looked in the wrong line of the discription. I tried both but nothing happend.
This is the LOG:

2022-01-17 14:54:04.826 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ā€˜SonosOneEssen_Titelā€™ changed from Sweet Talker to 8da20950-fdbd-4d0f-8b59-acdf17f1a6da.mp3

2022-01-17 14:54:04.827 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ā€˜SonosOneEssen_Fernbedienungā€™ changed from PAUSE to UNDEF

2022-01-17 14:54:09.796 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ā€˜SonosOneEssen_Titelā€™ changed from 8da20950-fdbd-4d0f-8b59-acdf17f1a6da.mp3 to Sweet Talker

2022-01-17 14:54:09.796 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ā€˜SonosOneEssen_Fernbedienungā€™ changed from UNDEF to PAUSE

2022-01-17 14:55:05.578 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ā€˜SonosOneEssen_Titelā€™ changed from Sweet Talker to 8b2b4270-a66d-47ba-92e3-0fdb241ee30f.mp3

2022-01-17 14:55:05.578 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ā€˜SonosOneEssen_Fernbedienungā€™ changed from PAUSE to UNDEF

2022-01-17 14:55:10.572 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ā€˜SonosOneEssen_Titelā€™ changed from 8b2b4270-a66d-47ba-92e3-0fdb241ee30f.mp3 to Sweet Talker

2022-01-17 14:55:10.573 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ā€˜SonosOneEssen_Fernbedienungā€™ changed from UNDEF to PAUSE

Do i need to explzit add a Channel for playing the mp3? At the moment i just added this channels:

No, your setup looks good to me. I added the above mentioned items only in order to see the same log-lines as you had.

Could you play one of the standard sounds? ( doorbell or bark)
Other then that I am out of clues.

An additional test would be moving one of the stored tts .mp3 files into the openHAB sounds directory and play it with the audio command from the console. If that plays well the different naming COULD be a cause.

i was not able to play either doorbell or bark :frowning:

Iā€™m out of clues.