setVoiceConversionPreset method

  1. @override
Future<void> setVoiceConversionPreset(
  1. VoiceConversionPreset preset
)

Sets an SDK preset voice conversion effect.

Call this method to set an SDK preset voice conversion effect for the local user who sends an audio stream. After setting a voice conversion effect, all users in the channel can hear the effect.

You can set different voice conversion effects for different scenarios. See Set the Voice Effect.

To achieve better voice effect quality, Agora recommends calling RtcEngine.setAudioProfile and setting the profile parameter to MusicHighQuality(4) or MusicHighQualityStereo(5) and the scenario parameter to GameStreaming(3) before calling this method.

Parameter preset The options for SDK preset voice conversion effects: VoiceConversionPreset.

Note

Implementation

@override
Future<void> setVoiceConversionPreset(VoiceConversionPreset preset) {
  return _invokeMethod('setVoiceConversionPreset',
      {'preset': VoiceConversionPresetConverter(preset).value()});
}