Set ASR Hot Words
In certain scenarios, such as handling character names, user IDs or function names, you often encounter terms outside a standard vocabulary. To boost ASR accuracy, you can define temporary hot words.
The hot word feature lets you set these terms per AI-agent instance, so that every time you start a voice call, you can supply conversation-specific hot words to improve recognition of those specialized words.
Quick Start
You can set the hot word list through the HotWord
parameter in the ASR
section when registering an AI agent or creating an AI agent instance.
HotWord Usage Instructions
- The format for hotwords is: "hotword|weight".
- Each individual hotword should not exceed 30 characters, with weight [1-11]. For example: "ZEGOCLOUD|5" or "ASR|11".
- Multiple hotwords should be separated by English commas and combined into one string, supporting up to 128 hotwords. For example: "ZEGOCLOUD|10, real-time interaction|5, ASR|11".
- Hotwords can not contain spaces. Wrong: "ZEGOCLOUD RTC|10".
Note
When the hot word weight is set to 11, the current hot word will be upgraded to a super hot word. It is recommended to only set important and necessary hot words to 11. Setting too many hot words with a weight of 11 will affect the overall character accuracy rate.
Usage Example
Below is an example of setting "ZEGOCLOUD" as a hotword.
{
"AgentId": "xiaozhi",
"AgentConfig": {
"Name": "Xiao Zhi",
"LLM": {
"Url": "https://ark.cn-beijing.volces.com/api/v3/chat/completions",
"ApiKey": "zego_test", // your api key (zego_test can be used during the integration testing period (within 2 weeks of AI Agent service activation))
"Model": "doubao-lite-32k-240828",
"SystemPrompt": "You are Xiaozhi, an adult woman, a companion assistant **created by ZEGOClOUD**. knowledgeable in both astronomy and geography, intelligent, wise, enthusiastic, and friendly. \nDialogue requirements: 1. Dialogue with users according to the requirements of the persona. \n2.No more than 100 words."
},
"TTS": {
"Vendor": "ByteDance",
"Params": {
"app": {
"appid": "zego_test", // your appid (zego_test can be used during the integration testing period (within 2 weeks of AI Agent service activation))
"token": "zego_test", // your token (zego_test can be used during the integration testing period (within 2 weeks of AI Agent service activation))
"cluster": "volcano_tts"
},
"audio": {
"voice_type": "en_female_sarah_mars_bigtts" // your voice type
}
}
},
"ASR": {
// !mark
"HotWord": "ZEGOCLOUD|10"
}
}
}