I designed and worked on a PWM speed/positional control system that drove 16 brushed DC motors some years back. We were buying from Mabuchi, who sold 350M motors a year at the time. They recommended 2 kHz PWM frequency which tallied with recommendations from other sources, including R/C aeroplanes of the time. We had good results and I've used it since.
There's a theory that a frequency above 20 kHz means no whistling/noise but we found that not to be true. I don't know the true physics of it but there is a mechanical movement that you can hear. I, rightly or wrongly, took it to be the sub-harmonics (right phrase?) of the frequency as coils or components try to move ever so slightly at the high frequency but can't keep up.
We found the same when trying out a solenoid driver using PWM. A scope across the solenoid showed the correct test frequencies, first 25 kHz then higher and higher. The whistling noise from the solenoid was clear and unpleasant. We abandoned the PWM approach after a fair amount of testing and experimenting.
I have mobile phone chargers at home that I can clearly hear whistling and I know that their PWM oscillators are running well upwards of 100 kHz. (In fact, I often turn off the one in the kitchen when walking past it because I hear the higher-pitched 'no load' whistle when no phone's connected. I also hear the tone drop to quiter and lower when a phone's first plugged in.)