Skip to main content
Module

x/evt/lib/types/index.ts>dom.SpeechSynthesis

💧EventEmitter's typesafe replacement
Go to Latest
interface dom.SpeechSynthesis
implements EventTarget
import { type dom } from "https://deno.land/x/evt@v2.4.13/lib/types/index.ts";
const { SpeechSynthesis } = dom;

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.

Properties

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

Methods

cancel(): void
getVoices(): SpeechSynthesisVoice[]
pause(): void
resume(): void
speak(utterance: SpeechSynthesisUtterance): void
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
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