setAudioEffectParameters abstract method

Future<void> setAudioEffectParameters(
  1. AudioEffectPreset preset,
  2. int param1,
  3. int param2
)

Sets parameters for SDK preset audio effects. Since v3.2.0 Call this method to set the following parameters for the local user who sends an audio stream: 3D voice effect: Sets the cycle period of the 3D voice effect. Pitch correction effect: Sets the basic mode and tonic pitch of the pitch correction effect. Different songs have different modes and tonic pitches. Agora recommends bounding this method with interface elements to enable users to adjust the pitch correction interactively. After setting the audio parameters, all users in the channel can hear the effect. You can call this method either before or after joining a channel. To get better audio effect quality, Agora recommends calling and setting scenario in setAudioProfile as GameStreaming(3) before calling this method. Do not set the profile parameter in setAudioProfile to SpeechStandard (1), or the method 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 setAudioEffectParameters, Agora recommends not calling the following methods, or the settings in setAudioEffectParameters are overridden : setAudioEffectPreset setVoiceBeautifierPreset setLocalVoiceReverbPreset setLocalVoiceChanger setLocalVoicePitch setLocalVoiceEqualization setLocalVoiceReverb setVoiceBeautifierParameters setVoiceConversionPreset

Param preset The options for SDK preset audio effects: RoomAcoustics3DVoice, 3D voice effect: Call and set the profile parameter in setAudioProfile to MusicStandardStereo (3) or MusicHighQualityStereo(5) before setting this enumerator; otherwise, the enumerator setting does not take effect. If the 3D voice effect is enabled, users need to use stereo audio playback devices to hear the anticipated voice effect. PitchCorrection, Pitch correction effect: To achieve better audio effect quality, Agora recommends calling setAudioProfile and setting the profile parameter to MusicHighQuality (4) or MusicHighQualityStereo(5) before setting this enumerator.

Param param1 If you set preset to RoomAcoustics3DVoice , param1 sets the cycle period of the 3D voice effect. The value range is 1,60 and the unit is seconds. The default value is 10, indicating that the voice moves around you every 10 seconds. If you set preset to PitchCorrection , param1 sets the basic mode of the pitch correction effect: 1: (Default) Natural major scale. 2: Natural minor scale. 3: Japanese pentatonic scale.

Param param2 If you set preset to RoomAcoustics3DVoice, you need to set param2 to 0. If you set preset to PitchCorrection, param2 sets the tonic pitch of the pitch correction effect: 1: A 2: A# 3: B 4: (Default) C 5: C# 6: D 7: D# 8: E 9: F 10: F# 11: G 12: G#

Implementation

Future<void> setAudioEffectParameters(
    AudioEffectPreset preset, int param1, int param2);