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.

To achieve better vocal effects, it is recommended that you call the following APIs before calling this method: Call setAudioScenario to set the audio scenario to high-quality audio scenario, namely audioScenarioGameStreaming (3). Call setAudioProfile to set the profile parameter to audioProfileMusicHighQuality (4) or audioProfileMusicHighQualityStereo (5). 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. Do not set the profile parameter in setAudioProfile to audioProfileSpeechStandard (1) or audioProfileIot (6), or the method does not take effect. You can call this method either before or after joining a channel. 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 This method relies on the voice beautifier dynamic library libagora_audio_beauty_extension.dll. If the dynamic library is deleted, the function cannot be enabled normally.

  • 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});