Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

SpeechSynthesis

This Web Speech API interface is the controller interface for the speech service; this can be used to retrieve information about the synthesis voices available on the device, start and pause speech, and other commands besides.

interface SpeechSynthesis extends EventTarget {
onvoiceschanged: ((this: SpeechSynthesis, ev: Event) => any) | null;
readonly paused: boolean;
readonly pending: boolean;
readonly speaking: boolean;
addEventListener<K extends keyof SpeechSynthesisEventMap>(
type: K,
listener: (this: SpeechSynthesis, ev: SpeechSynthesisEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void;
addEventListener(
type: string,
options?: boolean | AddEventListenerOptions,
): void;
cancel(): void;
getVoices(): SpeechSynthesisVoice[];
pause(): void;
removeEventListener<K extends keyof SpeechSynthesisEventMap>(
type: K,
listener: (this: SpeechSynthesis, ev: SpeechSynthesisEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void;
removeEventListener(
type: string,
options?: boolean | EventListenerOptions,
): void;
resume(): void;
speak(utterance: SpeechSynthesisUtterance): void;
}
var SpeechSynthesis: {
prototype: SpeechSynthesis;
new (): SpeechSynthesis;
}
;

§Extends

§Properties

§
onvoiceschanged: ((this: SpeechSynthesis, ev: Event) => any) | null
[src]
§
readonly paused: boolean
[src]
§
readonly pending: boolean
[src]
§
readonly speaking: boolean
[src]

§Methods

§
addEventListener<K extends keyof SpeechSynthesisEventMap>(
type: K,
listener: (this: SpeechSynthesis, ev: SpeechSynthesisEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void
[src]
§
addEventListener(
type: string,
options?: boolean | AddEventListenerOptions,
): void
[src]
§
cancel(): void
[src]
§
pause(): void
[src]
§
removeEventListener<K extends keyof SpeechSynthesisEventMap>(
type: K,
listener: (this: SpeechSynthesis, ev: SpeechSynthesisEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void
[src]
§
removeEventListener(
type: string,
options?: boolean | EventListenerOptions,
): void
[src]
§
resume(): void
[src]
§
speak(utterance: SpeechSynthesisUtterance): void
[src]