export declare const SPEECH_NO_TEXT_ERROR = "No speech detected. Please try again."; export declare const SPEECH_RATE_LIMIT_ERROR = "Too many requests. Please wait a moment and try again."; export declare const SPEECH_TRANSCRIBE_FAILED_ERROR = "Failed to transcribe audio. Please try again."; export type SpeechToTextFile = { uri: string; mimeType?: string; name?: string; }; export declare function transcribeAudio({ authToken, baseUrl, file, headers, }: { authToken: string; baseUrl: string; file: SpeechToTextFile; headers?: Record; }): Promise; /** Elapsed-recording label for the dictation bar, e.g. 0:07, 1:32. */ export declare function formatRecordingDuration(totalSeconds: number): string; /** * Fast-attack / slow-decay envelope for waveform levels: a loud sample snaps the * display up immediately, silence lets it fall off gradually — the standard * metering ballistics that keep a voice waveform from flickering. */ export declare function smoothLevel(previousDisplay: number, sample: number, decay?: number): number; /** Map a 0..1 level onto a waveform bar height in px. */ export declare function levelToWaveHeight(level: number, minHeight: number, maxHeight: number): number; /** * Synthetic mic-level source for hosts whose recorder can't meter (and the web * demo without mic permission): a bounded random walk with occasional speech-like * bursts, so the waveform still reads as alive. `random` is injectable for tests. */ export declare function createSyntheticLevelSource(random?: () => number): () => number; //# sourceMappingURL=speechToTextUtils.d.ts.map