/** * OpenAI speech services: TTS (text-to-speech) and Whisper transcription. * * Extracted from openai.ts for modular decomposition (Phase 3B). */ /** Valid TTS voice names. */ export declare const TTS_VOICES: readonly ["alloy", "echo", "fable", "onyx", "nova", "shimmer"]; export type TTSVoice = (typeof TTS_VOICES)[number]; /** * Convert text to speech using OpenAI TTS API. * Returns OGG Opus audio suitable for Telegram's sendVoice. */ export declare function textToSpeech(text: string, apiKey: string, voice?: TTSVoice): Promise; /** * Transcribe an audio buffer using an OpenAI-compatible Whisper endpoint. * * Provider is swappable via env vars (all optional, default to OpenAI): * TRANSCRIPTION_BASE_URL e.g. https://api.groq.com/openai/v1 * TRANSCRIPTION_API_KEY provider key (falls back to the passed key) * TRANSCRIPTION_MODEL e.g. whisper-large-v3 (default: whisper-1) * * @param audioBuffer Raw audio content (OGG Opus from Telegram voice messages). * @param apiKey Fallback API key (used when TRANSCRIPTION_API_KEY is unset). * @param filename Upload filename (extension drives Whisper's format sniffing). * @param audioSeconds Clip duration, when known — used for cost metering only. * @param threadId Originating thread, when known — used for usage attribution only. * @returns The transcribed text (empty string if no speech detected). */ export declare function transcribeAudio(audioBuffer: Buffer, apiKey: string, filename?: string, audioSeconds?: number, threadId?: number): Promise; //# sourceMappingURL=speech.d.ts.map