Integrate Voice Moderation Pro with third-party RTC

更新时间:
复制 MD 格式

This topic shows you how to integrate Enhanced Voice Moderation with Volcano Engine RTC, Agora RTC, and ZEGO RTC to detect non-compliant voice content.

Integrate with Volcano Engine RTC

Prerequisites

  • You have activated the Enhanced Voice Moderation service. For more information, see Activate Content Moderation Pro.

  • You have activated the Volcano Engine Real-Time Communication (RTC) product. For more information, see Activate RTC.

Approach 1: Native integration (Recommended)

Technical architecture

Content Moderation natively integrates with Volcano Engine RTC. When you call the moderation API with parameters such as the room and user ID, a virtual user joins the room to pull the audio stream. The service then performs real-time detection for non-compliant content and notifies your application server.

image.png

Benefits

This approach offers several advantages:

  • Faster moderation: The end-to-end latency is typically within seconds, whereas sideload push-streaming can take ten seconds or more.

  • Cost-effective: This approach does not incur additional costs for transcoding or live stream pushing.

  • Simplified integration: You only need to provide specific parameters to start the process, which simplifies integration and usage.

Billing

This approach incurs the following costs:

Type

Description

Volcano Engine RTC audio and video communication fees

Includes fees for audio and video services, which are billed based on duration. For more information, see Billing of audio and video services.

Enhanced Voice Moderation fees

Billed based on the duration of the moderated audio stream. For more information, see Billing of Voice Moderation Pro.

Procedure

  1. Obtain the Volcano Engine RTC AppId, a virtual user ID for moderation, and the corresponding token. For more information, see Use a token for authentication.

  2. Call the Enhanced Voice Moderation API, provide the preceding parameters, and specify the room and user to be moderated. This starts voice content detection for Volcano Engine RTC. For more information, see Voice Moderation Pro SDK V2.0 and integration guide.

    Set the Detection Type to live_stream_detection and configure the extra field of the ServiceParameters parameter to specify RTC-related information. The following table describes the parameters.

    Parameter

    Type

    Required

    Example

    Description

    extra

    String

    No

    {"VolcAppId":"6fabbd****1a7e", "VolcTokenId": "User123456", "VolcToken": "6fabbd****1a7e"}

    A JSON string containing the required moderation parameters. For field descriptions, see extra.

    Note

    If you configure the extra field of the ServiceParameters parameter, you do not need to specify the url parameter.

    Table 1. extra

    Parameter

    Type

    Required

    Example

    Description

    VolcAppId

    String

    No

    6fabbd****1a7e

    The AppId of your Volcano Engine RTC application.

    VolcTokenId

    String

    No

    User123456

    The user ID of the virtual user for moderation in Volcano Engine RTC.

    VolcToken

    String

    No

    6fabbd****1a7e

    The virtual user's token in Volcano Engine RTC.

    VolcRoomId

    String

    No

    Room0107

    The ID of the room to be moderated in Volcano Engine RTC. To moderate a single stream, you must specify both VolcRoomId and VolcUserId.

    VolcUserId

    String

    No

    User0120

    The ID of the user to be moderated in Volcano Engine RTC. To moderate a single stream, you must specify both VolcRoomId and VolcUserId.

Approach 2: Sideload push-streaming

Technical architecture

Volcano Engine RTC can push audio content from a host's room to a CDN by using the sideload push-streaming feature. This converts the audio into a live stream URL. You can then provide this URL to the Enhanced Voice Moderation API to detect non-compliant content.

image.png

Billing

This approach incurs the following costs:

Note

The specific fees for Volcano Engine RTC depend on factors such as your usage, resolution, and whether transcoding is used. We recommend you confirm the pricing with Volcano Engine RTC before starting.

Type

Description

Volcano Engine RTC audio and video communication fees

Includes fees for audio and video services, which are billed based on duration. For more information, see Billing of audio and video services.

Volcano Engine RTC stream pushing fees

Stream pushing is billed based on the output resolution and duration. For more information, see Billing of stream pushing.

Live stream pushing fees

Live stream pushing incurs costs for bandwidth and data transfer. Billing standards vary by live streaming service provider.

Enhanced Voice Moderation fees

Billed based on the duration of the moderated audio stream. For more information, see Billing of Voice Moderation Pro.

Procedure

  1. Use a RESTful API to implement sideload push-streaming. For more information, see Push RTC streams of VolcEngine.

  2. Provide the RTMP stream URL to Enhanced Voice Moderation to start detecting non-compliant voice content from Volcano Engine RTC. For more information, see Voice Moderation Pro SDK V2.0 and integration guide.

    Set the detection type to live_stream_detection.

Approach 3: Cloud recording

Technical architecture

Volcano Engine RTC supports cloud recording to save voice chats and live streams to a third-party cloud storage service or Alibaba Cloud Object Storage Service (OSS). Once stored, you can provide its location to the Enhanced Voice Moderation API to detect non-compliant content.

image..png

Billing

This approach incurs the following costs:

Note

The specific fees for Volcano Engine RTC depend on factors such as your usage, resolution, and whether transcoding is used. We recommend you confirm the pricing with Volcano Engine RTC before starting.

Type

Description

Volcano Engine RTC recording fees

Recording fees include costs for audio and video, which are billed based on recording duration. For more information, see Billing of cloud recording.

Third-party storage fees

Includes costs for storage and public network access. Billing standards vary by storage service provider.

Note

If you use Alibaba Cloud Object Storage Service (OSS) for cloud recording, you can provide the OSS internal endpoint to the Enhanced Voice Moderation API to moderate the file. This avoids costs associated with public network access.

Enhanced Voice Moderation fees

Billed based on the duration of the moderated audio stream. For more information, see Billing of Voice Moderation Pro.

Procedure

  1. Send a RESTful API request to initiate cloud recording. For more information, see Cloud recording, Start cloud recording, and Push streams to a CDN.

  2. Provide the URL of the content stored in the third-party cloud storage service to Enhanced Voice Moderation to start detecting non-compliant voice content from Volcano Engine RTC. For more information, see Voice Moderation Pro SDK V2.0 and integration guide.

    Set the detection type to audio_media_detection.

Integrate with Agora RTC

Prerequisites

  • You have activated the Enhanced Voice Moderation service. For more information, see Activate Content Moderation Pro.

  • You have activated the Agora RTC product.

Approach 1: Sideload push-streaming

Technical architecture

Agora RTC can push audio content from a host's room to a CDN by using the sideload push-streaming feature. This converts the audio into a live stream URL. You can then provide this URL to the Enhanced Voice Moderation API to detect non-compliant content.

image..png

Billing

This approach incurs the following costs:

Note

The specific fees for Agora RTC depend on factors such as your usage, resolution, and whether transcoding is used. We recommend you confirm the pricing with Agora RTC before starting.

Type

Description

Agora RTC subscription fees

Subscription fees include costs for audio and video, which are billed based on duration. For more information, see Subscribe to audio and video streams.

Agora RTC transcoding fees

Transcoding fees are calculated based on the number of output streams. For more information, see Transcoding.

Live stream pushing fees

Live stream pushing incurs costs for bandwidth and data transfer. Billing standards vary by live streaming service provider.

Enhanced Voice Moderation fees

Billed based on the duration of the moderated audio stream. For more information, see Billing of Voice Moderation Pro.

Procedure

  1. Implement sideload push-streaming by using a RESTful API. For more information, see Media Push RESTful API.

  2. Provide the RTMP stream URL to Enhanced Voice Moderation to start detecting non-compliant voice content from Agora RTC. For more information, see Voice Moderation Pro SDK V2.0 and integration guide.

    Set the detection type to live_stream_detection.

Approach 2: Cloud recording

Technical architecture

Agora RTC supports cloud recording to save voice chats and live streams to a third-party cloud storage service or Alibaba Cloud OSS. Once stored, you can provide its location to the Enhanced Voice Moderation API to detect non-compliant content.

image..png

Billing

This approach incurs the following costs:

Note

The specific fees for Agora RTC depend on factors such as your usage, resolution, and whether transcoding is used. We recommend you confirm the pricing with Agora RTC before starting.

Type

Description

Agora RTC cloud recording fees

Recording fees include costs for audio and video, which are billed based on recording duration. For more information, see Agora Cloud Recording pricing.

Third-party storage fees

Includes costs for storage and public network access. Billing standards vary by storage service provider.

Note

If you use Alibaba Cloud OSS, you can provide the OSS internal endpoint to the Enhanced Voice Moderation API to moderate the file. This avoids costs associated with public network access.

Enhanced Voice Moderation fees

Billed based on the duration of the moderated audio stream. For more information, see Billing of Voice Moderation Pro.

Procedure

  1. Send a RESTful API request to initiate cloud recording. For more information, see Cloud Recording.

  2. Provide the URL of the content stored in the third-party cloud storage service to Enhanced Voice Moderation to start detecting non-compliant voice content from Agora RTC. For more information, see Voice Moderation Pro SDK V2.0 and integration guide.

    Set the detection type to audio_media_detection.

Integrate with ZEGO RTC

Prerequisites

  • You have activated the Enhanced Voice Moderation service. For more information, see Activate Content Moderation Pro.

  • You have activated the ZEGO RTC product.

Approach 1: Sideload push-streaming

Technical architecture

ZEGO RTC can push audio content from a host's room to a CDN by using the sideload push-streaming feature. This converts the audio into a live stream URL. You can then provide this URL to the Enhanced Voice Moderation API to detect non-compliant content.

image..png

Billing

This approach incurs the following costs:

Note

The specific fees for ZEGO RTC depend on factors such as your usage, resolution, and whether transcoding is used. We recommend you confirm the pricing with ZEGO RTC before starting.

Type

Description

ZEGO RTC subscription fees

Subscription fees include costs for audio and video, which are billed based on duration. For more information, see Pricing.

ZEGO RTC stream mixing fees

The usage of the stream mixing service is calculated based on the output resolution and transcoding duration. For more information, see Stream mixing pricing.

Live stream pushing fees

Live stream pushing incurs costs for bandwidth and data transfer. Billing standards vary by live streaming service provider.

Enhanced Voice Moderation fees

Billed based on the duration of the moderated audio stream. For more information, see Billing of Voice Moderation Pro.

Procedure

  1. Implement sideload push-streaming by using the custom CDN stream pushing feature. For more information, see Stream pushing to CDN.

  2. Provide the RTMP stream URL to Enhanced Voice Moderation to start detecting non-compliant voice content from ZEGO RTC. For more information, see Voice Moderation Pro SDK V2.0 and integration guide.

    Set the detection type to live_stream_detection.

Approach 2: Cloud recording

Technical architecture

ZEGO RTC supports cloud recording to save voice chats and live streams to a third-party cloud storage service or Alibaba Cloud OSS. Once stored, you can provide its location to the Enhanced Voice Moderation API to detect non-compliant content.

image..png

Billing

This approach incurs the following costs:

Note

The specific fees for ZEGO RTC depend on factors such as your usage, resolution, and whether transcoding is used. We recommend you confirm the pricing with ZEGO RTC before starting.

Type

Description

ZEGO RTC recording fees

Recording fees include costs for audio and video, which are billed based on recording duration. For more information, see Cloud recording.

Third-party storage fees

Includes costs for storage and public network access. Billing standards vary by storage service provider.

Note

If you use Alibaba Cloud OSS for cloud recording, you can provide the OSS internal endpoint to the Enhanced Voice Moderation API to moderate the file. This avoids costs associated with public network access.

Enhanced Voice Moderation fees

Billed based on the duration of the moderated audio stream. For more information, see Billing of Voice Moderation Pro.

Procedure

  1. Send a RESTful API request to initiate cloud recording. For more information, see Enable Cloud Recording.

  2. Provide the URL of the content stored in the third-party cloud storage service to Enhanced Voice Moderation to start detecting non-compliant voice content from ZEGO RTC. For more information, see Voice Moderation Pro SDK V2.0 and integration guide.

    Set the detection type to audio_media_detection.