def pedalboard_equalizer(wav: np.ndarray, sr: int) -> np.ndarray:
    """Use pedalboard to do equalizer"""
    board = Pedalboard()

    cutoff_low_freq = 60
    cutoff_high_freq = 10000

    q_min = 2
    q_max = 5

    random_all_freq = True
    num_filters = 10
    if random_all_freq:
        key_freqs = [random.uniform(1, 12000) for _ in range(num_filters)]
    else:
        key_freqs = [
            power_ratio(float(z) / (num_filters - 1), cutoff_low_freq, cutoff_high_freq)
            for z in range(num_filters)
        ]
    q_values = [
        power_ratio(random.uniform(0, 1), q_min, q_max) for _ in range(num_filters)
    ]
    gains = [random.uniform(-12, 12) for _ in range(num_filters)]
    # low-shelving filter
    board.append(
        LowShelfFilter(
            cutoff_frequency_hz=key_freqs[0], gain_db=gains[0], q=q_values[0]
        )
    )
    # peaking filters
    for i in range(1, 9):
        board.append(
            PeakFilter(
                cutoff_frequency_hz=key_freqs[i], gain_db=gains[i], q=q_values[i]
            )
        )
    # high-shelving filter
    board.append(
        HighShelfFilter(
            cutoff_frequency_hz=key_freqs[9], gain_db=gains[9], q=q_values[9]
        )
    )

    # Apply the pedalboard to the audio
    processed_audio = board(wav, sr)
    return processed_audio
Use pedalboard to do equalizer
processors/data_augment.py