SpeechSynthesisUtterance: boundary event

Experimental

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

The boundary event of the Web Speech API is fired when the spoken utterance reaches a word or sentence boundary.

Bubbles No
Cancelable No
Interface SpeechSynthesisEvent
Event handler onboundary

Examples

You can use the boundary event in an addEventListener method:

utterThis.addEventListener('boundary', function(event) {
  console.log(event.name + ' boundary reached after ' + event.elapsedTime + ' milliseconds.');
});

Or use the onboundary event handler property:

utterThis.onboundary = function(event) {
  console.log(event.name + ' boundary reached 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