Amazon Echo Control TTS queing

I am trying to improve the notification scripted subsytem to make it more reactive and clever (well… :woozy_face:). For speech notification, it uses the TTS channel of the AmazonEchoControl.
I have use cases where notifications are sent repeatedly (alarms for example) and where speech is (or should be) synchronize with color bulb and OSD notifications. So I have 2 issues:

  • when several message are sent, they seem to be queued whereas I would prefer the next messages either to be discarded or to interrupt the on-going one. Is this actual queuing behavior performed by Alexa server or by the binding itself? And is there any possibility to change this to [option 1] interrupt an on-going message or [option 2] to know if the speech related to a TTS command has been completed or [option 3] to get the duration to the speech that is being spoken?
  • There is a significant delay (2-3 secs) between the myecho_TTS.sendCommand("My message") and the actual speech. Is this totally due to Alexa server or is the binding queuing on any way the TTS it receives?
  • Any way to improve this by using a direct Alexa API call ?

Thank you!

I found an ugly workaround: on-going TTS get interrupted by a speech triggered from an Alexa routine.
In my notification subsystem, higher priority messages (which are subject to interrupt an on-going message) are prefixed by “Warning”, “Alert”, “Error”. So I created routines speaking only the prefix for each. And I trigger them before the actual TTS message.

That is ugly but works barely…