import type { VoiceProvider } from '../types.js'; export type LocalSttEngine = 'whisper-cpp' | 'faster-whisper'; export type LocalTtsEngine = 'piper' | 'kokoro'; /** The voice.local.* config surface the provider reads live. */ export interface LocalVoiceConfigReader { (key: string): unknown; } /** Injectable process seam: run a binary, return stdout (text is fed via stdin when given). */ export type LocalEngineRunner = (input: { readonly binary: string; readonly args: readonly string[]; readonly stdinText?: string | undefined; readonly timeoutMs: number; }) => Promise<{ stdout: string; }>; interface LocalEngineConfig { readonly engine: string; readonly binary: string; readonly modelPath: string; } /** Resolve the managed install for a prefix (null when not provisioned / not managed). */ export type ManagedEngineResolver = (prefix: 'stt' | 'tts') => LocalEngineConfig | null; export interface LocalVoiceProviderOptions { readonly readConfig: LocalVoiceConfigReader; /** Injectable engine runner (scripted fixtures in tests). */ readonly runner?: LocalEngineRunner | undefined; /** Injectable existence check (tests). */ readonly fileExists?: ((path: string) => boolean) | undefined; /** * Resolve the managed (provisioned) engine for a prefix so a provisioned host * needs zero config. Config values always win; this only fills unset fields. */ readonly resolveManaged?: ManagedEngineResolver | undefined; } /** Create the local (free, offline) voice provider. */ export declare function createLocalVoiceProvider(options: LocalVoiceProviderOptions): VoiceProvider; export {}; //# sourceMappingURL=local.d.ts.map