/** * Google Gemini Live Voice API Handler * * Implementation of bidirectional voice communication using Gemini's Live API. * * @module voice/providers/GeminiLive */ import { BaseRealtimeHandler } from "../RealtimeVoiceAPI.js"; import type { TTSAudioFormat, RealtimeAudioChunk, RealtimeConfig, RealtimeSession } from "../../types/index.js"; /** * Google Gemini Live Voice API Handler * * Implements bidirectional voice communication with Gemini's Live API. * * @see https://ai.google.dev/gemini-api/docs/live */ export declare class GeminiLive extends BaseRealtimeHandler { readonly name = "gemini-live"; private readonly apiKey; private ws; private audioChunkIndex; private pendingFunctionCalls; constructor(apiKey?: string); isConfigured(): boolean; getSupportedFormats(): TTSAudioFormat[]; connect(config: RealtimeConfig): Promise; disconnect(): Promise; sendAudio(audio: Buffer | RealtimeAudioChunk): Promise; sendText(text: string): Promise; triggerResponse(): Promise; cancelResponse(): Promise; /** * Send setup message with configuration */ private sendSetup; /** * Wait for setup complete message */ private waitForSetupComplete; /** * Handle incoming WebSocket messages */ private handleMessage; /** * Parse audio format from MIME type */ private parseAudioFormat; /** * Handle function call from model */ private handleFunctionCall; }