SpeechSynthesisEvent: utterance property
Baseline
Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since September 2022.
Thuộc tính chỉ đọc utterance của giao diện SpeechSynthesisUtterance trả về thực thể SpeechSynthesisUtterance mà sự kiện được kích hoạt trên đó.
Giá trị
Một đối tượng SpeechSynthesisUtterance.
Ví dụ
js
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}".`,
);
};
Thông số kỹ thuật
| Specification |
|---|
| Web Speech API> # dom-speechsynthesisevent-utterance> |