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 {
    lang: string;
    onboundary: ((this, ev) => any);
    onend: ((this, ev) => any);
    onerror: ((this, ev) => any);
    onmark: ((this, ev) => any);
    onpause: ((this, ev) => any);
    onresume: ((this, ev) => any);
    onstart: ((this, ev) => any);
    pitch: number;
    rate: number;
    text: string;
    voice: SpeechSynthesisVoice;
    volume: number;
    addEventListener<K>(type, listener, options?): void;
    addEventListener(type, listener, options?): void;
    dispatchEvent(event): boolean;
    removeEventListener<K>(type, listener, options?): void;
    removeEventListener(type, listener, options?): void;
}

Hierarchy

  • EventTarget
    • SpeechSynthesisUtterance

Properties

lang: string
onboundary: ((this, ev) => any)

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

pitch: number
rate: number
text: string
volume: number

Methods

  • 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

Generated using TypeDoc