SpeechSynthesisUtterance
This Web Speech API interface represents a speech request. It contains the content the speech service should read and information about how to read it (e.g. language, pitch and volume.)
interface SpeechSynthesisUtterance extends EventTarget {
lang: string;
onboundary: ((this: SpeechSynthesisUtterance, ev: SpeechSynthesisEvent) => any) | null;
onend: ((this: SpeechSynthesisUtterance, ev: SpeechSynthesisEvent) => any) | null;
onerror: ((this: SpeechSynthesisUtterance, ev: SpeechSynthesisErrorEvent) => any) | null;
onmark: ((this: SpeechSynthesisUtterance, ev: SpeechSynthesisEvent) => any) | null;
onpause: ((this: SpeechSynthesisUtterance, ev: SpeechSynthesisEvent) => any) | null;
onresume: ((this: SpeechSynthesisUtterance, ev: SpeechSynthesisEvent) => any) | null;
onstart: ((this: SpeechSynthesisUtterance, ev: SpeechSynthesisEvent) => any) | null;
pitch: number;
rate: number;
text: string;
voice: SpeechSynthesisVoice | null;
volume: number;
addEventListener<K extends keyof SpeechSynthesisUtteranceEventMap>(
type: K,
listener: (this: SpeechSynthesisUtterance, ev: SpeechSynthesisUtteranceEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void;addEventListener(
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | AddEventListenerOptions,
): void;removeEventListener<K extends keyof SpeechSynthesisUtteranceEventMap>(
type: K,
listener: (this: SpeechSynthesisUtterance, ev: SpeechSynthesisUtteranceEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void;removeEventListener(
}type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | EventListenerOptions,
): void;var SpeechSynthesisUtterance: {
prototype: SpeechSynthesisUtterance;
new (text?: string): SpeechSynthesisUtterance;
};§Extends
§Properties
§
onboundary: ((this: SpeechSynthesisUtterance, ev: SpeechSynthesisEvent) => any) | null
[src]§
onend: ((this: SpeechSynthesisUtterance, ev: SpeechSynthesisEvent) => any) | null
[src]§
onerror: ((this: SpeechSynthesisUtterance, ev: SpeechSynthesisErrorEvent) => any) | null
[src]§
onmark: ((this: SpeechSynthesisUtterance, ev: SpeechSynthesisEvent) => any) | null
[src]§
onpause: ((this: SpeechSynthesisUtterance, ev: SpeechSynthesisEvent) => any) | null
[src]§
onresume: ((this: SpeechSynthesisUtterance, ev: SpeechSynthesisEvent) => any) | null
[src]§
onstart: ((this: SpeechSynthesisUtterance, ev: SpeechSynthesisEvent) => any) | null
[src]§
voice: SpeechSynthesisVoice | null
[src]§Methods
§
addEventListener<K extends keyof SpeechSynthesisUtteranceEventMap>(
[src]type: K,
listener: (this: SpeechSynthesisUtterance, ev: SpeechSynthesisUtteranceEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void§
addEventListener(
[src]type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | AddEventListenerOptions,
): void§
removeEventListener<K extends keyof SpeechSynthesisUtteranceEventMap>(
[src]type: K,
listener: (this: SpeechSynthesisUtterance, ev: SpeechSynthesisUtteranceEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void§
removeEventListener(
[src]type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | EventListenerOptions,
): void