tjbot-ce - v3.0.0
    Preparing search index...

    Class STTController

    STT controller manages speech-to-text synthesis and engine lifecycle. STT engine is eagerly initialized during setupMicrophone() and cached for reuse.

    Index

    Constructors

    Methods

    • Clean up STT resources.

      Returns Promise<void>

    • Initialize the STT backend Called during setupMicrophone to eagerly load STT engine

      Parameters

      • config: ListenConfig

        Configuration object with backend, IBM settings, and Sherpa settings

      Returns Promise<void>

    • Transcribe audio from a microphone stream. Lazily initializes the STT engine on first call. Manages the microphone lifecycle (start/stop) internally.

      Parameters

      • Optionaloptions: {
            abortSignal?: AbortSignal;
            onFinalResult?: (text: string) => void;
            onPartialResult?: (text: string) => void;
        }

      Returns Promise<string>

      The transcribed text