Overview
Menu

DescribeAsrHotwords

Last updated: 2025-03-28 15:37:14Download PDF

1. API Description

Domain name for API request: mps.intl.tencentcloudapi.com.

This API is used to query a smart subtitle hotword lexicon.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter NameRequiredTypeDescription
ActionYesStringCommon Params. The value used for this API: DescribeAsrHotwords.
VersionYesStringCommon Params. The value used for this API: 2019-06-12.
RegionNoStringCommon Params. This parameter is not required for this API.
HotwordsIdNoStringID of the hotword lexicon to be queried.
Note: Either HotwordsId or Name should be specified. If both are specified, HotwordsId has a higher priority than Name.
NameNoStringHotword lexicon name.
Note: Either HotwordsId or Name should be specified. If both are specified, HotwordsId has a higher priority than Name.
OffsetNoIntegerPaging offset. Default value: 0.

LimitNoIntegerNumber of returned entries. Default value: 10. Maximum value: 100.
OrderByNoStringHotword sorting field. Valid values:

- Default: Sort by the hotword upload sequence.
- Weight: Sort by the weight.
- Lexical: Sort by the first letter of hotwords.
OrderTypeNoIntegerHotword sorting order. 0: ascending (default); 1: descending.

3. Output Parameters

Parameter NameTypeDescription
HotwordsIdStringID of the hotword lexicon to be queried.
StatusIntegerCurrent status of the hotword lexicon corresponding to the ID. The value 0 indicates that no template is bound to this hotword lexicon when the query is performed and that the hotword lexicon can be deleted.
Note: This field may return null, indicating that no valid value can be obtained.
NameStringHotword lexicon name.
Note: This field may return null, indicating that no valid value can be obtained.
TypeIntegerThe value is 0 for a temporary hotword lexicon, and the string provided during creation is returned.
The value is 1 for a file-based hotword lexicon, and the content of the file uploaded during creation is returned.


Note: This field may return null, indicating that no valid value can be obtained.
FileNameStringName of the uploaded hotword file.
Note: This field may return null, indicating that no valid value can be obtained.
HotWordsArray of AsrHotwordsSetItemList of hotwords returned for the query.
ContentStringHotword text, which depends on the value of Type.
If the value of Type is 0, the hotword string is returned.
If the value of Type is 1, the base64-encoded content of the hotword file is returned.
Note: This field may return null, indicating that no valid value can be obtained.
WordCountIntegerNumber of words contained in the hotword lexicon.
Note: This field may return null, indicating that no valid value can be obtained.
OffsetIntegerPaging offset. Default value: 0.

Note: This field may return null, indicating that no valid value can be obtained.
LimitIntegerNumber of returned entries. Default value: 10. Maximum value: 100.
Note: This field may return null, indicating that no valid value can be obtained.
CreateTimeStringCreation time of the hotword lexicon in ISO datetime format (UTC time). For example, "2006-01-02T15:04:05Z".Note: This field may return null, indicating that no valid value can be obtained.
UpdateTimeStringModification time of the hotword lexicon in ISO datetime format (UTC time). For example, "2006-01-02T15:04:05Z".
Note: This field may return null, indicating that no valid value can be obtained.
RequestIdStringThe unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

4. Example

Example1 DescribeAsrHotwords

Input Example

POST / HTTP/1.1
Host: mps.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeAsrHotwords
<Common request parameters>

{
    "HotwordsId": "hwd-aexxxxxxxxxxxxxx1481"
}

Output Example

{
    "Response": {
        "Content": "Tencent Cloud|10,Automatic Speech Recognition|5,ASR|10",
        "CreateTime": "2025-03-19T03:29:06Z",
        "FileName": "",
        "HotWords": [
            {
                "Id": 1,
                "Text": "Tencent Cloud",
                "Weight": 10
            },
            {
                "Id": 2,
                "Text": "Automatic Speech Recognition",
                "Weight": 5
            },
            {
                "Id": 3,
                "Text": "ASR",
                "Weight": 10
            }
        ],
        "HotwordsId": "hwd-aexxxxxxxxxxxxxx1481",
        "Limit": 0,
        "Name": "HotwordsNameExample",
        "Offset": 0,
        "RequestId": "bad606d3-8a49-427f-a6a6-26c9f1fe1dc3",
        "Status": 0,
        "Type": 0,
        "UpdateTime": "2025-03-19T03:29:06Z",
        "WordCount": 3
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error CodeDescription
InternalErrorInternal error.
InternalError.AccessDBErrorData error.
InvalidParameterValueIncorrect parameter value.