You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was thinking to implement a simple mqtt media player on linux which could be use to play TTS messages from Home Assistant.
It's very simple, HA renders the TTS stream as an MP3 available on its own server via http protocol, so something like mplayer -volume 80 http://home.assistant.address:8123/api/tts_proxy/6a0efdf280bf8c79a.mp3
shot from the command line would play the sound.
The goal is to be able to get the URL from the payload because that changes every time, at every message spoken.
So with mqtt-launcher we would need a variable containing the payload to be accessed in the program & arguments part of the config. For example sending the URL above to the topic mybox/mediaplay could be decoded with a special key like @payload@:
# topic payload value program & arguments"mybox/mediaplay": {'@payload@': [ 'mplayer', '-volume', '80', '@payload@'],},
Or anything similar...
What do you think?
The text was updated successfully, but these errors were encountered:
Hi @jpmens thanks for this great experiment!
I was thinking to implement a simple mqtt media player on linux which could be use to play TTS messages from Home Assistant.
It's very simple, HA renders the TTS stream as an MP3 available on its own server via http protocol, so something like
mplayer -volume 80 http://home.assistant.address:8123/api/tts_proxy/6a0efdf280bf8c79a.mp3
shot from the command line would play the sound.
The goal is to be able to get the URL from the payload because that changes every time, at every message spoken.
So with mqtt-launcher we would need a variable containing the payload to be accessed in the
program & arguments
part of the config. For example sending the URL above to the topicmybox/mediaplay
could be decoded with a special key like@payload@
:Or anything similar...
What do you think?
The text was updated successfully, but these errors were encountered: