setLocalVoicePitch abstract method

Future<int?> setLocalVoicePitch(
  1. int pitch
)

Changes local voice to a different key, mostly used in Karaoke scenarios.

You can adjust the pitch of local voice such as ascending or descending with this method.

pitch The value that is higher or lower than the original local voice within a range of [-12, 12]. The default value is 0, i.e. no adjustment is made.
The difference in pitch between two adjacent values within the value range is a semitone, with positive values indicating an ascending tone and negative values indicating a descending tone, and the larger the absolute value set, the more the pitch is raised or lowered.
Out of the value range, the setting fails and triggers RTCVideoEventHandler.onWarning.

Return value:

Implementation

Future<int?> setLocalVoicePitch(int pitch);