setVoiceBeautifierParameters method
Sets parameters for SDK preset voice beautifier effects.
Since v3.3.1
Call this method to set a gender characteristic and a reverberation effect for the singing beautifier effect. This method sets parameters for the local user who sends an audio stream.
After you call this method successfully, all users in the channel can hear the relevant effect.
To achieve better audio effect quality, before you call this method, Agora recommends calling RtcEngine.setAudioProfile, and setting the scenario parameter to GameStreaming(3)
and the profile parameter to MusicHighQuality(4)
or MusicHighQualityStereo(5)
.
Parameter preset
The options for SDK preset voice beautifier effects. You can only set it as VoiceBeautifierPreset.SingingBeautifier.
Parameter param1
The gender characteristics options for the singing voice:
1
: A male-sounding voice.2
: A female-sounding voice.
Parameter param2
The reverberation effects options:
1
: The reverberation effect sounds like singing in a small room.2
: The reverberation effect sounds like singing in a large room.3
: The reverberation effect sounds like singing in a hall.
Note
- You can call this method either before or after joining a channel.
- Do not set the
profile
parameter of RtcEngine.setAudioProfile toSpeechStandard(1)
; otherwise, this method call does not take effect. - This method works best with the human voice. Agora does not recommend using this method for audio containing music.
- After calling this method, Agora recommends not calling the following methods, because they can override
setVoiceBeautifierParameters
:
Implementation
@override
Future<void> setVoiceBeautifierParameters(
VoiceBeautifierPreset preset, int param1, int param2) {
return _invokeMethod('setVoiceBeautifierParameters', {
'preset': VoiceBeautifierPresetConverter(preset).value(),
'param1': param1,
'param2': param2
});
}