All Products
Search
Document Center

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

Last Updated:Mar 26, 2026

The ARTC SDK provides real-time audio effects, including voice change, reverberation, and voice beautification. During a Real-Time Communication (RTC) call, you can call APIs to apply these effects to a local user's voice and create a more engaging and entertaining experience.

Features

You can quickly enable these audio effects by calling the relevant APIs:

  • Voice change: Change the user's voice to sound like an elder, a boy, or a girl.

  • Reverberation: Add a reverberation effect to create a spatial ambiance, making the user's voice sound as if it's coming from a specific venue.

  • Voice beautification: Fine-tune the timbre of a voice to a specific style, such as Magnetic or Fresh.

  • Custom voice effect: In addition to the preset modes, you can call APIs to adjust the pitch, reverberation, and equalizer settings to create custom voice effects.

Sample 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 begin, ensure you have completed the following:

Implementation

This section describes how to call the APIs in your project to apply various audio effects.

Voice change

Call the setAudioEffectVoiceChangerMode method to apply a voice change effect, such as Elder, Boy, or Girl. Each effect corresponds to an enumeration value, listed in the table below:

Voice change mode

Enumeration

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

// Set the preset voice change mode.
mAliRtcEngine.setAudioEffectVoiceChangerMode(mode);

iOS

// Set the preset voice change mode.
self.rtcEngine?.setAudioEffectVoiceChangerMode(mode)

Mac

// Set the preset voice change mode.
[self.rtcEngine setAudioEffectVoiceChangerMode:mode];

Windows

// Set the preset voice change mode.
mAliRtcEngine->SetAudioEffectVoiceChangerMode(mode);

Reverberation

Call the setAudioEffectReverbMode method to apply a reverberation effect. This creates a spatial ambiance that makes the voice sound as if in a specific venue. The table below lists the available modes:

Reverberation mode

Enumeration

Off

AliRtcSdk_AudioEffect_Reverb_Off

Vocal I

AliRtcSdk_AudioEffect_Reverb_Vocal_I

Vocal II

AliRtcSdk_AudioEffect_Reverb_Vocal_II

Bathroom

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

// Set the preset reverberation mode.
mAliRtcEngine.setAudioEffectReverbMode(mode);
// You can also configure the effect by using parameters.

iOS

// Set the preset reverberation mode.
self.rtcEngine?.setAudioEffectReverbMode(mode)

Mac

// Set the preset reverberation mode.
[self.engine setAudioEffectReverbMode:selectMode];

Windows

// Set the preset reverberation mode.
mAliRtcEngine->SetAudioEffectReverbMode(mode);
// You can also configure the effect by using parameters.

Voice beautification

Call the setAudioEffectBeautifyMode method to apply a voice beautification effect. Two preset modes are available: Magnetic and Fresh.

Voice beautification mode

Enumeration

Magnetic

AliRtcSdk_AudioEffect_Beautify_Magnetic

Fresh

AliRtcSdk_AudioEffect_Beautify_Fresh

Android

// Set the preset voice beautification mode.
mAliRtcEngine.setAudioEffectBeautifyMode(mode);
// You can also configure the effect by using parameters.

iOS

// Set the preset voice beautification mode.
self.rtcEngine?.setAudioEffectBeautifyMode(mode)

Mac

// Set the preset voice beautification mode.
[self.engine setAudioEffectBeautifyMode:selectMode];

Windows

// Set the preset voice beautification mode.
mAliRtcEngine->SetAudioEffectBeautifyMode(mode);
// You can also configure the effect by using parameters.

Custom voice effect

If the preset audio effects do not meet your needs, you can call the following methods to adjust the pitch, equalizer, and reverberation parameters to create a custom voice effect.

You can use the following methods:

  • setAudioEffectPitchValue(value): Sets the voice pitch.

    • value: The pitch value. The range is [0.5, 2.0]. The default value is 1.0, which indicates no change. A value less than 1.0 lowers the pitch, and a value greater than 1.0 raises the pitch.

  • setAudioEffectReverbParamType(type, value): Sets a specific reverberation parameter. You must call this method after calling setAudioEffectReverbMode.

  • setAudioEffectEqualizationParam(bandIndex, gain): Sets an equalizer parameter. You must call this method after calling setAudioEffectBeautifyMode.

    • bandIndex: The index of the equalizer band. The range is [0, 9], which corresponds to the 10 frequency bands: 31, 62, 125, 250, 500, 1000, 2000, 4000, 8000, and 16000 Hz.

    • gain: The gain of the band in dB. The range is [-15, 15]. The default value is 0.

Android

// Set the pitch. The value ranges from 0.5 to 2.0. The default is 1.0.
// A value less than 1.0 lowers the pitch, and a value greater than 1.0 raises it.
mAliRtcEngine.setAudioEffectPitchValue(1.5);

// To set custom reverb parameters, you must first set a reverb mode.
// Example: Set the mode to Large Room, then adjust the room size.
mAliRtcEngine.setAudioEffectReverbMode(AliRtcEngine.AliRtcAudioEffectReverbMode.AliRtcSdk_AudioEffect_Reverb_Large_Room);
mAliRtcEngine.setAudioEffectReverbParamType(AliRtcEngine.AliRtcAudioEffectReverbParamType.AliRtcSdk_AudioEffect_Reverb_Room_Size, 50);

// To set custom equalizer parameters, you must first set a voice beautification mode.
// Example: Set the mode to Magnetic, then adjust the gain of a specific band.
mAliRtcEngine.setAudioEffectBeautifyMode(AliRtcEngine.AliRtcAudioEffectBeautifyMode.AliRtcSdk_AudioEffect_Beautify_Magnetic);
mAliRtcEngine.setAudioEffectEqualizationParam(AliRtcEngine.AliRtcAudioEffectEqualizationBandFrequency.AliRtcSdk_AudioEffect_EqualizationBand1K, 5);       

iOS

// Set the pitch. The value ranges from 0.5 to 2.0. The default is 1.0.
// A value less than 1.0 lowers the pitch, and a value greater than 1.0 raises it.
let pitch = 1.5
self.rtcEngine?.setAudioEffectPitchValue(pitch)

// To set custom reverb parameters, you must first set a reverb mode.
// Example: Set the mode to Large Room, then adjust the room size.
self.rtcEngine?.setAudioEffectReverbMode(.large_Room)
self.rtcEngine?.setAudioEffectReverbParamType(.room_Size, value: 50)

// To set custom equalizer parameters, you must first set a voice beautification mode.
// Example: Set the mode to Magnetic, then adjust the gain of a specific band.
self.rtcEngine?.setAudioEffectBeautifyMode(.magnetic)
self.rtcEngine?.setAudioEffectEqualizationParam(.band1K, gain: 5)

Mac

// Set the pitch. The value ranges from 0.5 to 2.0. The default is 1.0.
// A value less than 1.0 lowers the pitch, and a value greater than 1.0 raises it.
int pitch = 1.5;
[self.rtcEngine setAudioEffectPitchValue:pitch];

// To set custom reverb parameters, you must first set a reverb mode.
// Example: Set the mode to Large Room, then adjust the room size.
[self.rtcEngine setAudioEffectReverbMode:AliRtcAudioEffectReverb_Large_Room];
[self.rtcEngine setAudioEffectReverbParamType:AliRtcAudioEffectReverb_Room_Size value:50.0];

// To set custom equalizer parameters, you must first set a voice beautification mode.
// Example: Set the mode to Magnetic, then adjust the gain of a specific band.
[self.rtcEngine setAudioEffectBeautifyMode:AliRtcAudioEffectBeautify_Magnetic];
[self.rtcEngine setAudioEffectEqualizationParam:AliRtcAudioEffectEqualizationBand1K gain:5.0];

Windows

// Set the pitch. The value ranges from 0.5 to 2.0. The default is 1.0.
// A value less than 1.0 lowers the pitch, and a value greater than 1.0 raises it.
mAliRtcEngine->SetAudioEffectPitchValue(1.5);

// To set custom reverb parameters, you must first set a reverb mode.
// Example: Set the mode to Large Room, then adjust the room size.
mAliRtcEngine->SetAudioEffectReverbMode(AliEngineAudioEffectReverbMode::AliEngineAudioEffectReverb_Large_Room);
mAliRtcEngine->SetAudioEffectReverbParamType(AliEngineAudioEffectReverbParamType::AliEngineAudioEffectReverbParamType_Room_Size, 50.0f);

// To set custom equalizer parameters, you must first set a voice beautification mode.
// Example: Set the mode to Magnetic, then adjust the gain of a specific band.
mAliRtcEngine->SetAudioEffectBeautifyMode(AliEngineAudioEffectBeautifyMode::AliEngineAudioEffectBeautify_Magnetic);
mAliRtcEngine->SetAudioEffectEqualizationParam(AliEngineAudioEffectEqualizationBandFrequency::AliEngineAudioEffectEqualizationBandFrequency_Band1K, 5.0f);