You can find a lot of info on the effect of switching frequency on audible noise. The sound you hear is twice the frequency of the switching frequency. At 5K, the audible frequency would be 10K. The higher the switching frequency, the more load on the
VFD output devices. Reason why larger drives are derated or limited at higher switching frequencies. The lower the frequency, the more annoying the motor audible noice will be.