MDN self-hosted library · e01.org

SpeechSynthesisEvent: utterance property

Web Speech API

Open notebook · 1 cells web-api-instance-property upstream source

Web Speech API

The utterance read-only property of the SpeechSynthesisUtterance interface returns the SpeechSynthesisUtterance instance that the event was triggered on.

Value

A SpeechSynthesisUtterance object.

Examples

utterThis.onpause = (event) => {
  const char = event.utterance.text.charAt(event.charIndex);
  console.log(
    `Speech paused at character ${event.charIndex} of "${event.utterance.text}", which is "${char}".`,
  );
};

Specifications

Browser compatibility

See also