The built-in Speech-to-Text (STT) system supports hotword configuration. This topic describes the hotword feature and how to configure it.
Function overview
The speech recognition hotword feature lets you set a specific group of words as hotwords. When the speech recognition system runs, it prioritizes these hotwords and increases their weight during the recognition process. If the recognition accuracy for certain words in your business domain is low, you can use the hotword feature to improve the results.
Limits
Supported languages: This feature supports only Chinese and English words.
File format: The hotword file must be a TXT file with
UTF-8encoding.Content requirements:
A file can contain a maximum of 500 hotwords.
Each hotword can be up to 10 characters long.
Each word must be on a new line. The words cannot contain punctuation or special characters.
File size: The hotword file cannot exceed 100 KB in size.
Configuration
You can configure hotwords in the console, using OpenAPI, or using a client software development kit (SDK). The scope and priority of each configuration method are as follows:
Console configuration: Takes effect globally for all call instances in the workflow.
OpenAPI/Client SDK configuration: Takes effect at the instance level and applies only to the current call instance.
Hotwords configured using OpenAPI or a client SDK overwrite the hotwords configured in the console.
Console configuration
Prepare the hotword file: Add the keywords that you want to prioritize to a TXT file. The following code provides an example:
The Shawshank Redemption Farewell My Concubine Léon: The Professional Forrest Gump Life Is Beautiful Titanic Spirited Away Schindler's List Inception WALL-EConfigure the STT node: Upload the prepared hotword file to the STT node of the real-time workflow.

Apply the hotwords: After you upload the hotword file, save the workflow to apply the changes.
OpenAPI configuration
You can also configure instance-level speech recognition hotwords by calling an OpenAPI operation. To do this, call the GenerateAIAgentCall operation and pass the hotwords in the AIAgentConfig.AsrConfig.AsrHotWords parameter. For more information, see AIAgentConfig.
Hotwords configured using OpenAPI overwrite the hotwords configured in the console.
Configuration at client startup
The AICallKit SDK supports instance-level hotword configuration.
Android
// Create a call configuration object.
ARTCAICallEngine.ARTCAICallConfig artcaiCallConfig = new ARTCAICallEngine.ARTCAICallConfig();
// Set the hotword list.
artcaiCallConfig.agentConfig.asrConfig.asrHotWords = new ArrayList<String>() {{ add("xxx"); add("yyy");}};
// Omit the call initiation process.
... iOS
// Create an agent configuration object.
let agentConfig = ARTCAICallAgentConfig()
// Set the hotword list.
agentConfig.asrConfig.asrHotWords = ["xxx", "yyy"]
// Set the agent configuration for the call configuration.
callConfig.agentConfig = agentConfig
// Omit the call initiation process.
...
Web
// Create an agent configuration object.
const agentConfig = new AICallAgentConfig();
// Set the hotword list.
agentConfig.asrConfig.asrHotWords = ["xxx", "yyy"];
// Set the agent configuration for the call configuration.
callConfig.agentConfig = agentConfig
// Omit the call initiation process.
...