import type { SuperagentVoiceRecorderAdapter } from './useSuperagentRuntime'; export type SpeechToTextState = 'idle' | 'recording' | 'processing'; export type UseSpeechToTextResult = { state: SpeechToTextState; error: string | null; /** idle → record; recording → stop + transcribe (resolves to the transcript). */ toggle: () => Promise; /** Stop and discard any in-flight recording without transcribing (e.g. on composer unmount). */ cancel: () => Promise; /** Live mic level (0..1) for the recording waveform, when the recorder can meter. */ getLevel?: () => number; }; /** * Tap-to-start / tap-to-stop dictation state machine. The recorder adapter (host) * owns the native capture; this hook owns the state, the upload, and error copy. * Branchable logic lives in `speechToTextUtils.ts` (unit-tested) — this is just the * RN-stateful wiring, mirroring how `onStartLiveVoice` sequences its audio adapter. */ export declare function useSpeechToText({ baseUrl, getAccessToken, getHeaders, recorder, }: { baseUrl: string; getAccessToken: () => Promise | string | null | undefined; getHeaders?: () => Promise | undefined> | Record | undefined; recorder: SuperagentVoiceRecorderAdapter; }): UseSpeechToTextResult; //# sourceMappingURL=useSpeechToText.d.ts.map