SpeechSynthesisEvent: свойство utterance
Свойство utterance только для чтения интерфейса SpeechSynthesisUtterance возвращает экземпляр SpeechSynthesisUtterance, на котором было вызвано событие.
Значение
Объект SpeechSynthesisUtterance.
Примеры
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}".`,
);
};
Спецификации
| Спецификация |
|---|
| Web Speech API # dom-speechsynthesisevent-utterance |
Совместимость с браузерами
| Рабочие столы | Мобильные устройства | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox для Android | Opera Android | Safari на IOS | Samsung Internet | WebView Android | |
utterance |
33 | 14 | 49 | 21 | 16 | 33 | 62 | Нет | 16 | 3.0 | Нет |
См. также
© 2005–2024 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisEvent/utterance