setVoiceBeautifierParameters method Null safety

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

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

Implementation

@override
Future<void> setVoiceBeautifierParameters(
    VoiceBeautifierPreset preset, int param1, int param2) {
  return _invokeMethod('setVoiceBeautifierParameters', {
    'preset': VoiceBeautifierPresetConverter(preset).value(),
    'param1': param1,
    'param2': param2,
  });
}