I want to do a sub node to send voice messages to end user by using google_say.
It should provide the following features:
- Have a configurable mp3 sound as a signal to indicate the start of the message
- Have a configurable mp3 sound as a signal to indicate the end of the message
- saves and restores the state of the media player (continues with the original audio and restore volume)
- Have a queue in case a new message is submitted before the previous message has ended
At the moment i am facing an issue that I do not know how to solve: When i send a next message, before the previous message has ended the previous message will be canceled and the next message starts.
I do don’t find a way how the process of the flow waits until a message was played completely.
So my idea was to check the state of the media player. Unfortunately the media player state does not contain any indication, that a message is played.
Do you know how i can make my flow to check if a current message is playing or to wait until the message has been played?