Node red dashboard audio wish

Nope. Seems that I will need to handle the speech synthesis differently:

  • It should be stopped this way.
  • And to detect the end of the speech playback, I think I should use this event.

But for some reason I get no sound at all using TTS, so a bit difficult to test :woozy_face: Don't know what is wrong, because I have it on all my Raspberry's (so not a result of my dashboard changes)...

Don't know if my demo was not clear, but when you send a msg.reset=true then the playback will already be stopped. So that functionality is also part of this pull request ... Do you prefer perhaps msg.stop instead of msg.reset?

In the current version I haven't implemented pause or resume:

  • Web audio can only be started or stopped. However when 'pause' or 'resume' is required, we would need to remember ourselves the time offset (where we have interrupted the fragment). Like in this Codepen example .
  • On the other hand, the speech synthesis seem to have pause and resume methods out of the box.