Class default

Hierarchy

  • default

Constructors

Properties

effects: Effect[] = []
options: SpeechOptions = ...
ready: boolean = ...
speech: SpeechSynthesis = window.speechSynthesis
utter: null | SpeechSynthesisUtterance = null
voice: undefined | SpeechSynthesisVoice = undefined

Methods

  • Forced cancellation of all broadcasts, and immediate cancellation of those being broadcast

    Returns void

  • get current utter

    Returns null | SpeechSynthesisUtterance

    result - utter: SpeechSynthesisUtterance

  • get voice

    Returns Promise<undefined | SpeechSynthesisVoice>

    result voice: SpeechSynthesisVoice

  • init

    Returns Promise<unknown>

  • Suspension of all broadcasts and immediate cancellation of those being broadcast

    Returns void

  • Remove unconsumed speak

    Parameters

    • effectKey: symbol

      key of effect

    Returns boolean

    result - cancellation result true=Cancellation success false=Broadcast content not found or broadcast consumed

  • Resume all broadcasts and immediately cancel those being broadcast

    Returns void

  • speak

    Parameters

    • content: string

      speak text

    • utterOptions: Partial<Pick<SpeechSynthesisUtterance, "text" | "lang" | "onerror" | "onpause" | "onboundary" | "onend" | "onmark" | "onresume" | "onstart" | "pitch" | "rate" | "voice" | "volume">> = {}

      utter options: UtterOptions

    Returns symbol

    result - effectKey: symbol

  • do speaking

    Returns void

Generated using TypeDoc