setVoiceConversionPreset abstract method

Future<void> setVoiceConversionPreset(
  1. VoiceConversionPreset preset
)

Sets the preset voice conversion effect.

Call this method to set a preset voice conversion effect provided by the SDK for the local user who is sending the stream. After setting the effect, all users in the channel can hear it. You can set different voice conversion effects for users depending on the scenario. Do not set the profile parameter of setAudioProfile to audioProfileSpeechStandard (1) or audioProfileIot (6), otherwise this method will not take effect. This method provides optimal processing for vocals and is not recommended for audio data containing music. After calling setVoiceConversionPreset, do not call the following methods, or the effect set by setVoiceConversionPreset will be overridden: setAudioEffectPreset setAudioEffectParameters setVoiceBeautifierPreset setVoiceBeautifierParameters setLocalVoicePitch setLocalVoiceFormant setLocalVoiceEqualization setLocalVoiceReverb This method depends on the voice beautifier dynamic library libagora_audio_beauty_extension.dll. If this library is deleted, the feature will not work properly.

  • preset The preset voice conversion option: VoiceConversionPreset.

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. See Error Codes for details and resolution suggestions. < 0: Failure. See Error Codes for details and resolution suggestions.

Implementation

Future<void> setVoiceConversionPreset(VoiceConversionPreset preset);