logo
Video Call
On this page

Voice Changer/Reverb/Stereo

2026-03-12

Feature Overview

In live streaming, voice chat room, and Karaoke room scenarios, to increase fun and interactivity, players can use voice changer to be funny, use reverb to set the atmosphere, and use stereo to make 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 desired sound. If you need to preview, you 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 effects such as male voice to female voice.
  • Reverb: Through special processing of sound, create reverb effects of different environments, making the sound as if it were emitted in concert halls, cathedrals, and other scenes.
  • Reverb Echo: Through special processing of sound, can be combined with voice changer and reverb to achieve various customized sound effects, such as ethereal, robot sounds.
  • Virtual Stereo: Through deep use of dual-channel technology, virtually generate various positions and angles of sound sources, achieving effects such as stereo, 3D surround sound, and sound positioning.

You can experience the SDK's preset vocal effects through ZEGO's Audio Effect Experience DEMO.

Note

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

Example Source Code

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

For related source code, please check the files in the "/ZegoExpressExample/AdvancedAudioProcessing/src/main/java/im/zego/advancedaudioprocessing/voicechange" directory.

Prerequisites

Before implementing 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.

ZegoVoiceChangerPreset preset voice changer effects are as follows, developers can choose according to needs:

Type NamePreset ValueDescriptionVoice Changer Type
NONE0No voice changer-
MEN_TO_CHILD1Male voice to child voiceVoice changer
MEN_TO_WOMEN2Male voice to female voiceVoice changer
WOMEN_TO_CHILD3Female voice to child voiceVoice changer
WOMEN_TO_MEN4Female voice to male voiceVoice changer
FOREIGNER5Foreigner sound effectVoice changer
OPTIMUS_PRIME6Optimus Prime sound effectVoice changer
ANDROID7Robot sound effectVoice changer
ETHEREAL8Ethereal sound effectTimbre transformation
MALE_MAGNETIC9Magnetic maleRoom beauty voice
FEMALE_FRESH10Fresh femaleRoom beauty voice
MAJOR_C11C major electric soundElectric sound effect
MINOR_A12A minor electric soundElectric sound effect
HARMONIC_MINOR13Harmonic minor electric soundElectric sound effect
FEMALE_ENERGETIC14Energetic female sound effectRoom beauty voice
RICH_NESS15Rich sound effectRoom beauty voice
MUFFLED16Muffled sound effectRoom beauty voice
ROUNDNESS17Round sound effectRoom beauty voice
FALSETTO18Falsetto sound effectRoom beauty voice
FULLNESS19Full sound effectRoom beauty voice
CLEAR20Clear sound effectRoom beauty voice
HIGHLY_RESONANT21High-pitched sound effectRoom beauty voice
LOUD_CLEAR22Loud and clear sound effectRoom beauty voice
MINIONS23Minion sound effectVoice changer
AUTOBOT30Autobot sound effectVoice changer
OUT_OF_POWER31Out 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 uses "Male voice to child voice" as an example:

ZegoExpressEngine.getEngine().setVoiceChangerPreset(ZegoVoiceChangerPreset.MEN_TO_CHILD);

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 in 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" (i.e., no voice changer).

Warning

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

ZegoVoiceChangerParam voiceChangerParam = new ZegoVoiceChangerParam();
param.pitch = 2.0f;
ZegoExpressEngine.getEngine().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 setReverbPreset to set reverb through preset enumeration.

ZegoReverbPreset preset reverb effects are as follows, developers can choose according to needs:

Type NamePreset ValueDescriptionReverb Type
NONE0None-
SOFT_ROOM1Small roomSpatial shaping
LARGE_ROOM2Large roomSpatial shaping
CONCERT_HALL3Concert hallSpatial shaping
VALLEY4ValleySpatial shaping
RECORDING_STUDIO5Recording studioSpatial shaping
BASEMENT6BasementSpatial shaping
KTV7KTV, suitable for users with more obvious timbre flawsSpatial shaping
POPULAR8PopularMusic style
ROCK9RockMusic style
VOCAL_CONCERT10Vocal concertSpatial shaping
GRAMO_PHONE11GramophoneSpatial shaping
ENHANCED_KTV12Enhanced KTV, more focused and brighter KTV vocal effect, suitable for ordinary and professional usersSpatial shaping

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

ZegoExpressEngine.getEngine().setReverbPreset(ZegoReverbPreset.LARGE_ROOM);

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 in ZegoReverbAdvancedParam to achieve the required reverb effect through the combination of relevant parameters (for detailed parameter description, please refer to the API documentation).

ZegoReverbAdvancedParam reverbParam = new ZegoReverbAdvancedParam();
// Reverb damping
reverbParam.damping = 50.0;
// Reverberance
reverbParam.reverberance = 50.0;
// Room size
reverbParam.roomSize = 50.0;
// Wet 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, defaults to no attenuation (100%)
reverbParam.toneLow = 80.0;
// High frequency attenuation, defaults to 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.getEngine().setReverbAdvancedParam(reverbParam);
Warning

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

Reverb Echo

Call the setReverbEchoParam method to achieve the required reverb echo effect through the combination of relevant parameters (for detailed parameter description, please refer to the API documentation).

The following example code implements "Ethereal sound effect":

ZegoReverbEchoParam echoParam = new ZegoReverbEchoParam();
// Gain of input audio signal, value range [0.0, 1.0]
echoParam.inGain= 0.8f;
// Gain of output audio signal, value range [0.0, 1.0]
echoParam.outGain =1.0f;
// Number of echoes, value range [0, 7]
echoParam.numDelays = 7;
// Delays of echo signals respectively, unit is milliseconds, value range [0, 5000] ms
int[] delay ={230,460,690,920,1150,1380,1610};
echoParam.delay=delay;
// Decay coefficients of echo signals respectively, value range [0.0, 1.0]
float[] decay={0.41f,0.18f,0.08f,0.03f,0.009f,0.003f,0.001f};
echoParam.decay=decay;
zegoReverbEchoParamDatas.add(echoParam);
ZegoExpressEngine.getEngine().setReverbEchoParam(echoParam);

Virtual Stereo

Set publish stream audio channel count

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

This example uses preset enumeration to construct ZegoAudioConfig to set to dual-channel.

ZegoAudioConfig audioConfig = new ZegoAudioConfig(STANDARD_QUALITY_STEREO);
ZegoExpressEngine.getEngine().setAudioConfig(audioConfig);

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 achieve the stereo effect. The angle range is 0 to 360, generally can be set to 90 degrees (i.e., directly in front).

Note

Since version 2.15.0, the SDK has added support for omni-directional virtual stereo effects. The usage is to set the "angle" parameter to "-1".

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

ZegoExpressEngine.getEngine().enableVirtualStereo(true, 90);

This example enables omni-directional virtual stereo:

ZegoExpressEngine.getEngine().enableVirtualStereo(true, -1);

Previous

Audio 3A Processing

Next

Scenario-Based AI Noise Suppression