@airsurfer09/web-handsfree
Version:
A React package for integrating Convai's AI-powered voice assistants with LiveKit for real-time audio/video conversations
28 lines • 917 B
TypeScript
import { Room } from "livekit-client";
/**
* Hook for sending user text messages to Convai.
*
* Sends programmatic text messages that are processed by the AI assistant
* but not displayed in the chat interface.
*
* @param {Room} room - LiveKit room instance
* @param {string} participantSid - Participant session ID
* @returns {Object} Object containing sendUserTextMessage function
*
* @example
* ```tsx
* function ChatComponent() {
* const { sendUserTextMessage } = useUserTextMessageSender(room, participantSid);
*
* const handleSendMessage = () => {
* sendUserTextMessage("Hello, how are you?");
* };
*
* return <button onClick={handleSendMessage}>Send Message</button>;
* }
* ```
*/
export declare const useUserTextMessageSender: (room: Room, participantSid: string) => {
sendUserTextMessage: (text: string) => void;
};
//# sourceMappingURL=useUserTextMessageSender.d.ts.map