import type { ProviderCallContext } from '../../types/lifecycle.js'; import type { SpeechRequest, SpeechResponse, TranscriptionRequest, TranscriptionResponse, VoiceProvider, VoiceProviderInfo } from '../../types/voice.js'; /** Options for the Gemini voice provider. */ export interface GoogleVoiceProviderConfig { /** Gemini API key, sent as `x-goog-api-key`. */ apiKey: string; /** API base URL. Defaults to `https://generativelanguage.googleapis.com/v1beta`. */ baseUrl?: string; /** The model that transcribes. Defaults to `gemini-3.8-flash`. */ transcriptionModel?: string; /** The model that speaks. Defaults to `gemini-3.8-flash-tts`. */ speechModel?: string; /** Voice used when a request names none, one of Gemini's prebuilt voices. Defaults to `Kore`. */ defaultVoice?: string; /** Headers added to every request. */ headers?: Record; /** Replaces the global `fetch`. */ fetch?: typeof fetch; } /** * Gemini speech-to-text and text-to-speech, through `generateContent`: a text model transcribes audio * it hears, and a speech model speaks text in one of Gemini's voices, as WAV or raw PCM. Experimental * until a live run is recorded. */ export declare class GoogleVoiceProvider implements VoiceProvider { private readonly config; /** Always `google`, with transcription and speech. */ readonly info: VoiceProviderInfo; constructor(config: GoogleVoiceProviderConfig); /** * Transcribes audio: its words, in the language spoken, and nothing else. `language` and `prompt` * guide the model; a request for timings is refused, since Gemini's transcript has none. */ transcribe(request: TranscriptionRequest, context?: ProviderCallContext): Promise; /** * Speaks text in one of Gemini's voices, as WAV, the default, or raw 16-bit PCM. `instructions`, and a * `speed` other than 1, direct the delivery as a system instruction, never spoken. */ speak(request: SpeechRequest, context?: ProviderCallContext): Promise; /** The audio as a part of the request: a Files API URI by reference, anything else read and sent inline. */ private audioPart; private read; private generate; }