ReadonlysupportedTrue if this browser supports speech synthesis at all
True while speech is paused
True while an utterance is currently being spoken (not counting paused speech)
Get the list of voices available for speech synthesis. On some browsers,
this list is empty until the browser fires its voiceschanged event, so
code that needs voices immediately on page load may need to also listen for
that event directly.
Pause the current utterance, if any
Resume a paused utterance, if any
Speak some text out loud. Utterances are queued by the browser, so
calling this while something is already speaking will not interrupt it;
call stop() first if you want to interrupt.
Optionallang?: stringA BCP 47 language tag (e.g. "en-US"), if you want to override the voice's default language
OptionalonDone?: () => voidCode to run once this utterance finishes speaking
OptionalonError?: (err: SpeechSynthesisErrorEvent) => voidCode to run if this utterance fails to speak
Optionalpitch?: numberVoice pitch, in [0, 2]. Defaults to 1 (normal pitch)
Optionalrate?: numberSpeaking rate, in [0.1, 10]. Defaults to 1 (normal speed)
The text to speak
Optionalvoice?: SpeechSynthesisVoiceA specific voice to use, from getVoices()
Optionalvolume?: numberVolume, in [0, 1]. Defaults to 1 (full volume)
Immediately stop the current utterance and clear the queue of any others
TextToSpeechDevice provides speech synthesis (text-to-speech) via the browser's SpeechSynthesis API. It does not queue or track individual utterances itself; the browser's own utterance queue handles that.