All Products
Search
Document Center

ApsaraVideo Live:Configure voice change, reverberation, and voice beautification

Last Updated:Nov 19, 2025

The Alibaba Real-Time Communication (ARTC) software development kit (SDK) provides real-time sound effects, such as voice change, reverberation, and voice beautification. During audio and video calls, you can call the APIs to add rich sound effects to the local voice and enhance the interactive entertainment experience.

Feature introduction

Developers can quickly enable sound effects by calling the relevant APIs:

  • Voice change: Changes the human voice to create effects, such as the voice of an elder, a boy, or a girl.

  • Reverberation: Creates a specific spatial atmosphere, making the voice sound as if it is coming from a particular venue.

  • Voice beautification: Fine-tunes the timbre of the human voice in specific ways, such as making it sound magnetic or fresh.

  • Custom voice effects: In addition to the preset sound effect modes, you can create custom voice effects. You can call the relevant interfaces to adjust the pitch, reverberation, and equalization of the voice.

Sample source code

ARTC provides an open-source sample project. You can download the project or view the source code at the following locations:

Configure voice change, reverberation, and voice beautification on Android: Android/ARTCExample/BasicUsage/src/main/java/com/aliyun/artc/api/basicusage/VoiceChange/VoiceChangeActivity.java

Configure voice change, reverberation, and voice beautification on iOS: iOS/ARTCExample/BasicUsage/VoiceChange/VoiceChangeVC.swift

Prerequisites

Before you set the video configuration, ensure that the following prerequisites are met:

  • Create an ApsaraVideo Real-time Communication application using a valid Alibaba Cloud account. For more information, see Create an application. Then, obtain the App ID and App Key from the Management Console.

  • Integrate the ARTC SDK into your project and implement basic real-time audio and video features. For more information about SDK integration, see Download/Integrate SDKs. For more information about implementing audio and video calls, see Implement an audio and video call.

Implementation

This section describes how to call the relevant interfaces in your project to implement various sound effects.

Voice change

You can call the setAudioEffectVoiceChangerMode interface to set a voice change effect. This effect can make a voice sound like that of an elder, a boy, or a girl. Each sound effect corresponds to an enumeration value. The available voice change modes are as follows:

Voice change effect mode

Enumeration value

Off

AliRtcSdk_AudioEffect_Voice_Changer_OFF

Elder

AliRtcSdk_AudioEffect_Voice_Changer_Oldman

Boy

AliRtcSdk_AudioEffect_Voice_Changer_Babyboy

Girl

AliRtcSdk_AudioEffect_Voice_Changer_Babygirl

Robot

AliRtcSdk_AudioEffect_Voice_Changer_Robot

Devil

AliRtcSdk_AudioEffect_Voice_Changer_Daimo

KTV

AliRtcSdk_AudioEffect_Voice_Changer_Ktv

Echo

AliRtcSdk_AudioEffect_Voice_Changer_Echo

Dialect

AliRtcSdk_AudioEffect_Voice_Changer_Dialect

Roar

AliRtcSdk_AudioEffect_Voice_Changer_Howl

Electronic

AliRtcSdk_AudioEffect_Voice_Changer_Electronic

Phonograph

AliRtcSdk_AudioEffect_Voice_Changer_Phonograph

Android

/* The preset voice change mode. */
mAliRtcEngine.setAudioEffectVoiceChangerMode(mode);

iOS

/* The preset voice change mode. */
self.rtcEngine?.setAudioEffectVoiceChangerMode(mode)

Windows

/* The preset voice change mode. */
mAliRtcEngine->SetAudioEffectVoiceChangerMode(mode);

Reverberation

You can call the setAudioEffectReverbMode interface to implement reverberation effects. These effects create a specific spatial atmosphere, making the voice sound as if it is coming from a particular venue. The related enumeration values are as follows:

Reverberation mode

Enumeration value

Reverberation off

AliRtcSdk_AudioEffect_Reverb_Off

Vocal I

AliRtcSdk_AudioEffect_Reverb_Vocal_I

Vocal II

AliRtcSdk_AudioEffect_Reverb_Vocal_II

Bathhouse

AliRtcSdk_AudioEffect_Reverb_Bathroom

Small bright room

AliRtcSdk_AudioEffect_Reverb_Small_Room_Bright

Small dark room

AliRtcSdk_AudioEffect_Reverb_Small_Room_Dark

Medium room

AliRtcSdk_AudioEffect_Reverb_Medium_Room

Large room

AliRtcSdk_AudioEffect_Reverb_Large_Room

Church hall

AliRtcSdk_AudioEffect_Reverb_Church_Hall

Android

/* The preset reverberation mode. */
mAliRtcEngine.setAudioEffectReverbMode(mode);
/* You can also specify the mode by configuring parameters. */

iOS

/* The preset reverberation mode. */
self.rtcEngine?.setAudioEffectReverbMode(mode)

Windows

/* The preset reverberation mode. */
mAliRtcEngine->SetAudioEffectReverbMode(mode);
/* You can also specify the mode by configuring parameters. */

Voice beautification

You can call the setAudioEffectBeautifyMode interface to implement voice beautification. Two preset modes are supported: magnetic and fresh.

Voice beautification mode

Enumeration value

Magnetic

AliRtcSdk_AudioEffect_Beautify_Magnetic

Fresh

AliRtcSdk_AudioEffect_Beautify_Fresh

Android

/* The preset voice beautification mode. */
mAliRtcEngine.setAudioEffectBeautifyMode(mode);
/* You can also specify the mode by configuring parameters. */

iOS

/* The preset voice beautification mode. */
self.rtcEngine?.setAudioEffectBeautifyMode(mode)

Windows

/* The preset voice beautification mode. */
mAliRtcEngine->SetAudioEffectBeautifyMode(mode);
/* You can also specify the mode by configuring parameters. */

Custom voice effects

If the preset sound effects do not meet your requirements, you can call the following interfaces to adjust the voice's pitch, equalization, and reverberation parameters. This lets you create custom voice effects.

The relevant interfaces are as follows:

  • setAudioEffectPitchValue(value): Sets the pitch parameter.

    • value: The value range is [0.5, 2.0]. A value of 1.0 indicates that the pitch is unchanged. A value less than 1.0 lowers the pitch. A value greater than 1.0 raises the pitch.

  • setAudioEffectReverbParamType(type, value): Sets reverberation effect parameters. This interface must be called after setAudioEffectReverbMode.

  • setAudioEffectEqualizationParam: Sets equalizer parameters. This interface must be called after setAudioEffectBeautifyMode.

    • bandIndex: The number of equalizer bands. The value range is [0, 9], which represents 10 frequency bands: 31, 62, 125, 250, 500, 1000, 2000, 4000, 8000, and 16000 Hz.

    • gain: The equalizer gain. The value ranges from -15 dB to 15 dB. The default value is 0.

Android

// Set the pitch. The value range is [0.5, 2.0]. A value of 1.0 indicates that the pitch is unchanged. A value less than 1.0 lowers the pitch. A value greater than 1.0 raises the pitch.
mAliRtcEngine.setAudioEffectPitchValue(1.5);

// Sample code for setting reverberation parameters. This must be called after setAudioEffectReverbMode.
mAliRtcEngine.setAudioEffectReverbMode(AliRtcEngine.AliRtcAudioEffectReverbMode.AliRtcSdk_AudioEffect_Reverb_Large_Room);
mAliRtcEngine.setAudioEffectReverbParamType(AliRtcEngine.AliRtcAudioEffectReverbParamType.AliRtcSdk_AudioEffect_Reverb_Room_Size, 50);

// Sample code for setting voice beautification parameters.
mAliRtcEngine.setAudioEffectBeautifyMode(AliRtcEngine.AliRtcAudioEffectBeautifyMode.AliRtcSdk_AudioEffect_Beautify_Magnetic);
mAliRtcEngine.setAudioEffectEqualizationParam(AliRtcEngine.AliRtcAudioEffectEqualizationBandFrequency.AliRtcSdk_AudioEffect_EqualizationBand1K, 5);       

iOS

// Set the pitch. The value range is [0.5, 2.0]. A value of 1.0 indicates that the pitch is unchanged. A value less than 1.0 lowers the pitch. A value greater than 1.0 raises the pitch.
let pitch = 1.5
self.rtcEngine?.setAudioEffectPitchValue(pitch)

// Sample code for setting reverberation parameters. This must be called after setAudioEffectReverbMode.
self.rtcEngine?.setAudioEffectReverbMode(.large_Room)
self.rtcEngine?.setAudioEffectReverbParamType(.room_Size, value: 50)

// Sample code for setting voice beautification parameters.
self.rtcEngine?.setAudioEffectBeautifyMode(.vigorous)
self.rtcEngine?.setAudioEffectEqualizationParam(.band1K, gain: 5)