The built-in speech-to-text (STT) service supports hotword configuration. You can define domain-specific terms as hotwords to improve recognition accuracy.
Overview
The hotword feature lets you define a set of domain-specific terms as hotwords. The speech recognition system prioritizes these hotwords by increasing their weight during recognition. If certain terms in your business domain are not recognized accurately, use hotwords to improve results.
Limitations
-
Supported languages: Chinese and English.
-
File format: For console uploads, the hotword file must be a
UTF-8encoded TXT file. -
Content requirements:
-
A file can contain up to 500 hotwords.
-
Each hotword can be up to 10 characters long.
-
Each hotword must be on a separate line and contain no punctuation or special characters.
-
-
File size: The hotword file size cannot exceed 100 KB.
Configuration
You can configure hotwords using the console, OpenAPI, or a client SDK. Each method has a different scope and priority.
-
Console configuration: Applies globally to all call instances within the workflow.
-
OpenAPI/client SDK configuration: Applies only to the specific call instance.
Hotwords configured via OpenAPI or a client SDK override those configured in the console.
Console configuration
-
Prepare a hotword file: Add the keywords you want to prioritize to a TXT file. For example:
The Shawshank Redemption Farewell My Concubine Léon: The Professional Forrest Gump Life Is Beautiful Titanic Spirited Away Schindler's List Inception WALL·E -
Configure the STT node: Upload the hotword file to the STT node in your real-time workflow.
On the STT node configuration panel, in the custom hotword section, click Upload to upload the hotword file. The hotword file must be a UTF-8 (no BOM) encoded TXT file, be under 100 KB, and contain up to 500 hotwords with a maximum of 10 characters each. Click Click to download sample to download a sample file.
-
Apply the hotwords: After uploading the file, save or create the workflow to apply the changes.
OpenAPI configuration
To configure instance-level hotwords, call the GenerateAIAgentCall operation and pass the hotwords in the AIAgentConfig.AsrConfig.AsrHotWords parameter. For details, see AIAgentConfig.
Hotwords configured via OpenAPI override those configured in the console.
Client SDK configuration
The AICallKit SDK supports hotword configuration at the call instance level.
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");}};
// The code for initiating the call is omitted.
...
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
// The code for initiating the call is omitted.
...
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
// The code for initiating the call is omitted.
...