Index

Type aliases

Action

Action: "stop" | "play" | "pause" | "playpause"

Supported TTS control actions

Functions

doAction

  • doAction(action: Action): void
  • Control any reading in progress

    Note: pause() doesn't seem to work, so play, pause and playpause arent going to be very useful right now

    Parameters

    Returns void

getVoiceFromName

  • getVoiceFromName(name: string | "default"): SpeechSynthesisVoice
  • Find the voice object for a voice name

    Parameters

    • name: string | "default"

    Returns SpeechSynthesisVoice

    voice from the TTS API, or undefined

listVoices

  • listVoices(): string[]
  • Get a list of the installed TTS voice names, by which users can refer to the vocies for use in config

    Returns string[]

    list of voice names

readText

  • readText(text: string): void
  • Read the text using the borwser's HTML5 TTS API

    Parameters

    • text: string

      the text to read out

    Returns void