I am new to rhasspy but have already set up a working system with one satellite and a base. The base is running as the Home Assistant integraten which should handle all audio playback. This actually works and I can even start audio playback from my other systems (like HA) over MQTT.
But there is one problem: There seems to be no way to stop the active playback.
This is frustrating because I habe some long audio files that I want to play sometimes but stop when another event occurs.
I start the playback via MQTT using a topic like “hermes/audioServer/siteId/playBytes/uniqueId”.
There should be a topic like “hermes/audioServer/siteId/stop/” to cancel any active playback.
Correct. This is because the audio is published as one message.
There is no way to stop that, because the message arrives also in one buffer
But the audio is actually not intended for playing long audio files.
Although possible, it should mainly be used for (short) feedback messages and not for a 5 minute news bulletin (or something similar)
Well, the playback of the audio is possible to stop, but not the receiving. I was not very clear, sorry about that
But currently this is not such a functionality implemented, also because it was not designed to play large audio files
When the dialog manager has transferred the wav file from the TTS to the audio server, the session is closed even if the file has not yet been completely played by aplay. Aplay won’t quit because it’s piped to Rhasspy and relentlessly plays the wav file.
To stop this, you can push a new wav file to the aplay process via a new session, say or playbytes, overwriting the current output - in theory…
Well, this approach does not seem to work.
I already tried to send a request to play a short and completely silent wav stream. But this did not stop the current playback.