Set the formant ratio to change the timbre of human voice.

Future<void> setLocalVoiceFormant(double formantRatio);


Formant ratio affects the timbre of voice. The smaller the value, the deeper the sound will be, and the larger, the sharper.

You can call this method to set the formant ratio of local audio to change the timbre of human voice. After you set the formant ratio, all users in the channel can hear the changed voice. If you want to change the timbre and pitch of voice at the same time, Agora recommends using this method together with setLocalVoicePitch.
Attention: You can call this method either before or after joining a channel.


The formant ratio. The value range is [-1.0, 1.0]. The default value is 0.0, which means do not change the timbre of the voice.
Note: Agora recommends setting this value within the range of [-0.4, 0.6]. Otherwise, the voice may be seriously distorted.


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.