UNPKG

@juspay/neurolink

Version:

Universal AI Development Platform with working MCP integration, multi-provider support, voice (TTS/STT/realtime), and professional CLI. 58+ external MCP servers discoverable, multimodal file processing, RAG pipelines. Build, test, and deploy AI applicatio

53 lines (52 loc) 1.55 kB
/** * 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<RealtimeSession>; disconnect(): Promise<void>; sendAudio(audio: Buffer | RealtimeAudioChunk): Promise<void>; sendText(text: string): Promise<void>; triggerResponse(): Promise<void>; cancelResponse(): Promise<void>; /** * 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; }