Speech Provider - v0.1.4
    Preparing search index...

    Class ElevenLabsUtterance

    An utterance implementation that uses the ElevenLabs API to synthesize speech.

    Implements

    Index

    Constructors

    Accessors

    Methods

    Constructors

    • Parameters

      • apiKey: string
      • voiceId: string
      • languageCode: string
      • text: string
      • cacheMaxAge: null | number = 3600
      • options: { normalizeVolume?: boolean } = {}

      Returns ElevenLabsUtterance

    Accessors

    • set onend(callback: () => void): void

      Set the callback for when the utterance finishes speaking

      Parameters

      • callback: () => void

      Returns void

    • set onstart(callback: () => void): void

      Set the callback for when the utterance starts speaking

      Parameters

      • callback: () => void

      Returns void

    Methods

    • Start speaking the utterance by fetching audio from ElevenLabs and playing it. If normalizeVolume is enabled, the audio will be processed to normalize its volume.

      Returns Promise<void>