UNPKG

aixblock-voice-ai-deepgram

Version:

A React component for real-time transcription and voice agent interactions using Deepgram APIs

24 lines (23 loc) 1.04 kB
import React from "react"; import { AgentState, ConnectionState, DeepgramError, DeepgramVoiceInteractionHandle, LLMResponse, ServiceType, TranscriptResponse, UserMessageResponse } from "../../types"; type VoiceAIProps = { voiceConfig: string; onReady?: (isReady: boolean) => void; onTranscriptUpdate?: (transcriptData: TranscriptResponse) => void; onAgentUtterance?: (utterance: LLMResponse) => void; onUserMessage?: (message: UserMessageResponse) => void; onError?: (error: DeepgramError) => void; deepgramRef: React.RefObject<DeepgramVoiceInteractionHandle>; onAgentStateChange?: (state: AgentState) => void; onConnectionStateChange?: (service: ServiceType, state: ConnectionState) => void; onPlaybackStateChange?: (isPlaying: boolean) => void; debug?: boolean; sleepOptions?: { autoSleep?: boolean; timeout?: number; wakeWords?: string[]; }; onAgentAudioUpdate?: (data: ArrayBuffer) => void; }; export declare const VoiceAI: React.FC<VoiceAIProps>; export {};