logo
On this page

Voice Changer/Reverb/Stereo

2026-03-12

Feature Introduction

In live streaming, voice chat rooms, and KTV rooms, to increase fun and interactivity, players can use voice changers to make fun, use reverb to enhance the atmosphere, and use stereo to make the sound more three-dimensional. ZEGO Express SDK provides a variety of preset voice changer, reverb, reverb echo, and stereo effects. Developers can flexibly set the sound they want. If they need to audition, they can enable in-ear monitoring for testing.

  • Voice Changer: By changing the user's pitch, the output sound is perceptually different from the original sound, achieving various effects such as male voice to female voice.
  • Reverb: Through special processing of the sound, reverb effects of different environments are created, making the sound as if it were emitted in scenes such as concert halls and cathedrals.
  • Reverb Echo: Through special processing of the sound, it can be combined with voice changers and reverb to achieve various custom sound effects, such as ethereal and robot sounds.
  • Virtual Stereo: Through deep use of dual-channel technology, various position angles of the sound source are virtually generated to achieve stereo, 3D surround sound, sound positioning, and other effects.

You can experience the SDK's preset human voice effects through the Audio Effects Experience DEMO provided by ZEGO.

Note

This feature is only valid for sound collected by the SDK. Developers can dynamically adjust voice changer, reverb, reverb echo, and virtual stereo during calls or live streaming.

Sample Source Code Download

Please refer to Download Sample Source Code to get the source code.

For related source code, please check the files in the "/ZegoExpressExample/Examples/AdvancedAudioProcessing/VoiceChangeReverbStereo" directory.

Prerequisites

Before using voice changer/reverb/stereo, please ensure:

Usage Steps

Voice Changer

There are two ways to set voice changer: preset voice changer and custom voice changer.

Set preset voice changer

Note

If you need to set custom voice changer, please refer to Set Custom Voice Changer.

Call the setVoiceChangerPreset method to use the SDK's preset voice changer effects.

The ZegoVoiceChangerPreset preset voice changer effects are as follows. Developers can choose according to their needs:

Type NamePreset ValueDescriptionVoice Changer Type
None0No voice changer-
MenToChild1Male voice to child voiceVoice changer
MenToWomen2Male voice to female voiceVoice changer
WomenToChild3Female voice to child voiceVoice changer
WomenToMen4Female voice to male voiceVoice changer
Foreigner5Foreigner sound effectVoice changer
OptimusPrime6Optimus Prime sound effectVoice changer
Android7Robot sound effectVoice changer
Ethereal8Ethereal sound effectTimbre transformation
MaleMagnetic9Magnetic maleRoom beautification
FemaleFresh10Fresh femaleRoom beautification
MajorC11C Major electric soundElectric sound effect
MinorA12A Minor electric soundElectric sound effect
HarmonicMinor13Harmonic Minor electric soundElectric sound effect
FemaleEnergetic14Energetic female sound effectRoom beautification
RichNess15Rich sound effectRoom beautification
Muffled16Deep sound effectTimbre transformation
Roundness17Round sound effectRoom beautification
Falsetto18Falsetto sound effectRoom beautification
Fullness19Full sound effectRoom beautification
Clear20Clear sound effectRoom beautification
HighlyResonant21High-pitched sound effectRoom beautification
LoudClear22Loud and clear sound effectRoom beautification
Minions23Minion sound effectVoice changer
Autobot30Autobot sound effectVoice changer
OutOfPower31Out of power sound effectVoice changer
Note

To use the Autobot and OutOfPower voice changer effects, please contact technical support for custom SDK packaging.

The following example code takes "Male voice to child voice" as an example:

[[ZegoExpressEngine sharedEngine] setVoiceChangerPreset:ZegoVoiceChangerPresetMenToChild];

Set custom voice changer

Note

If you need to set preset voice changer, please refer to Set Preset Voice Changer.

If the SDK's preset voice changer effects cannot meet your needs, developers can call the setVoiceChangerParam method ZegoVoiceChangerParam to set custom voice changer through the pitch parameter "pitch". The value range of this parameter is [-12.0, 12.0]. The larger the value, the sharper the sound. The default value is "0.0" (that is, no voice changer).

Warning

For version 2.18.0 and earlier, the value range is [-8.0, 8.0].

ZegoVoiceChangerParam *param = [[ZegoVoiceChangerParam alloc] init];
param.pitch = 2.0;
[[ZegoExpressEngine sharedEngine] setVoiceChangerParam:param];

Reverb

There are two ways to set reverb: preset reverb and custom reverb.

Set preset reverb

Note

If you need to set custom reverb, please refer to Set Custom Reverb.

Call the setReverbPreset to set reverb through preset enumeration.

The ZegoReverbPreset preset reverb effects are as follows. Developers can choose according to their needs:

Type NamePreset ValueDescriptionReverb Type
None0None-
SoftRoom1Small roomSpatial shaping
LargeRoom2Large roomSpatial shaping
ConcerHall3Concert hallSpatial shaping
Valley4ValleySpatial shaping
RecordingStudio5Recording studioSpatial shaping
Basement6BasementSpatial shaping
KTV7KTVSpatial shaping
Popular8PopMusic style
Rock9RockMusic style
VocalConcert10Vocal concertSpatial shaping
GramoPhone11GramophoneSpatial shaping
EnhancedKTV12Enhanced KTV, more focused and brighter KTV human voice effects, suitable for ordinary users and professional usersSpatial shaping

The following example code takes "Large room" mode as an example:

[[ZegoExpressEngine sharedEngine] setReverbPreset:ZegoReverbPresetLargeRoom];

Set custom reverb

Note

If you need to set preset reverb, please refer to Set Preset Reverb.

If the SDK's preset reverb types cannot meet your needs, developers can call the setReverbAdvancedParam method ZegoReverbAdvancedParam to combine and set relevant parameters to achieve the reverb effects required by developers (for detailed parameter descriptions, please refer to the API documentation).

ZegoReverbAdvancedParam *reverbParam = [[ZegoReverbAdvancedParam alloc] init];
// Reverb damping
reverbParam.damping = 50.0;
// Reverberance
reverbParam.reverberance = 50.0;
// Room size
reverbParam.roomSize = 50.0;
// Wet signal only
reverbParam.wetOnly = false;
// Wet signal gain (dB), value range [-20.0, 10.0]
reverbParam.wetGain = 5.0;
// Dry signal gain (dB), value range [-20.0, 10.0]
reverbParam.dryGain = 5.0;
// Low frequency attenuation, default is no attenuation (100%)
reverbParam.toneLow = 80.0;
// High frequency attenuation, default is no attenuation (100%)
reverbParam.toneHigh = 80.0;
// Initial delay time (ms). Value range [0, 200]
reverbParam.preDelay = 20.0;
// Stereo width (percentage), default value is 0%
reverbParam.stereoWidth = 0.0;

[[ZegoExpressEngine sharedEngine] setReverbAdvancedParam:reverbParam];
Warning

After setting custom reverb parameters, the preset reverb effects set when enabling reverb will become invalid. If you want to use the SDK preset parameters again, you can use the setReverbPreset preset enumeration method to set them.

Reverb Echo

Call the setReverbEchoParam method to combine and set relevant parameters to achieve the reverb echo effects required by developers (for detailed parameter descriptions, please refer to the API documentation).

The following example code takes implementing "Ethereal sound effect" as an example:

ZegoReverbEchoParam *echoParamEthereal = [[ZegoReverbEchoParam alloc] init];
// Gain of input audio signal, value range [0.0, 1.0]
echoParamEthereal.inGain = 0.8;
// Gain of output audio signal, value range [0.0, 1.0]
echoParamEthereal.outGain = 1.0;
// Number of echoes, value range [0, 7]
echoParamEthereal.numDelays = 7;
// Delays of echo signals respectively
echoParamEthereal.delay = @[@230, @460, @690, @920, @1150, @1380, @1610];
// Decay coefficients of echo signals respectively
echoParamEthereal.decay = @[@0.41f, @0.18f, @0.08f, @0.03f, @0.009f, @0.003f, @0.001f];
[[ZegoExpressEngine sharedEngine] setReverbEchoParam:echoParamEthereal];

Virtual Stereo

Set publishing stream audio channel count

If you need to enable the virtual stereo feature, you must first call the setAudioConfig method before publishing stream to set the audio encoding channel to Stereo dual-channel (default is Mono mono-channel).

The example here constructs ZegoAudioConfig through preset enumeration and sets it to dual-channel.

ZegoAudioConfig *config = [ZegoAudioConfig configWithPreset:ZegoAudioConfigPresetStandardQualityStereo];
[[ZegoExpressEngine sharedEngine] setAudioConfig:config];

Set virtual stereo parameters

After setting the audio encoding channel to dual-channel, call the enableVirtualStereo method, enable virtual stereo through the "enable" parameter, and set the sound source angle of virtual stereo through the "angle" parameter to have a stereo effect. The angle range is 0 to 360. Generally, it can be set to 90 degrees (that is, directly in front).

Note

Since version 2.15.0, the SDK has newly supported all-around virtual stereo effects. The usage is to set the "angle" angle parameter to "-1".

The example here enables virtual stereo and sets the angle to 90 degrees:

[[ZegoExpressEngine sharedEngine] enableVirtualStereo:YES angle:90];

The example here enables all-around virtual stereo:

[[ZegoExpressEngine sharedEngine] enableVirtualStereo:YES angle:-1];

Previous

Audio 3A Processing

Next

Audio Mixing