Baseline Widely available
The charIndex
read-only property of the SpeechSynthesisUtterance
interface returns the index position of the character in SpeechSynthesisUtterance.text
that was being spoken when the event was triggered.
A number.
ExamplesutterThis.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
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.3