Wactorz JS
    Preparing search index...

    Class VoiceInput

    Index

    Constructors

    Properties

    onAmbientStop: (() => void) | null = null

    Called when ambient listening stops permanently (permission denied, no mic).

    onError: ((message: string) => void) | null = null

    Called when a user-visible PTT error occurs.

    onStop: (() => void) | null = null

    Called when PTT recording stops for any reason.

    onTranscript: TranscriptCallback | null = null

    Called whenever a PTT transcript (partial or final) is available.

    onWakeWord: ((textAfter: string) => void) | null = null

    Called when the wake word is detected. textAfter is any speech that followed the keyword in the same utterance (may be empty).

    Accessors

    Methods

    • Start PTT recording. Pauses ambient listening while recording; ambient resumes automatically when recording ends.

      Returns Promise<boolean>

    • Start always-on wake-word listening. Returns false if the API is unavailable or already in ambient mode.

      Parameters

      • wakeWord: string = "computer"

      Returns boolean