This example shows how to use callbacks with responsiveVoice.speak().

You can add callbacks to be triggered in some speech related events. Supported callbacks are:

onstart: Speech started playing.
onend: Speech ended playing.
onerror: There was some error.
onpause*: Speech was paused.
onresume*: Speech started playing after being paused.

*Only available in Chrome.

This is example code to add just before the closing body tag.

Keywords: callback, events

Go top