voicebot-react-native-expo
Version:
This is a voicebot-react-native package of Kipps AI voice bot for React Native Expo
27 lines • 944 B
TypeScript
import { RemoteParticipant } from 'livekit-client';
import { ReceivedTranscriptionSegment, TrackReference } from '@livekit/components-core';
/**
* @beta
*/
export type AgentState = 'disconnected' | 'connecting' | 'initializing' | 'listening' | 'thinking' | 'speaking';
/**
* @beta
*/
export interface VoiceAssistant {
agent: RemoteParticipant | undefined;
state: AgentState;
audioTrack: TrackReference | undefined;
agentTranscriptions: ReceivedTranscriptionSegment[];
agentAttributes: RemoteParticipant['attributes'] | undefined;
}
/**
* This hook looks for the first agent-participant in the room.
* @remarks This hook requires an agent running with livekit-agents \>= 0.9.0
* @example
* ```tsx
* const { state, audioTrack, agentTranscriptions, agentAttributes } = useVoiceAssistant();
* ```
* @beta
*/
export declare function useVoiceAssistant(): VoiceAssistant;
//# sourceMappingURL=useVoiceAssistant.d.ts.map