logo
Video Call
On this page

Voice Changer/Reverb/Stereo

2026-03-12

Function Overview

Warning

This document does not apply to the Web platform.

In live streaming, voice chat rooms, and karaoke rooms scenarios, to increase fun and interactivity, players can use voice changing to be funny, use reverb to enhance the atmosphere, and use stereo to make sound more three-dimensional. ZegoExpress SDK provides various 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 changing to female voice.
  • Reverb: Through special processing of sound, create reverb effects of different environments, making the sound appear as if it were in a concert hall, cathedral, etc.
  • Reverb Echo: Through special processing of sound, it can be combined with voice changer and reverb to achieve various customized sound effects, such as ethereal, robotic sounds.
  • Virtual Stereo: By deeply using dual-channel technology, virtualize various positions and angles of sound sources, achieving stereo, 3D surround sound, sound positioning, and other effects.

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

Note

This function only applies to 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 Download

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

For related source code, please check the files in the "lib\topics\AudioAdvanced\voice_change" directory.

Prerequisites

Before proceeding with 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 preset voice changer effects of ZegoVoiceChangerPreset are as follows. Developers can choose according to their needs:

Type NameDescriptionVoice Changer Type
NoneNo voice changer-
MenToChildMale to child voice (loli sound effect)Voice changer
MenToWomenMale to female voice (kindergarten sound effect)Voice changer
WomenToChildFemale to child voiceVoice changer
WomenToMenFemale to male voiceVoice changer
ForeignerForeigner sound effectVoice changer
OptimusPrimeOptimus Prime sound effectVoice changer
AndroidRobot sound effectVoice changer
EtherealEthereal sound effectTimbre transformation
MaleMagneticMagnetic maleRoom beautification
FemaleFreshFresh femaleRoom beautification
MajorCC major electronic musicElectronic sound effect
MinorAA minor electronic musicElectronic sound effect
HarmonicMinorHarmonic minor electronic musicElectronic sound effect
FemaleEnergeticEnergetic female sound effectRoom beautification
RichNessRich sound effectRoom beautification
MuffledMuffled sound effectTimbre transformation
RoundnessMellow sound effectRoom beautification
FalsettoFalsetto sound effectRoom beautification
FullnessFull sound effectRoom beautification
ClearClear sound effectRoom beautification
HighlyResonantHigh-pitched sound effectRoom beautification
LoudClearLoud and clear sound effectRoom beautification
MinionsMinion sound effectVoice changer
AutobotAutobot sound effectVoice changer
OutOfPowerOut 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 to Child Voice" as an example:

ZegoExpressEngine.instance.setVoiceChangerPreset(ZegoVoiceChangerPreset.MenToChild);

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 ZegoVoiceChangerParam method and 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 versions 2.18.0 and earlier, the value range is [-8.0, 8.0].

var voiceChangerParam = ZegoVoiceChangerParam(2.0);
ZegoExpressEngine.instance.setVoiceChangerParam(ZegoMediaPlayerAudioChannel.All, 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.

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

Type NameDescriptionReverb Type
NONENone-
SOFT_ROOMSmall roomSpace shaping
LARGE_ROOMLarge roomSpace shaping
CONCERT_HALLConcert hallSpace shaping
VALLEYValleySpace shaping
RECORDING_STUDIORecording studioSpace shaping
BASEMENTBasementSpace shaping
KTVKTV, suitable for users with more obvious vocal flawsSpace shaping
POPULARPopularMusic style
ROCKRockMusic style
VOCAL_CONCERTVocal concertSpace shaping
GRAMO_PHONEGramophoneSpace shaping
ENHANCED_KTVEnhanced KTV, more focused and brighter KTV vocal effect, suitable for ordinary users and professional usersSpace shaping

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

ZegoExpressEngine.instance.setReverbPreset(ZegoReverbPreset.LargeRoom);

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 ZegoReverbAdvancedParam method and set relevant parameters in combination to achieve the reverb effect developers need (for detailed parameter description, please refer to the API documentation).

var reverbParam = ZegoReverbAdvancedParam(
    50.0, // roomSize Room size (percentage)
    50.0, // reverberance Reverberation (percentage)
    50.0, // damping Reverb damping (percentage)
    false, // wetOnly Wet signal only
    5.0, // wetGain Wet signal gain(dB)
    5.0, // dryGain Dry signal gain(dB)
    80.0, // toneLow Low frequency attenuation
    80.0, // toneHigh High frequency attenuation
    20.0, // preDelay Initial delay time(ms)
    0.0 // stereoWidth Stereo width (percentage)
   );
ZegoExpressEngine.instance.setReverbAdvancedParam(reverbParam);
Warning

When custom reverb parameters are set, the preset reverb effect 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.

Reverb Echo

Call the setReverbEchoParam method and set relevant parameters in combination to achieve the reverb echo effect developers need (for detailed parameter description, please refer to the API documentation).

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

var echoParam = ZegoReverbEchoParam(
    0.8, // inGain Input audio signal gain
    1.0, // outGain Output audio signal gain
    7, // numDelays Number of echoes
    [230,460,690,920,1150,1380,1610], // delay Delay of echo signals respectively, in milliseconds
    [0.41f,0.18f,0.08f,0.03f,0.009f,0.003f,0.001f] // decay Decay coefficient of echo signals respectively
    );
ZegoExpressEngine.instance.setReverbEchoParam(echoParam);

Virtual Stereo

Set Publishing Audio Channel Count

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

This example constructs ZegoAudioConfig through preset enumeration and sets it to dual channel.

var audioConfig = ZegoAudioConfig.preset(ZegoAudioConfigPreset.StandardQualityStereo);
ZegoExpressEngine.instance.setAudioConfig(audioConfig);

Set Virtual Stereo Parameters

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

Note

Since version 2.15.0, the SDK has added support for all-around virtual stereo effect. The usage is to set the angle parameter to "-1".

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

ZegoExpressEngine.instance.enableVirtualStereo(true, 90);

This example enables all-around virtual stereo:

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

Previous

Audio 3A Processing

Next

Scenario-based AI Noise Reduction

On this page

Back to top