Before I issue a TTS command, I’d like to play a kind of beep on my Sonos speakers to attract attention. For whatever reason, there is a pause of 6 or even more seconds between the beep and the speech output.
I find this delay quite annoying because it is far too long. Does anyone have any idea how to solve this?
My setup looks like this:
say.items
String SayCommand <text>
say.rules (simplified)
rule "Say something"
when
Item SayCommand received update
then
var String audioSink = "sonos:PLAY5:miba"
logInfo("say.rules", "Say: \"{}\" on audio sink [{}]", SayCommand.state, audioSink)
playSound(audioSink, "doorbell.mp3")
say(SayCommand.state, "voicerss:deDE", audioSink)
end
Call
SayCommand.postUpdate("Attention - this is the Say command")
I would say the total length of the pause including the is 20 seconds, which is the default setting for the notification sound length ( name of property translated from German!).
If you shorten that your tts notification migth get cut off at the end!
You could get around that by “mixing” the doorbell and the TTS sound into one file
I’m sorry, but no.
If you have both soundfiles ( doorbell and TTS) and both are of the same type there could be a way. I’m using VoiceRSS, this service does store the files in a cache folder,m I have no idea about the other services.
I have understood that it is not easy to play the sound and the spoken text one right after the other. If there are already generated (or cached) sound files they may be concatenated somehow. Is that right? However, this would not be a flexible solution, especially if the spoken text is generated dynamically.
Hi Michael,
how did you solve this as I’m facing the same issue. I want to break the Radio-Stream, play notification sound, say warning and continue playing the Radio Stream. Unfortunately the delay between the playSound() and say() is too long so say interrupts the Radio Stream.
Thanks for any hint
Frieso