setVoiceBeautifierParameters abstract method

Future<void> setVoiceBeautifierParameters({
  1. required VoiceBeautifierPreset preset,
  2. required int param1,
  3. required int param2,
})

Sets parameters for the preset voice beautifier effects.

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 setting the audio parameters, all users in the channel can hear the effect. For better voice effects, Agora recommends that you call setAudioProfile and set scenario to audioScenarioGameStreaming (3) and profile to audioProfileMusicHighQuality (4) or audioProfileMusicHighQualityStereo (5) before calling this method. You can call this method either before or after joining a channel. Do not set the profile parameter in setAudioProfile to audioProfileSpeechStandard (1) or audioProfileIot (6), or the method does not take effect. This method has the best effect on human voice processing, and Agora does not recommend calling this method to process audio data containing music. After calling setVoiceBeautifierParameters, Agora does not recommend calling the following methods, otherwise the effect set by setVoiceBeautifierParameters will be overwritten: setAudioEffectPreset setAudioEffectParameters setVoiceBeautifierPreset setLocalVoicePitch setLocalVoiceEqualization setLocalVoiceReverb setVoiceConversionPreset

  • preset The option for the preset audio effect: SINGING_BEAUTIFIER : The singing beautifier effect.
  • param1 The gender characteristics options for the singing voice: 1 : A male-sounding voice. 2 : A female-sounding voice.
  • param2 The reverberation effect options for the singing voice: 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.

Returns When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown. You need to catch the exception and handle it accordingly.

Implementation

Future<void> setVoiceBeautifierParameters(
    {required VoiceBeautifierPreset preset,
    required int param1,
    required int param2});