def change_gender(
    sound,
    pitch=None,
    formant_shift_ratio: float = PRAAT_CHANGEGENDER_FORMANTSHIFTRATIO_DEFAULT,
    new_pitch_median: float = PRAAT_CHANGEGENDER_PITCHMEDIAN_DEFAULT,
    pitch_range_ratio: float = PRAAT_CHANGEGENDER_PITCHRANGERATIO_DEFAULT,
    duration_factor: float = PRAAT_CHANGEGENDER_DURATIONFACTOR_DEFAULT,
) -> parselmouth.Sound:
    """Invoke change gender function in praat

    Args:
        sound (parselmouth.Sound): a parselmouth.Sound object
        pitch (parselmouth.Pitch, optional): a parselmouth.Pitch object. Defaults to None.
        formant_shift_ratio (float, optional): formant shift ratio. A value of 1.0 means no change. Greater than 1.0 means higher pitch. Less than 1.0 means lower pitch.
        new_pitch_median (float, optional): new pitch median.
        pitch_range_ratio (float, optional): pitch range ratio. A value of 1.0 means no change. Greater than 1.0 means higher pitch range. Less than 1.0 means lower pitch range.
        duration_factor (float, optional): duration factor. A value of 1.0 means no change. Greater than 1.0 means longer duration. Less than 1.0 means shorter duration.

    Returns:
        parselmouth.Sound: a parselmouth.Sound object
    """
    if pitch is None:
        new_sound = parselmouth.praat.call(
            sound,
            "Change gender",
            75,
            600,
            formant_shift_ratio,
            new_pitch_median,
            pitch_range_ratio,
            duration_factor,
        )
    else:
        new_sound = parselmouth.praat.call(
            (sound, pitch),
            "Change gender",
            formant_shift_ratio,
            new_pitch_median,
            pitch_range_ratio,
            duration_factor,
        )
    return new_sound
Invoke change gender function in praat

Args:
sound (parselmouth.Sound): a parselmouth.Sound object
pitch (parselmouth.Pitch, optional): a parselmouth.Pitch object. Defaults to None.
formant_shift_ratio (float, optional): formant shift ratio. A value of 1.0 means no change. Greater than 1.0 means higher pitch. Less than 1.0 means lower pitch.
new_pitch_median (float, optional): new pitch median.
pitch_range_ratio (float, optional): pitch range ratio. A value of 1.0 means no change. Greater than 1.0 means higher pitch range. Less than 1.0 means lower pitch range.
duration_factor (float, optional): duration factor. A value of 1.0 means no change. Greater than 1.0 means longer duration. Less than 1.0 means shorter duration.

Returns:
parselmouth.Sound: a parselmouth.Sound object
processors/data_augment.py