Voice Moderation Enhanced Edition multilingual service

Updated at:

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

  • The Singapore region supports 35 languages, including Chinese, English, Arabic, German, Russian, French, Korean, Japanese, Spanish, Italian, Indonesian, Vietnamese, Malay, Thai, Hindi, Turkish, Portuguese, Dutch, Polish, Bengali, Persian, Swedish, Danish, Norwegian, Icelandic, Finnish, Belarusian, Lithuanian, Czech, Slovak, Hungarian, Greek, and Romanian.

  • The US East (region) supports Chinese, English, and a mix of Chinese and English.

Supports only Chinese by default.

Moderation capability

  • Uses multiple parallel models combined with language and regional characteristics for more precise policies.

  • Adds new non-semantic feature detection models, such as moaning sound detection.

  • Uses a single model that balances accuracy and recall based on language characteristics.

  • Does not support moaning sound detection by default.

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

  • Uses adjustable fixed-duration segmentation. Fixed segment lengths improve manual review efficiency.

  • Returns all audio segments and their transcribed text, along with temporary URLs for manual review.

  • Uses semantic sentence-based segmentation, resulting in variable segment lengths from a few seconds to tens of seconds.

  • Returns only segments flagged as risky and does not provide temporary segment URLs by default.

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)

  • violence: violent or terrorist content

  • contraband: prohibited items

  • sexuality: pornographic content

  • profanity: profanity or abusive language

  • pullinTraffic: promotional or traffic-driving content

  • regional: regional conflict

  • C_customized: matched user-defined library

Sub-tags (riskTips)

Sub-tags are returned in the format xxx_yyy. For example: contraband_Drugs.

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.

Note

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)

  • Multilingual audio and video media moderation: audio_multilingual_cb

  • Multilingual live streaming moderation for social entertainment: stream_multilingual_cb

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

  1. Log on to the RAM console using your Alibaba Cloud account.

  2. Create a RAM user. For details, see Create a RAM user.

  3. Grant the AliyunYundunGreenWebFullAccess system 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

Note

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:

  • audio_multilingual_cb: multilingual audio and video media moderation

  • stream_multilingual_cb: multilingual live streaming moderation for social entertainment

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:

  • checksum: A string generated by applying the SHA256 algorithm to the concatenation of user UID + seed + content. 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.

  • content: A JSON-formatted string. Parse it into a JSON object. For an example of the content structure, see the response example in "Query moderation results."

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 user UID + seed + content using the specified algorithm before sending it to your callback URL. Valid values:

  • SHA256 (default): Uses the SHA256 algorithm.

  • SM3: Uses the Chinese national standard HMAC-SM3 algorithm, returning a lowercase hexadecimal string. For example, encrypting "abc" with SM3 returns "66c7f0f462eeedd9d1f2d46bdc10e4e24167c4875cf2f7a2297da02b8f4ba8e0".

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 UID + service + liveId. If found, it returns the existing taskId without starting a new task.

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:

  • high: high risk

  • medium: medium risk

  • low: low risk

  • none: no risk detected

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:

  • violence: violent or terrorist content

  • contraband: prohibited items

  • sexuality: pornographic content

  • profanity: profanity or abusive language

  • pullinTraffic: promotional or traffic-driving content

  • regional: regional conflict

  • C_customized: matched user-defined library

RiskLevel

String

high

The risk level of the audio segment. Possible values:

  • high: high risk

  • medium: medium risk

  • low: low risk

  • none: no risk detected

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 user UID + seed + content.

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.