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 {
    onvoiceschanged: ((this, ev) => any);
    paused: boolean;
    pending: boolean;
    speaking: boolean;
    addEventListener<K>(type, listener, options?): void;
    addEventListener(type, listener, options?): void;
    cancel(): void;
    dispatchEvent(event): boolean;
    getVoices(): SpeechSynthesisVoice[];
    pause(): void;
    removeEventListener<K>(type, listener, options?): void;
    removeEventListener(type, listener, options?): void;
    resume(): void;
    speak(utterance): void;
}

Hierarchy

  • EventTarget
    • SpeechSynthesis

Properties

onvoiceschanged: ((this, ev) => any)

Type declaration

paused: boolean
pending: boolean
speaking: boolean

Methods

  • Type Parameters

    • K extends "voiceschanged"

    Parameters

    Returns void

  • Parameters

    Returns void

  • Returns void

  • Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.

    Parameters

    • event: Event

    Returns boolean

  • Returns void

  • Type Parameters

    • K extends "voiceschanged"

    Parameters

    Returns void

  • Parameters

    Returns void

  • Returns void

  • Parameters

    Returns void

Generated using TypeDoc