/** * Voice-note speech-to-text (OpenAI transcription). * * Same injection shape as `synthesize.ts`: the client, model and clamp come * from the host, so nothing here reads env or imports a transport. * * Contract mirrors the synthesizer: null on ANY failure (disabled, empty * audio, API error, empty transcript), never a throw — callers fall back to a * text reply rather than silence. * * `openai` is only ever imported as a type. The upload is built from the * platform `File` global rather than the SDK's `toFile` helper, which would be * a value import and make an optional peer dependency load-bearing at module * load time. */ import type OpenAI from "openai"; export interface TranscriberConfig { /** Lazy OpenAI client — injected so this module never reads env. */ client: () => OpenAI; /** Master gate; false makes the transcriber a no-op null. */ enabled: () => boolean; /** Transcription model. */ model?: string; /** Clamp on the returned transcript before it enters the answer path. */ maxChars?: number; } export declare const DEFAULT_TRANSCRIPT_MAX_CHARS = 2000; /** Transcribe audio bytes, or null when no usable transcript came back. */ export type Transcriber = (bytes: Uint8Array) => Promise; /** * Build a transcriber: Ogg/Opus bytes → transcript | null. * * The model auto-detects the spoken language, so no language hint is needed. */ export declare function createTranscriber(config: TranscriberConfig): Transcriber;