SpeechSynthesisEvent.elapsedTime

Experimental

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

The elapsedTime read-only property of the SpeechSynthesisUtterance interface returns the elapsed time in seconds after the SpeechSynthesisUtterance.text started being spoken that the event was triggered at.

Syntax

event.elapsedTime;

Value

A float.

Examples

utterThis.onboundary = function(event) {
  console.log(event.name + ' boundary reached after ' + event.elapsedTime + ' seconds.');
}

Specifications

Specification
Web Speech API
# dom-speechsynthesisevent-elapsedtime

Browser compatibility

BCD tables only load in the browser

See also