Thanks initially it was not working (sometimes) and I didn’t have turn on or off. So I added on and off. But I’ll try without the off and see how it goes the next few days.
That is the issue. The commands are sent one by one, when the message is sent, the next one is sent which turns it off.
So that’s why you hear the beep and then nothing, because you turn it off immediately.
Some media players could reproduce only partial, corrupted or no audio at all when the audio format is not fully supported. In such cases it is required to experiment with different combinations of audio formats, channels, sample rates and bits using preferred audio settings options.
For example, some Google Cast devices skip initial audio part when the audio is sampled at 22050Hz, and to fix the problem it is required to set the preferred_sample_rate setting in the options option to 44100.
action: tts.speak
target:
entity_id: tts.example
data:
media_player_entity_id: media_player.kitchen
message: "May the force be with you."
options:
preferred_format: mp3
preferred_sample_rate: 22050