← Back to Examples

Events & Callbacks

Speak one utterance and watch every public event and per-call callback fire.

Input

Per-call callbacks (passed to speak())

onstartwaiting…
onboundary0 fires
onendwaiting…
onerrorwaiting…

Global events (responsiveVoice.addEventListener)

OnReadywaiting…
OnVoiceResolvedwaiting…
OnStartwaiting…
OnPartStart0 fires
OnPartEnd0 fires
OnPausewaiting…
OnResumewaiting…
OnEndwaiting…
OnErrorwaiting…
Initializing…

Event reference

OnReady
Fires once when the engine has loaded voices and is ready to speak.
OnVoiceResolved
The requested voice has been resolved to a concrete native or fallback voice.
OnStart
Speech has started for the current utterance.
OnEnd
Speech finished naturally (not cancelled).
OnPause
Playback paused via responsiveVoice.pause(). Browsers auto-cancel after ~60s.
OnResume
Playback resumed via responsiveVoice.resume().
OnError
Synthesis failed; payload is { error: { message } }.
OnPartStart / OnPartEnd
Long text is split into parts; these fire per chunk with { partIndex, totalParts, text }.