Voice Moderation Enhanced Edition multilingual service
Voice Moderation Enhanced Edition upgrades its audio models to support Chinese, English, and mixed Chinese-English audio content, and provides moderation policies and a tag system tailored for global business needs.
Features
Compared with Voice Moderation 1.0, Voice Moderation Enhanced Edition uses dedicated policies and a tag system that meet global business requirements. It also offers additional features to simplify integration and assist manual review.
|
Comparison item |
Voice Moderation Enhanced Edition |
Voice Moderation 1.0 |
|
Multilingual support |
|
Supports only Chinese by default. |
|
Moderation capability |
|
|
|
Tag system |
Uses a global tag system with added international tags such as profanity and regional conflict. Supports multiple risk tags and sub-tags. |
Uses the Chinese-scenario tag system and supports only a single risk tag. |
|
API functionality |
|
|
Internationalization tags
Voice Moderation Enhanced Edition multilingual service uses a global tag system. If content contains multiple types of risks, multiple tags are returned simultaneously. Tag categories include but are not limited to the following:
|
Tag type |
Category |
|
Primary tags (labels) |
|
|
Sub-tags (riskTips) |
Sub-tags are returned in the format Sub-tags help pinpoint specific violations and enable region-specific compliance handling. Contact your operations representative for details on available sub-tag types. |
Service Performance
Voice Moderation Enhanced Edition uses a high-performance core engine that schedules dozens of models and policies concurrently to deliver timely results.
|
Service performance |
Description |
|
File size |
Enhanced Edition increases the maximum supported audio file size from 200 MB to 500 MB. |
|
Audio file formats |
Supported audio formats: MP3, WAV, AAC, WMA, OGG, M4A, AMR. Supported video formats: AVI, FLV, MP4, MPG, ASF, WMV, MOV, RMVB, RM. |
|
Live audio streams |
Supported protocols: RTMP, HLS, HTTP-FLV, RTSP. |
|
Request rate (QPS) |
The task submission QPS limit increases from 50 requests per second to 100 requests per second. |
|
Concurrent streams |
Enhanced Edition increases the default concurrent stream limit from 20 to 50. |
QPS refers to the number of API requests the service can process per second. Concurrent streams refer to the number of audio files or live streams being processed simultaneously.
Billing
The Voice Moderation Enhanced Edition service supports pay-as-you-go and resource plan deduction as two billing methods.
Pay-as-you-go
After you activate Voice Moderation Enhanced Edition, pay-as-you-go is enabled by default. You are billed daily based on actual usage. No charges apply if you do not call the service.
|
Moderation type |
Supported scenarios (services) |
Unit price |
|
Voice Moderation Advanced (audio_advanced) |
|
CNY 375 per 10,000 minutes (equivalent to CNY 2.25 per hour) |
Resource Plan Deduction
If you have large or consistent moderation volumes, purchase a resource plan in advance. Larger plans offer greater discounts, and you can stack multiple plans. For more information, see Purchase Content Moderation Enhanced Edition Resource Plans.
This resource plan applies only to Content Moderation Enhanced Edition usage and cannot be shared with Content Moderation data transfer plans. The offset factors are as follows:
|
Moderation type |
Offset factor |
|
Voice Moderation Advanced (audio_advanced) |
An offset factor of 50 means that each successfully invoked service-minute deducts 50 units from the resource plan’s capacity. For example, if your resource plan has a capacity of 100 units, moderating 1 minute of audio deducts 50 units, leaving 50 units remaining. |
Integration Guide
Step 1: Activate the service
Go to Activate the service to enable Voice Moderation Enhanced Edition.
Step 2: Grant permissions to a RAM user
Before integrating the SDK or calling the API, grant permissions to a RAM user and create an AccessKey pair for authentication. For instructions, see Obtain an AccessKey.
Grant permissions to a RAM user
Log on to the RAM console using your Alibaba Cloud account.
Create a RAM user. For details, see Create a RAM user.
Grant the
AliyunYundunGreenWebFullAccesssystem policy to the RAM user. This policy grants full access to Content Moderation. For details, see Manage RAM user permissions.The RAM user can now call the Content Moderation API.
Step 3: Install and integrate the SDK
Supported regions:
|
Region |
Public endpoint |
Private endpoint |
|
Singapore |
https://green-cip.ap-southeast-1.aliyuncs.com |
https://green-cip-vpc.ap-southeast-1.aliyuncs.com |
|
US (Virginia) |
https://green-cip.us-east-1.aliyuncs.com |
https://green-cip-vpc.us-east-1.aliyuncs.com |
To obtain SDK sample code in other languages, use the OpenAPI Developer Portal online debugging tool. This tool automatically generates SDK sample code for the API.
API
Usage notes
Business endpoint: https://green-cip.{region}.aliyuncs.com.
Call this endpoint to create a voice moderation task. For instructions on constructing HTTP requests, see Make native HTTP calls. Alternatively, use pre-built HTTP requests. For more information, see Voice Moderation Enhanced Edition 2.0 SDK and integration guide.
-
Business endpoints:
-
Submit moderation task: VoiceModeration
-
Query moderation result: VoiceModerationResult
-
-
Billing information:
This API is billable. Charges apply only to requests that return an HTTP status code of 200. Requests that return other error codes are not billed. For billing details, see Billing.
Submit a moderation task
Request parameters
|
Name |
Type |
Required |
Example |
Description |
|
Service |
String |
Yes |
audio_multilingual_cb |
The moderation service type. Valid values:
|
|
ServiceParameters |
JSONString |
Yes |
A JSON-formatted string containing parameters required by the moderation service. For descriptions of each parameter, see ServiceParameters. |
Table 1. ServiceParameters
|
Name |
Type |
Required |
Example |
Description |
|
url |
String |
Yes |
http://aliyundoc.com/test.flv |
The URL of the object to moderate: a public HTTP or HTTPS URL. |
|
callback |
String |
No |
http://aliyundoc.com |
The callback URL to which Content Moderation sends the moderation result. Supports HTTP and HTTPS. If not specified, you must poll for results. Your callback endpoint must support the POST method, UTF-8 encoded data, and form parameters checksum and content. Content Moderation sets checksum and content as follows when calling your callback endpoint:
Note
If your server returns an HTTP status code of 200 upon receiving the callback, Content Moderation considers the delivery successful. Any other status code is treated as a failure. In case of failure, Content Moderation retries up to 16 times. If all retries fail, no further attempts are made. Check your callback endpoint status if this occurs. |
|
Seed |
String |
No |
abc**** |
A random string for signing callback requests. Can contain letters, digits, and underscores (_), up to 64 characters. Use this value to verify that callback requests originate from Alibaba Cloud Content Moderation. Note
This field is required when using a callback URL. |
|
cryptType |
String |
No |
SHA256 |
The encryption algorithm for callback content. Content Moderation encrypts
|
|
liveId |
String |
No |
liveId1**** |
The ID of the live audio stream. Prevents duplicate moderation tasks. If provided, the system checks for an existing task using |
|
DataId |
String |
No |
voice20240307*** |
The data ID associated with the detection object. Can contain letters, digits, underscores (_), hyphens (-), and periods (.), up to 64 characters. Use it to uniquely identify your business data. |
Response parameters
|
Name |
Type |
Example value |
Description |
|
Code |
Integer |
200 |
The error code, which matches the HTTP status code. For more information, see Code descriptions. |
|
data |
JSONObject |
{"taskId": "AAAAA-BBBBB"} |
The moderation result data. |
|
Message |
String |
OK |
The response message for the request. |
|
RequestId |
String |
AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE**** |
The request ID. |
Examples
Sample request
{
"service":"audio_multilingual_cb",
"serviceParameters":"{\"cryptType\":\"SHA256\",\"seed\":\"abc***123\",\"callback\":\"https://aliyun.com/callback\",\"url\":\"http://aliyundoc.com/test.flv"}"
}
Sample success response
{
"code":200,
"data":{
"taskId":"AAAAA-BBBBB"
},
"message":"SUCCESS",
"requestId":"AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****"
}
Query task results
After moderation completes, the response includes data for all audio segments.
Request parameters
|
Name |
Type |
Required |
Example |
Description |
|
Service |
String |
Yes |
audio_multilingual_cb |
The moderation service type. |
|
ServiceParameters |
JSONString |
Yes |
A JSON-formatted string containing parameters required by the moderation service. For descriptions of each parameter, see ServiceParameters. |
Table 2. ServiceParameters
|
Name |
Type |
Required |
Example |
Description |
|
taskId |
String |
Yes |
AAAAA-BBBBB |
The task ID returned when submitting the task. |
Response parameters
|
Name |
Type |
Example |
Description |
|
Code |
Integer |
200 |
The error code, which matches the HTTP status code. For more information, see Code descriptions. |
|
data |
JSONObject |
{"url":xxxx,"results":xxx} |
The response parameters in JSON format. |
|
Message |
String |
OK |
The response message for the request. |
|
RequestId |
String |
AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE**** |
The request ID. |
Table 3. Data
|
Name |
Type |
Example |
Description |
|
url |
String |
https://aliyundoc.com |
The URL of the moderated object. |
|
LiveId |
String |
liveId1**** |
The ID of the live audio stream (optional). |
|
DataId |
String |
voice20240307*** |
The data ID of the moderated object (optional). |
|
RiskLevel |
String |
high |
The overall risk level of the audio, calculated from all segments. Possible values:
Note
Take immediate action on high-risk content. Manually review medium-risk content. For low-risk content, handle it like "none" unless you require high recall. |
|
sliceDetails |
JSONArray |
Detailed results for each audio segment. For details, see sliceDetails. |
Table 4. sliceDetails
|
Name |
Type |
Example |
Description |
|
startTime |
Integer |
0 |
The start time of the segment, in seconds. |
|
endTime |
Integer |
4065 |
The end time of the segment, in seconds. |
|
startTimestamp |
Integer |
1678854649720 |
The start timestamp of the segment, in milliseconds. |
|
endTimestamp |
Integer |
1678854649720 |
The end timestamp of the segment, in milliseconds. |
|
text |
String |
nasty |
The transcribed text of the audio segment. |
|
url |
String |
https://aliyundoc.com |
A temporary URL for the audio segment. This URL expires after 30 minutes. Save the content promptly. |
|
labels |
String |
pullinTraffic |
Tags (separate multiple tags with commas). Includes:
|
|
RiskLevel |
String |
high |
The risk level of the audio segment. Possible values:
|
|
riskWords |
String |
AAA,BBB,CCC |
Risk words detected, separated by commas. |
|
riskTips |
String |
sexuality_Suggestive |
Sub-tags, separated by commas. |
|
extend |
String |
{\"riskTips\":\"sexuality_Suggestive\",\"riskWords\":\"pxxxxy\"} |
Reserved field. |
Examples
Sample request
{
"service":"audio_multilingual_cb",
"serviceParameters":"{\"taskId\":\"AAAAA-BBBBB"}"
}
Sample success response
{
"Code": 200,
"Data": {
"DataId": "voice20240307***",
"LiveId": "liveId1****",
"RiskLevel": "high",
"SliceDetails": [
{
"EndTime": 4065,
"Labels": "political_content,xxxx",
"RiskLevel": "high",
"RiskTips": "contraband_prohibited_items",
"RiskWords": "risk word A",
"StartTime": 0,
"Text": "Content Moderation product test case",
"Url": "https://aliyundoc.com"
}
]
},
"Message": "OK",
"RequestId": "AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****"
}
Callback message format
Callback messages are sent as JSON-formatted form data:
|
Field Name |
Type |
Description |
|
checksum |
String |
A checksum string generated by applying the SHA256 algorithm to the concatenation of The user UID is your Alibaba Cloud account ID, which you can find in the Alibaba Cloud Management Console. To prevent tampering, verify the received checksum by regenerating it using the same algorithm. Note
The user UID must be your Alibaba Cloud account UID, not a RAM user UID. |
|
taskId |
String |
The task ID of the callback message. |
|
content |
String |
The serialized moderation result as a JSON string. Parse it into a JSON object. The structure matches the response from "Query task results." For details, see Response parameters. |
Code descriptions
The following table describes the codes returned by the API. Only requests with code 200 are billed.
|
Code |
Description |
|
200 |
Request succeeded. |
|
280 |
Moderation in progress. |
|
400 |
Request parameters are empty. |
|
401 |
Invalid request parameters. |
|
402 |
Request parameter length exceeds the allowed limit. Check and correct it. |
|
403 |
Request exceeds the QPS limit. Check and adjust your QPS settings. |
|
404 |
File download failed. Check the file or retry. |
|
405 |
File download timed out, possibly because the file is inaccessible. Check and retry. |
|
406 |
File size exceeds the allowed limit. Check and retry. |
|
407 |
File format is not supported. Check and retry. |
|
408 |
The account lacks permission to call this API. This may be because the service is not activated, the account has an overdue payment, or the calling account is not authorized. |
|
480 |
Concurrent stream limit exceeded. Check and adjust concurrency. |
|
500 |
System error. |