Recording file recognition is an offline service that transcribes prerecorded audio. Submit an HTTP-accessible URL for the file. Local files are not supported.
Billing and concurrency limits
Recording file recognition provides a trial edition and a commercial edition. For more information, see Free trial vs. Commercial Edition.
Limits
Comply with the following requirements when you write code. Otherwise, recognition may fail and return an empty result.
Single-track and dual-track recording files in WAV, MP3, MP4, M4A, WMA, AAC, OGG, AMR, and FLAC formats are supported.
An audio file cannot exceed 512 MB, a video file cannot exceed 2 GB, and the total file duration cannot exceed 12 hours.
The recording file must be stored on a service and accessible by URL.
We recommend that you use Alibaba Cloud Object Storage Service (OSS). If the OSS object is publicly readable, see Public-read objects to obtain the file URL. If the OSS object is private, see Private objects to use an SDK to generate a URL that remains valid for a specified period.
You can also store the recording file on your own file server. Make sure that the Content-Length value in the HTTP response header is the same as the actual length of the response body. Otherwise, the download fails.
The recording file URL must be publicly accessible, use a domain name instead of an IP address, and contain no spaces. Avoid Chinese characters in the URL.
Valid URL
Invalid URL
https://gw.alipayobjects.com/os/bmw-prod/0574ee2e-f494-45a5-820f-63aee583045a.wav
http://127.0.0.1/sample.wav
D:\files\sample.wav
Recording file recognition is an offline service with no concurrency limit. The following queries per second (QPS) limits apply:
For POST requests that submit recognition tasks, the per-user QPS limit is 200.
For GET requests that query recognition results, the per-user QPS limit is 500.
For queries that use the same task ID, the QPS limit is 1.
During the three-month trial period for new users, you can transcribe up to two hours of recordings free of charge every 24 hours. After the quota is exhausted, wait 24 hours before you continue the trial.
After you submit a task, recognition completes and returns text within 24 hours for trial users and within three hours for paid users. Results are retained on the server for 72 hours.
ImportantThese processing-time commitments do not apply if you upload more than 500 hours of recordings within 30 minutes. For large-scale recognition, contact Alibaba Cloud pre-sales.
Polling and callback are supported.
Custom language models are supported. For more information, see Custom language models.
Hotwords are supported. For more information, see Hotwords.
Models for Chinese Mandarin, Chinese dialects, English, and other languages are supported. You cannot specify a language or dialect model in code. In the Intelligent Speech Interaction console, go to All Projects and select the project. Then, click Configure and select the model. For more information, see Manage projects.
The following language and dialect models are supported:
Procedure
Identify the format and sample rate of your recording file, and select an appropriate scenario model in the console.
Upload the recording file to OSS.
If the OSS object is publicly readable, see Public-read objects to obtain the file URL. If the OSS object is private, see Private objects to use an SDK to generate a URL that remains valid for a specified period.
ImportantYou can also store the recording file on your own file server. Make sure that the
Content-Lengthvalue in the HTTP response header is the same as the actual length of the response body. Otherwise, the download fails.Submit a recording file recognition request from the client.
The server returns a task ID that you can use to query the recognition result.
Send a recognition result query from the client.
Use the task ID obtained in Step 3 to query the result. Recognition results are retained on the server for 72 hours.
Interaction flow
The following figure shows the interaction flow between the client and server.

Every server response contains the TaskId parameter in its header to identify the recognition task.
POP request parameters by region
Region | Request parameter |
China (Shanghai) |
|
China (Beijing) |
|
China (Shenzhen) |
|
API calls
Recording file recognition provides an RPC-style POP API. Parameters are included in each request, each request maps to a method, and the result is returned in the response. Store the recording file on a service (we recommend Alibaba Cloud OSS) and make it accessible by URL. If OSS and the service are in the same region, access the file over the internal network to avoid Internet traffic fees.
The recording file recognition POP API consists of a POST operation that submits recognition requests (per-user QPS limit: 200) and a GET operation that queries recognition results (per-user QPS limit: 500).
Submit a recognition request
For polling, submit a recognition task and obtain a task ID for subsequent queries.
For callback, submit a recognition task and a callback URL. When the task is complete, the server sends the result to the callback URL by POST. The callback URL must accept POST requests.
NoteFor historical reasons, in the early recording file recognition service (version 2.0 by default), callback and polling results differ in JSON style and fields. Version 4.0 aligns callback results with polling results. Both use camelCase JSON.
If your existing integration does not specify a service version, it uses version 2.0 by default and can continue to do so. For a new integration, set the service version to 4.0.
Request parameters
To submit a recognition request, pass the parameters as a JSON string in the request body, as shown in the following example:
{ "appkey": "your-appkey", "file_link": "https://gw.alipayobjects.com/os/bmw-prod/0574ee2e-f494-45a5-820f-63aee583045a.wav", "auto_split":false, "version": "4.0", "enable_words": false, "enable_sample_rate_adaptive": true, // valid_times: Recognize only specified time ranges. Omit this parameter if it is not needed. "valid_times": [ { "begin_time": 200, "end_time":2000, "channel_id": 0 } ] }Parameter
Type
Required
Description
appkey
String
Yes
The appkey of the project that you created in the console.
file_link
String
Yes
The URL of the recording file. In the console, configure the project to use a model that supports the audio scenario.
version
String
No
The service version. Default value: 4.0.
enable_words
Boolean
No
Specifies whether to return word information. Default value: false. If you enable this feature, set version to 4.0.
enable_sample_rate_adaptive
Boolean
No
Specifies whether to automatically downsample audio with a sample rate higher than 16 kHz to 16 kHz. Default value: false. If you enable this feature, set version to 4.0.
enable_callback
Boolean
No
Specifies whether to enable callback. Default value: false.
callback_url
String
No
The callback URL. This parameter is required if enable_callback is true. HTTP and HTTPS are supported. The host cannot be an IP address.
auto_split
Boolean
No
Specifies whether to enable intelligent speaker diarization. In a two-party conversation, use ChannelId in each sentence result to identify the speaker. The first speaker usually has ChannelId 0. For 8 kHz dual-channel audio, the default number of speakers is 2, and channel0 and channel1 are the track IDs.
NoteBoth 8,000 Hz and 16,000 Hz are supported. For 16 kHz audio, only the first channel is separated by default.
supervise_type
Integer
No
The method used to determine the number of speakers. Use this parameter together with auto_split and speaker_num.
Default: empty. For 8 kHz audio, the user specifies the number. For 16 kHz audio, the algorithm determines the number.
1: The user specifies the number by using speaker_num.
2: The algorithm determines the number.
speaker_num
Integer
No
The expected number of speakers. Valid values: integers from 2 to 100. The default is 2 for 8 kHz audio and 100 for 16 kHz audio.
This parameter guides the algorithm but does not guarantee the specified number of speakers. Use it together with auto_split and supervise_type.
enable_inverse_text_normalization
Boolean
No
Inverse text normalization (ITN) converts Chinese numerals to Arabic numerals. If set to true, Chinese numerals are returned as Arabic numerals. Default value: false.
enable_disfluency
Boolean
No
Specifies whether to remove filler words. Default value: false. If enabled, set version to 4.0.
enable_punctuation_prediction
Boolean
No
Specifies whether to add punctuation to sentences. Default value: true.
valid_times
List< ValidTime >
No
The valid time ranges to recognize. Use this parameter to exclude unwanted ranges.
max_end_silence
Integer
No
The maximum trailing silence. Valid values: 200 to 6000. Default value: 800. Unit: milliseconds.
Enable semantic sentence detection enable_semantic_sentence_detection, this parameter does not take effect.
max_single_segment_time
Integer
No
The maximum duration of a sentence. Minimum value: 5000. Default value: 60000. Unit: milliseconds.
Enable semantic sentence detection enable_semantic_sentence_detection, this parameter does not take effect.
customization_id
String
No
The ID of a custom model created by using the POP API. By default, no ID is specified.
class_vocabulary_id
String
No
The ID of a class-based hotword vocabulary. By default, no ID is specified.
vocabulary_id
String
No
The ID of a general hotword vocabulary. By default, no ID is specified.
enable_semantic_sentence_detection
Boolean
No
Specifies whether to enable semantic sentence detection. Valid values: true and false. Default value: false.
enable_timestamp_alignment
Boolean
No
Specifies whether to enable timestamp calibration. Valid values: true and false. Default value: false.
first_channel_only
Boolean
No
Specifies whether to recognize only the first channel. Valid values: true and false. Enable this parameter if the recognition result is duplicated.
Default: empty. Dual-channel audio is processed at 8 kHz, and single-channel audio is processed at 16 kHz.
false: Dual-channel audio is processed at both 8 kHz and 16 kHz.
true: Single-channel audio is processed at both 8 kHz and 16 kHz.
ImportantBilling:
For 8 kHz dual-channel audio, billing is based on one channel: audio duration is billed.
For 16 kHz dual-channel audio, billing is based on two channels: number of channels × audio duration is billed.
special_word_filter
String
No
Sensitive word filtering can be enabled or disabled and supports custom sensitive words. The parameter supports:
No processing (default; returns the original text), Filtering, and Replacement with *.
For instructions, see the custom filtering example later in this topic.
NoteIf filtering is enabled but no sensitive words are configured, the default vocabulary is used: Sensitive word vocabulary.
punctuation_mark
String
No
Custom punctuation for sentence segmentation.
If this parameter is empty, periods, question marks, and exclamation marks are used. If specified, the custom punctuation is also used for sentence segmentation.
Examples:
To segment by English commas, specify " , " without spaces.
To segment by Chinese and English commas, specify ",,".
NoteNon-punctuation characters do not take effect.
You can specify multiple punctuation marks. Chinese and English punctuation marks are distinguished. Do not add spaces between them.
sentence_max_length
Integer
No
The maximum number of characters displayed in each sentence. Valid values: 4 to 50. This feature is disabled by default. If enabled without a value, long-sentence segmentation is used. Use this parameter to control the maximum number of characters per subtitle line.
The following example shows how to configure custom filtering:
// This example uses real-time transcription. JSONObject root = new JSONObject(); root.put("system_reserved_filter", true); // Replace the following words with empty strings JSONObject root1 = new JSONObject(); JSONArray array1 = new JSONArray(); array1.add("start"); array1.add("happen"); root1.put("word_list", array1); // Replace the following words with * JSONObject root2 = new JSONObject(); JSONArray array2 = new JSONArray(); array2.add("test"); root2.put("word_list", array2); // You can configure all or only some of the following options root.put("filter_with_empty", root1); root.put("filter_with_signed", root2); transcriber.addCustomedParam("special_word_filter", root);The following table describes the ValidTime object.
Parameter
Type
Required
Description
begin_time
Int
Yes
The start offset of the valid time range. Unit: milliseconds.
end_time
Int
Yes
The end offset of the valid time range. Unit: milliseconds.
channel_id
Int
Yes
The track index to which the valid time range applies. The index starts from 0.
Response parameters
The server returns the response to a recognition request as a JSON string:
{ "TaskId": "4b56f0c4b7e611e88f34c33c2a60****", "RequestId": "E4B183CC-6CFE-411E-A547-D877F7BD****", "StatusText": "SUCCESS", "StatusCode": 21050000 }HTTP status 200 indicates success. For other status codes, see HTTP status codes.
Parameter
Type
Required
Description
Taskid
String
Yes
The recognition task ID.
RequestId
String
Yes
The request ID, used only for integration testing.
StatusCode
Int
Yes
The status code.
StatusText
String
Yes
The status description.
Query the recognition result
After you submit a recognition request, use the following parameters to poll the result.
Request parameters
Use the task ID returned by the submission request to query the recognition result. Set an appropriate interval between queries.
ImportantThe query API has a 500 QPS limit. If the limit is exceeded, the following error may be returned:
Throttling.User : Request was denied due to user flow control.Use a reasonable polling interval and avoid frequent queries.Parameter
Type
Required
Description
Taskid
String
Yes
The recognition task ID.
Response parameters
The server returns the response to a result query as a JSON string.
Successful response: The following example uses the single-track recording file nls-sample-16k.wav.
{ "TaskId": "d429dd7dd75711e89305ab6170fe****", "RequestId": "9240D669-6485-4DCC-896A-F8B31F94****", "StatusText": "SUCCESS", "BizDuration": 2956, "SolveTime": 1540363288472, "StatusCode": 21050000, "Result": { "Sentences": [{ "EndTime": 2365, "SilenceDuration": 0, "BeginTime": 340, "Text": "How is the weather in Beijing?", "ChannelId": 0, "SpeechRate": 177, "EmotionValue": 5.0 }] } }If enable_callback and callback_url are enabled and the service version is 4.0, the callback result is:
{ "Result": { "Sentences": [{ "EndTime": 2365, "SilenceDuration": 0, "BeginTime": 340, "Text": "How is the weather in Beijing?", "ChannelId": 0, "SpeechRate": 177, "EmotionValue": 5.0 }] }, "TaskId": "36d01b244ad811e9952db7bb7ed2****", "StatusCode": 21050000, "StatusText": "SUCCESS", "RequestTime": 1553062810452, "SolveTime": 1553062810831, "BizDuration": 2956 }ImportantRequestTime is a millisecond timestamp that indicates when the recognition request was submitted. For example, 1553062810452 is 2019-03-20 14:20:10 in Beijing time.
SolveTime is a millisecond timestamp that indicates when recognition was completed.
Queued response:
{ "TaskId": "c7274235b7e611e88f34c33c2a60****", "RequestId": "981AD922-0655-46B0-8C6A-5C836822****", "StatusText": "QUEUEING", "StatusCode": 21050002 }Recognition in progress:
{ "TaskId": "c7274235b7e611e88f34c33c2a60****", "RequestId": "8E908ED2-867F-457E-82BF-4756194A****", "StatusText": "RUNNING", "BizDuration": 0, "StatusCode": 21050001 }Error response: The following example shows a file download failure.
{ "TaskId": "4cf25b7eb7e711e88f34c33c2a60****", "RequestId": "098BF27C-4CBA-45FF-BD11-3F532F26****", "StatusText": "FILE_DOWNLOAD_FAILED", "BizDuration": 0, "SolveTime": 1536906469146, "StatusCode": 41050002 }NoteFor other errors, see the error codes and solutions in Service status codes.
HTTP status 200 indicates success. For other status codes, see HTTP status codes.
Parameter
Type
Required
Description
TaskId
String
Yes
The recognition task ID.
StatusCode
Int
Yes
The status code.
StatusText
String
Yes
The status description.
RequestId
String
Yes
The request ID, used for debugging.
Result
Object
Yes
The recognition result object.
Sentences
List< SentenceResult >
Yes
The recognition result data. This parameter is returned when StatusText is SUCCEED.
Words
List< WordResult >
No
Word information. To obtain it, set enable_words to true and version to 4.0.
BizDuration
Long
Yes
The total duration of the recognized audio file. Unit: milliseconds.
SolveTime
Long
Yes
The millisecond timestamp when recognition was completed.
The following table describes the SentenceResult parameters.
Parameter
Type
Required
Description
ChannelId
Int
Yes
The track ID of the sentence.
BeginTime
Int
Yes
The start offset of the sentence. Unit: milliseconds.
EndTime
Int
Yes
The end offset of the sentence. Unit: milliseconds.
Text
String
Yes
The recognized text of the sentence.
EmotionValue
Float
Yes
The emotion energy value, calculated as the volume in decibels divided by 10. Valid values: 1 to 10. A higher value indicates stronger emotion.
SilenceDuration
Int
Yes
The silence duration between this sentence and the previous sentence. Unit: seconds.
SpeechRate
Int
Yes
The average speech rate of the sentence.
For Chinese, the unit is characters per minute.
For English, the unit is words per minute.
Return word information
If enable_words is true and version is 4.0, the recognition result contains word information. Polling and callback return the same word information. The following example shows a polling result:
{ "StatusCode": 21050000, "Result": { "Sentences": [{ "SilenceDuration": 0, "EmotionValue": 5.0, "ChannelId": 0, "Text": "How is the weather in Beijing?", "BeginTime": 340, "EndTime": 2365, "SpeechRate": 177 }], "Words": [{ "ChannelId": 0, "Word": "Beijing", "BeginTime": 640, "EndTime": 940 }, { "ChannelId": 0, "Word": "weather", "BeginTime": 940, "EndTime": 1120 }, { "ChannelId": 0, "Word": "in Beijing", "BeginTime": 1120, "EndTime": 2020 }] }, "SolveTime": 1553236968873, "StatusText": "SUCCESS", "RequestId": "027B126B-4AC8-4C98-9FEC-A031158F****", "TaskId": "b505e78c4c6d11e9a213e11db149****", "BizDuration": 2956 }Words object
Parameter
Type
Required
Description
BeginTime
Int
Yes
The start time of the word. Unit: milliseconds.
EndTime
Int
Yes
The end time of the word. Unit: milliseconds.
ChannelId
Int
Yes
The track ID of the word.
Word
String
Yes
The word text.
Service status codes
General-purpose error codes
Status code | Status message | Cause | Solution |
40000000 | The default client error code. This code corresponds to multiple error messages. | Invalid parameters or call logic was used. | Compare your code with the sample code in the official documentation to test and verify it. |
40000001 | The token 'xxx' has expired. The token 'xxx' is invalid | Invalid parameters or call logic was used. This is a general-purpose client error code that usually indicates an incorrect token, such as an expired or invalid token. | Compare your code with the sample code in the official documentation to test and verify it. |
40000002 | Gateway:MESSAGE_INVALID:Can't process message in state'FAILED'! | The message is invalid or incorrect. | Compare your code with the sample code in the official documentation to test and verify it. |
40000003 | PARAMETER_INVALID Failed to decode url params | The parameters passed by the user are incorrect. This error is common for RESTful API calls. | Compare your code with the sample code in the official documentation to test and verify it. |
40000005 | Gateway:TOO_MANY_REQUESTS:Too many requests! | Too many concurrent requests. | If you are using the Free Edition, you can upgrade to a commercial version to increase the concurrency. If you are already using a commercial version, you can purchase a concurrency resource plan to increase your concurrency quota. |
40000009 | Invalid wav header! | The message header is invalid. | If you send a WAV audio file and set the |
40000009 | Too large wav header! | The WAV header of the transmitted audio is invalid. | You can send the audio stream in a format such as PCM or OPUS. If you use the WAV format, make sure that the WAV header of the audio file contains the correct data length. |
40000010 | Gateway:FREE_TRIAL_EXPIRED:The free trial has expired! | The trial period has ended, and the commercial version is not activated or your account has an overdue payment. | You can log on to the console to check the service activation status and your account balance. |
40010001 | Gateway:NAMESPACE_NOT_FOUND:RESTful url path illegal | The operation or parameter is not supported. | Check whether the parameters passed in the call are consistent with the requirements in the official documentation. You can compare them with the error message to identify and set the correct parameters. For example, if you are using a curl command to make a RESTful API request, check whether the URL you constructed is valid. |
40010003 | Gateway:DIRECTIVE_INVALID:[xxx] | A general-purpose client-side error code. | This error indicates that the client passed an incorrect parameter or instruction. Detailed error messages are available for different operations. You can refer to the corresponding documentation to set the parameters correctly. |
40010004 | Gateway:CLIENT_DISCONNECT:Client disconnected before task finished! | The client actively terminated the connection before the request was processed. | None. Alternatively, you can close the connection after the server responds. |
40010005 | Gateway:TASK_STATE_ERROR:Got stop directive while task is stopping! | The client sent a message instruction that is not currently supported. | Compare your code with the sample code in the official documentation to test and verify it. If this error is accompanied by the message "empty body data", troubleshoot the issue as follows:
|
40020105 | Meta:APPKEY_NOT_EXIST:Appkey not exist! | A non-existent Appkey was used. | Confirm whether a non-existent Appkey was used. You can log on to the console and view the project configuration to find the Appkey. |
40020106 | Meta:APPKEY_UID_MISMATCH:Appkey and user mismatch! | The Appkey and token passed in the call were not created by the same Alibaba Cloud account UID. This causes a mismatch. | Check whether you are using resources from two different accounts. Do not use an Appkey from Account A with a token generated from Account B. |
403 | Forbidden | The token is invalid. For example, the token does not exist or has expired. | Set a valid token. Tokens have an expiration period. You must obtain a new token before the current one expires. |
41000003 | MetaInfo doesn't have end point info | Failed to retrieve the routing information for this Appkey. | Check whether you are using resources from two different accounts. Do not use an Appkey from Account A with a token generated from Account B. |
41010101 | UNSUPPORTED_SAMPLE_RATE | The sample rate is not supported. | Real-time speech recognition currently supports only audio with a sample rate of 8000 Hz or 16000 Hz. |
41040201 | Realtime:GET_CLIENT_DATA_TIMEOUT:Client data does not send continuously! | Failed to retrieve data from the client due to a timeout. | When you call real-time speech recognition, the client must send data at a real-time rate and close the connection promptly after the data is sent. |
50000000 | GRPC_ERROR:Grpc error! | An exception caused by factors such as machine load or network issues. This error usually occurs randomly. | You can retry the call to resolve the issue. |
50000001 | GRPC_ERROR:Grpc error! | An exception caused by factors such as machine load or network issues. This error usually occurs randomly. | You can retry the call to resolve the issue. |
52010001 | GRPC_ERROR:Grpc error! | An exception caused by factors such as machine load or network issues. This error usually occurs randomly. | You can retry the call to resolve the issue. |
Audio file recognition/Audio file recognition (off-peak) error codes
Status code | Status message | Cause | Solution |
21050000 | SUCCESS | Success. | None. |
21050001 | RUNNING | The audio file recognition task is running. | Send a GET request to query the recognition result later. |
21050002 | QUEUEING | The audio file recognition task is in the queue. | Send a GET request to query the recognition result later. |
21050003 | SUCCESS_WITH_NO_VALID_FRAGMENT | The operation to query the recognition result was successful, but the voice activity detection (VAD) module did not detect any valid speech. | In this case, check the following: Check whether the audio file contains valid speech. If it contains only invalid speech, such as pure silence, it is normal for no recognition result to be returned. |
ASR_RESPONSE_HAVE_NO_WORDS | The operation to query the recognition result was successful, but the final recognition result is empty. | In this case, check the following: Check whether the audio file contains valid speech, or whether the valid speech consists only of filler words and the enable_disfluency parameter is enabled, causing the filler words to be filtered out. In these cases, it is normal for no recognition result to be returned. | |
41050001 | USER_BIZDURATION_QUOTA_EXCEED | The daily duration limit is exceeded. Free Edition users can recognize audio files with a total duration of no more than 2 hours per day. | Upgrade from the Free Edition to the commercial version. If you have a high volume of business, contact our business team by email at nls_support@service.aliyun.com. |
41050002 | FILE_DOWNLOAD_FAILED | File download failed. | Check whether the audio file path is correct and whether the file can be accessed and downloaded from the internet. |
41050003 | FILE_CHECK_FAILED | The file format is incorrect. | Check whether the audio file is in single-channel or dual-channel WAV or MP3 format. |
41050004 | FILE_TOO_LARGE | The file is too large. | Check if the audio file size exceeds 512 MB. If it does, segment the audio file. |
41050005 | FILE_NORMALIZE_FAILED | File normalization failed. | Check whether the audio file is damaged and whether it can be played normally. |
41050006 | FILE_PARSE_FAILED | File parsing failed. | Check whether the audio file is damaged and whether it can be played normally. |
41050007 | MKV_PARSE_FAILED | MKV parsing failed. | Check whether the audio file is damaged and whether it can be played normally. |
41050008 | UNSUPPORTED_SAMPLE_RATE | The sample rate does not match. | Check whether the actual audio sample rate is consistent with the sample rate of the ASR model bound to the Appkey in the console, or set the automatic downsampling parameter enable_sample_rate_adaptive in this document to true. |
41050010 | FILE_TRANS_TASK_EXPIRED | The audio file recognition task has expired. | The TaskId does not exist or has expired. |
41050011 | REQUEST_INVALID_FILE_URL_VALUE | The file_link parameter in the request is invalid. | Confirm whether the format of the file_link parameter is correct. |
41050012 | REQUEST_INVALID_CALLBACK_VALUE | The callback_url parameter in the request is invalid. | Confirm whether the format of the callback_url parameter is correct and whether it is empty. |
41050013 | REQUEST_PARAMETER_INVALID | The request parameter is invalid. | Confirm that the task value in the request is a valid JSON format string. |
41050014 | REQUEST_EMPTY_APPKEY_VALUE | The appkey parameter value in the request is empty. | Confirm whether the appkey parameter value is set. |
41050015 | REQUEST_APPKEY_UNREGISTERED | The appkey in the request parameter is not registered. | Confirm whether the appkey parameter value in the request is set correctly, or whether it belongs to the same account as the AccessKey ID of the Alibaba Cloud account. |
41050021 | RAM_CHECK_FAILED | RAM check failed. | Check whether your RAM user is authorized to call the API operations of Voice Service. For more information, see Configure RAM user permissions. |
41050023 | CONTENT_LENGTH_CHECK_FAILED | content-length check failed. | When downloading a file, check whether the content-length in the HTTP response is consistent with the actual file size. |
41050024 | FILE_404_NOT_FOUND | The file to be downloaded does not exist. | Check whether the file to be downloaded exists. |
41050025 | FILE_403_FORBIDDEN | You do not have permission to download the required file. | Check whether you have permission to download the audio file. |
41050026 | FILE_SERVER_ERROR | The service where the requested file is located is unavailable. | Check whether the service where the requested file is located is available. |
41050103 | AUDIO_DURATION_TOO_LONG | The duration of the requested file exceeds 12 hours. | Segment the audio and submit multiple recognition tasks. |
40270003 | DECODER_ERROR | Failed to detect audio file information. | Confirm that the file at the download link is in a supported audio format. |
51050000 | INTERNAL_ERROR | An exception caused by factors such as machine load or network issues. This error usually occurs randomly. | Retry the call to resolve the issue. If the issue persists, contact technical support. |
Earlier versions
If your integration does not explicitly set version to 4.0, recording file recognition uses version 4.0 by default. Callback and polling results differ in JSON style and fields. If enable_callback and callback_url are enabled, the callback result is:
{
"result": [{
"begin_time": 340,
"channel_id": 0,
"emotion_value": 5.0,
"end_time": 2365,
"silence_duration": 0,
"speech_rate": 177,
"text": "How is the weather in Beijing?"
}],
"task_id": "3f5d4c0c399511e98dc025f34473****",
"status_code": 21050000,
"status_text": "SUCCESS",
"request_time": 1551164878830,
"solve_time": 1551164879230,
"biz_duration": 2956
}Recommendations for speech quality inspection
Speech quality inspection for outbound calls and similar scenarios typically analyzes recordings after calls.Recording file recognition is suitable for these scenarios. Consider the following capabilities when you select a service:
Core capabilities:
Speaker diarization: Distinguishes the two speakers so that you can review script compliance by role.
High-accuracy transcription: Converts recordings to text for quality-inspection rule matching.
Timestamps: Locate noncompliant statements or key information in a recording for review and evidence collection.
Supplementary capabilities: Custom hotwords improve recognition of business terms, and silence detection helps identify abnormal pauses for more granular inspection rules.
Add emotion recognition or real-time speech recognition based on your business requirements.