UNPKG

livekit-voice-assistant

Version:

A customizable voice assistant component built with LiveKit

29 lines (28 loc) 1.16 kB
import React from 'react'; import { AgentState } from '@livekit/components-react'; import '../styles/globals.css'; export interface VoiceAssistantProps { /** API endpoint for connection details */ connectionDetailsEndpoint?: string; /** User name to display */ userName?: string; /** Agent ID for identification */ agentId?: string; /** User ID for identification */ userId?: string; /** Custom button text */ buttonText?: string; /** Custom styles for the button */ buttonClassName?: string; /** Custom styles for the container */ containerClassName?: string; /** Callback when error occurs */ onError?: (error: Error) => void; /** Callback when connected */ onConnected?: () => void; /** Callback when disconnected */ onDisconnected?: () => void; /** Callback when state changes */ onStateChange?: (state: AgentState) => void; } export declare function VoiceAssistant({ connectionDetailsEndpoint, userName, agentId, userId, buttonText, buttonClassName, containerClassName, onError, onConnected, onDisconnected, onStateChange, }: VoiceAssistantProps): React.JSX.Element;