# Node red dashboard audio wish

**URL:** <https://discourse.nodered.org/t/node-red-dashboard-audio-wish/4798>\
**Category:** Dashboard\
**Created:** [12 November 2018 13:31 UTC](https://discourse.nodered.org/t/node-red-dashboard-audio-wish/4798 "2018-11-12T13:31:04Z")\
**Posts on this page:** 1\
**Showing post:** 20

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [13 November 2018 22:14 UTC](https://discourse.nodered.org/t/node-red-dashboard-audio-wish/4798/20 "2018-11-13T22:14:49Z")

</div>

> [@RogierQ](#):
>
> Does it also work with tts?

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

- It should be stopped this [way](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesis/cancel).
- And to detect the end of the speech playback, I think I should use [this](https://developer.mozilla.org/en-US/docs/Web/Events/soundend) event.

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

> [@dceejay](#):
>
> This also leaves the possibility free for "stopped" if there was ever to be a stop

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`?

> [@dceejay](#):
>
> or maybe "paused" etc

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](https://codepen.io/ianmcgregor/pen/EjdJZZ) .
- On the other hand, the speech synthesis seem to have pause and resume [methods](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesis#Methods) out of the box.

---

_[View the full topic](https://discourse.nodered.org/t/node-red-dashboard-audio-wish/4798)._
