files/en-us/web/api/speechsynthesisevent/index.md
{{APIRef("Web Speech API")}}
The SpeechSynthesisEvent interface of the Web Speech API contains information about the current state of {{domxref("SpeechSynthesisUtterance")}} objects that have been processed in the speech service.
{{InheritanceDiagram}}
SpeechSynthesisEvent.The SpeechSynthesisEvent interface also inherits properties from its parent interface, {{domxref("Event")}}.
charIndex position, if the speaking engine supports it. Returns 0 if the speaking engine can't provide the information.The SpeechSynthesisEvent interface also inherits methods from its parent interface, {{domxref("Event")}}.
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}".`,
);
};
utterThis.onboundary = (event) => {
console.log(
`${event.name} boundary reached after ${event.elapsedTime} seconds.`,
);
};
{{Specifications}}
{{Compat}}