AI Assistant Module
Updated: 2026-01-19 09:16:42
AI Assistant Module
The AI Assistant module provides intelligent conversation capabilities, enabling real-time Q&A interactions between viewers and the AI assistant. It optionally supports a digital human avatar and offers audio synthesis and recognition features.
Features
- Intelligent Q&A: Interact with the AI assistant using natural language to receive real-time responses.
- Digital Human Support: Optionally pair with a digital human avatar for a more intuitive interactive experience.
- Chat History: Save and query conversation history with the AI assistant.
- Audio Synthesis: Convert text to speech, supporting custom speech rate and voice style.
- Speech Recognition: Support audio file transcription to text, allowing users to ask questions via voice input.
Mode Description
The AI assistant supports two usage modes:
Standalone Mode
Standalone mode does not require user login information and authenticates via aiAssistantCode and aiAssistantToken. It is suitable for independent AI assistant pages or application scenarios.
watchAICore.aiAssistant.setupAIAssistant(
{
aiAssistantCode: 'your-assistant-code',
aiAssistantToken: 'your-assistant-token',
},
{ independent: true },
);
Non-Standalone Mode
Non-standalone mode relies on user login information and uses the viewer's user authentication for chatting. It is suitable for scenarios integrated with the live streaming viewing page.
watchAICore.aiAssistant.setupAIAssistant({
aiAssistantCode: 'your-assistant-code',
});
API Method Overview
| API Method | Description |
|---|---|
| supportAIAssistantChat | Whether the AI assistant chat feature is supported |
| getAIAssistantConfig | Get AI assistant related configuration |
| getAIAssistantInfo | Get AI assistant information |
| setupAIAssistant | Initialize the AI assistant |
| sendAIQuestionMsg | Send an AI question message |
| getAIAssistantChatHistory | Get AI assistant chat history |
| createAiAssistantAudioTask | Create an AI assistant audio synthesis task |
| getAiAssistantAudioTaskResult | Get the result of an AI assistant audio synthesis task |
| recognizeAudioBlobToText | Recognize audio and convert to text |
