This topic describes how to integrate Enhanced Voice Auditing with Alibaba Cloud RTC to identify audio content that contains violations or is otherwise disruptive.
Integrate with Alibaba Cloud RTC
Prerequisites
You have enabled Enhanced Voice Auditing in Content Security. For more information, see Enable the enhanced edition of audio moderation.
You have enabled interactive streaming. For more information, see Enable Interactive Live Streaming.
(Recommended) Native review
Solution architecture
Content Security provides a native review solution for Alibaba Cloud RTC. When you call the moderation API, you specify parameters such as the channel and user ID. The service then uses a virtual user to join the channel, retrieve the audio stream, and detect prohibited content in real time. If the service finds any violations, it sends a notification to your application server.

Key benefits
This solution leverages the tight integration between Alibaba Cloud products. Unlike third-party content security services, you do not incur additional audio and video call duration charges when Content Security retrieves streams from Alibaba Cloud RTC.
Faster moderation: End-to-end latency is typically within seconds, compared to ten or more seconds for server-side stream pushing.
Lower costs: This solution eliminates extra transcoding and live stream pushing fees.
Simplified integration: You can initiate moderation by simply providing specific parameters, making the integration process much easier.
Billing
The native review solution incurs the following charges:
Type | Description |
Audio and video call duration fees | Charges for audio and video calls are based on the duration of user interaction. For more information, see Audio and video call billing. |
Enhanced Voice Auditing fees | Charges are based on the duration of the moderated audio stream. For more information, see Billing of the enhanced edition of audio moderation. |
Procedure
Obtain the Alibaba Cloud RTC App ID, virtual user ID, and token. For more information, see Use a token for authentication.
Call the Enhanced Voice Auditing API, passing the parameters obtained in the previous step and specifying the channel and user to moderate to start content detection on Alibaba Cloud RTC. For detailed instructions, see the Enhanced edition of audio moderation V2.0 SDK and integration guide.
Set the
Serviceparameter tolive_stream_detection.In the
ServiceParametersparameter, set thecallbackfield to the URL where you want to receive notifications. For more information, see the Enhanced edition of audio moderation API.In the
ServiceParametersparameter, include theextrafield to specify the Alibaba Cloud RTC connection details:
Parameter | Type | Required | Example value | Description |
extra | String | No | {"AlirtcAppId":"App123", "AlirtcTokenId": "Uid123456", "AlirtcToken": "Token123456", "AlirtcChannelId":"Channel123"} | A JSON string containing extended parameters. The fields in this parameter are described in the following table. |
Table 1. Fields in the extra parameter
Parameter | Type | Required | Description |
AlirtcAppId | String | No | The App ID for Alibaba Cloud RTC. |
AlirtcTokenId | String | No | The Alibaba Cloud RTC virtual user ID used for moderation. |
AlirtcToken | String | No | The token corresponding to the Alibaba Cloud RTC virtual user. |
AlirtcChannelId | String | No | The Alibaba Cloud RTC channel to moderate. For stream mixing mode, only |
AlirtcUserId | String | No | The Alibaba Cloud RTC user ID to moderate. For single-stream review, you must specify both |
Request example
{
"service":"live_stream_detection",
"serviceParameters":"{\"cryptType\":\"SHA256\",\"seed\":\"abc***123\",\"callback\":\"https://aliyun.com/callback\",
\"extra\":\"{\"AlirtcAppId\":\"App123", \"AlirtcTokenId\": \"Uid123456\", \"AlirtcToken\": \"Token123456\",\"AlirtcChannelId\":\"Channel123\"}\"}"
}