Voice recording for Real-time Conversational AI

更新时间:
复制 MD 格式

This topic describes how to use the voice recording feature for Real-time Conversational AI, its callback events, and billing rules.

Overview

The voice recording feature records voice calls between users and agents in Real-time Conversational AI. It stores the recordings as WAV files in your Object Storage Service (OSS) bucket.

The feature supports two recording modes:

  • Full-call recording: Records the entire voice call from start to finish as a single, merged WAV audio file.

  • Sentence-by-sentence recording: Records each sentence from the user and the agent into a separate WAV audio file.

    Note

    Audio from avatar solutions, such as text-to-speech from a digital avatar, cannot be recorded.

Limitations: Voice recording is available only for audio-only calls. For calls that include video, use the server-side recording feature of ApsaraVideo Real-time Communication (ARTC).

Before you begin

Complete the following prerequisites before you configure voice recording:

  • Activate the Real-time Conversational AI service and create an agent. For more information, see Create an audio/video call agent.

  • Activate Object Storage Service (OSS) and create a bucket to store recordings. The bucket must be in the same region as your agent. For more information, see Get started with the OSS console.

Configuration

  1. Go to the Real-time Conversational AI AI Agents page.

  2. Select the agent you want to configure, click Manage, and then go to the Voice Recording tab.

    The tab describes two recording modes: Full-call recording (records the entire audio call to OSS, for audio-only calls) and Sentence-by-sentence recording (archives each sentence as a separate file; audio from avatar solutions is not recorded). The current status is Not enabled. Click Enable or Modify Configuration to open the settings.

  3. Click Enable and fill in the configuration details.

    In the Voice Recording dialog box, select one or both recording types: Full-call recording and Sentence-by-sentence callbacks for user and agent audio. For each selected type, you must provide a callback URL and an OSS storage location. You can also specify an authentication token. For better security, use an HTTPS callback URL. Click Select to choose the OSS path. To apply the same callback URL and authentication token to both types, click Batch fill.

  4. Click OK to save the configuration.

Retrieve recording files

When a recording is generated, Real-time Conversational AI sends a callback event with the file information to your configured callback URL. The event type varies depending on the recording mode:

Recording mode

Event type (eventType)

Description

Full-call recording

full_audio_record

When the call ends, a callback event is sent with information about the complete recording.

Sentence-by-sentence recording

audio_record

When each recording segment is generated, a callback event is sent with information about that segment.

For the detailed callback payload structure, see Agent callbacks.

Billing

We bill for voice recording based on the cumulative duration of recorded audio, measured in minutes. We round up any duration less than one minute and bill it as one minute.

  • Full-call recording: Billed based on the total duration of a single call. For example, a call lasting 5 minutes and 30 seconds is billed as 6 minutes.

  • Sentence-by-sentence recording: Billed based on the sum of the durations of all recording segments within a single call. For example, if a call produces three segments of 20 seconds, 35 seconds, and 40 seconds, the total duration is 95 seconds (1 minute and 35 seconds), which is billed as 2 minutes.

Pricing

  • Chinese mainland: CNY 0.009 per minute

  • Singapore: CNY 0.018 per minute