This topic describes how to call the /green/voice/manual/asyncScan API operation to perform a manual review. In addition to automated detection, AI Guardrails offers a manual review service. You can use this service if you require very high accuracy and recall rates for your detection results.
Before you use this service, contact your account manager to confirm the review standards and scope. This API operation does not return automated detection results. To obtain automated detection results, you must call a detection service API operation. For more information, see Synchronous detection of short audio files and Asynchronous audio detection.
Usage notes for manual audio review
API operation: /green/voice/manual/asyncScan
The manual review API operation does not return detection results in real-time. You can obtain the results using a callback or by polling. The detection results are retained for a maximum of 30 days.
-
Billing:
You are charged for calling this operation. For more information about the billing methods, see
-
Response:
The time required to return the manual review results depends on the amount of data to review.
-
Obtain review results using a callback: When you submit a manual review task, you can include the callback parameter in the request to automatically receive the detection results. For more information, see Request parameters.
-
Obtain review results by polling: If you do not include the callback parameter when you submit a manual review task, you must call the result query API operation to obtain the detection results after the task is submitted. For more information, see Result query API operation.
-
-
Audio file requirements:
-
The audio file must be smaller than 200 MB.
-
Supported audio file formats: MP3, WAV, AAC, WMA, OGG, M4A, AMR, AUDIO, and M3U8.
-
Video files with audio are supported in the following formats: AVI, FLV, MP4, MPG, ASF, WMV, MOV, RMVB, and RM.
-
For information about how to use this API operation, see Connect to the manual review service.
QPS limits
You can call this operation up to 50 times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
Request parameters for manual review
For information about the common request parameters that must be included in a request, see Common parameters.
The request body is a JSON struct that contains the following fields:
|
Name |
Type |
Required |
Example |
Description |
|
callback |
String |
No |
http://aliyundoc.com |
If you set the callback parameter in the moderation request, make sure that the specified HTTP or HTTPS URL meets the following requirements: supports the POST method, uses UTF-8 to encode the transmitted data, and supports the checksum and content parameters. To send moderation results to the specified callback URL, Content Moderation returns the checksum and content parameters in callback notifications based on the following rules and format:
Note If your server successfully receives a callback notification, the server sends an HTTP 200 status code to Content Moderation. If your server fails to receive a callback notification, the server sends other HTTP status codes to Content Moderation. If your server fails to receive a callback notification, Content Moderation continues to push the callback notification until your server receives it. Content Moderation can push a callback notification repeatedly up to 16 times. After 16 times, Content Moderation stops pushing the callback notification. In this case, we recommend that you check the status of the callback URL. |
|
seed |
String |
Yes |
seedxxx |
A random string that is used to generate a signature for the callback notification request. The string can be up to 64 characters in length and can contain letters, digits, and underscores (_). You can customize this string. It is used to verify the callback notification request when Content Moderation pushes callback notifications to your server. Note This parameter is required if you set the callback parameter. |
|
tasks |
JSONArray |
No |
Specifies the detection objects. Each element in the JSON array is a detection task struct. You can specify up to 100 elements, which means you can submit 100 pieces of content for detection at a time. To support 100 elements, you must adjust the number of concurrent tasks to more than 100. For more information about the structure of each element, see task. |
|
Name |
Type |
Required |
Example value |
Description |
|
url |
String |
Yes |
http://aliyundoc.com/xxx.m4a |
of the object to be detectedURL.
|
|
dataId |
String |
No |
dataIdxxxx |
The ID of the moderation object. The ID can contain letters, digits, underscores (_), hyphens (-), and periods (.). It can be up to 128 characters in length. This ID uniquely identifies your business data. |
Response parameters for manual review
|
Name |
Type |
Example |
Description |
|
code |
Integer |
200 |
The returned HTTP status code. For more information, see Common error codes. |
|
data |
JSONArray |
The data returned for the request. Each element in the array represents the result of a manual review task. For more information about the structure of each element, see data. |
|
|
msg |
String |
OK |
The response information for the request. |
|
requestId |
String |
9FEF3EBD-FBD0-40D9-AF04-C39259E6EEFA |
The request ID. |
|
Name |
Type |
Sample value |
Description |
|
code |
Integer |
200 |
The returned HTTP status code. For more information, see Common error codes. |
|
dataId |
String |
dataIdxxxx |
The ID of the moderation object. Note If you set the dataId parameter in the moderation request, the value of the dataId request parameter is returned here. |
|
msg |
String |
OK |
The response information for the detection task. |
|
taskId |
String |
vc_f_3M98sw5CQ8u5kLKSdrEyWR-1tyA08 |
The ID of the submitted review task. |
|
url |
String |
http://aliyundoc.com/xxxx.m4a |
of the object to be detectedURL.
|
Examples for manual review
Request example
http(s)://[Endpoint]/green/voice/manual/asyncScan
&<Common request parameters>
{
"seed": "seedxxx",
"callback": "http://aliyundoc.com",
"tasks": [{
"dataId": "dataIdxxxx",
"url": "http://aliyundoc.com/xxx.m4a"
}]
}
Successful response example
{
"code": 200,
"data": [{
"code": 200,
"msg": "OK",
"taskId": "vc_f_3M98sw5CQ8u5kLKSdrEyWR-1tyA08",
"url": "http://aliyundoc.com/xxxx.m4a"
}],
"msg": "OK",
"requestId": "9FEF3EBD-FBD0-40D9-AF04-C39259E6EEFA"
}
Usage notes for querying manual audio review results
API operation: /green/video/manual/scan/results. You can call this operation to query the results of a manual audio review.
QPS limits
You can call this operation up to 50 times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
Request parameters for result query
|
Name |
Type |
Required |
Sample value |
Description |
|
body |
StringArray |
Yes |
["vc_f_3M98sw5CQ8u5kLKSdrEyWR-1tyA08"] |
A list of taskIds for the manual review tasks to query. The array can contain up to 100 elements. |
Response parameters for result query
|
Name |
Type |
Example |
Description |
|
code |
Integer |
200 |
The returned HTTP status code. For more information, see Common error codes. |
|
data |
JSONArray |
The data returned for the request. Each element in the array represents the result of a manual review task. For more information about the structure of each element, see data. |
|
|
msg |
String |
OK |
The response information for the request. |
|
requestId |
String |
246E650C-0556-4404-AEFB-6CBBEA240DE5 |
The request ID. |
|
Name |
Type |
Sample value |
Description |
|
code |
Integer |
200 |
The returned HTTP status code. For more information, see Common error codes. |
|
dataId |
String |
dataIdxxxx |
The ID of the moderation object. Note If you set the dataId parameter in the moderation request, the value of the dataId request parameter is returned here. |
|
msg |
String |
OK |
The response information for the detection task. |
|
suggestion |
String |
block |
The recommended subsequent operation. Valid values:
|
|
taskId |
String |
vc_f_3M98sw5CQ8u5kLKSdrEyWR-1tyA08 |
The task ID. |
|
url |
String |
http://aliyundoc.com/xxxx.m4a |
of the object to be detectedURL.
|
Examples for result query
Request example
http(s)://[Endpoint]/green/video/manual/scan/results
&<Common request parameters>
[
"vc_f_3M98sw5CQ8u5kLKSdrEyWR-1tyA08"
]
Successful response example
{
"code": 200,
"data": [{
"code": 200,
"msg": "OK",
"suggestion": "pass",
"taskId": "vc_f_3M98sw5CQ8u5kLKSdrEyWR-1tyA08",
"url": "http://aliyundoc.com/xxxx.m4a"
}],
"msg": "OK",
"requestId": "246E650C-0556-4404-AEFB-6CBBEA240DE5"
}