SpeechSynthesisUtterance: pause event

Experimental

This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The pause event of the Web Speech API SpeechSynthesisUtterance object is fired when the utterance is paused part way through.

Bubbles No
Cancelable No
Interface SpeechSynthesisEvent
Event handler property onpause

Examples

You can use the pause event in an addEventListener method:

utterThis.addEventListener('pause', function(event) {
  console.log('Speech paused after ' + event.elapsedTime + ' milliseconds.');
});

Or use the onpause event handler property:

utterThis.onpause = function(event) {
  console.log('Speech paused after ' + event.elapsedTime + ' milliseconds.');
}

Specifications

Specification Status Comment
Web Speech API
The definition of 'speech synthesis utterance events' in that specification.
Draft

Browser compatibility

BCD tables only load in the browser

See also