It's strictly not the transistors that are whining, but if you haven't heard whining from solid-state circuits before, then you must have been living in a cave.. *All* inverters produce a degree of whine, due to the use of chopper circuits such as present in the inverter, and just about every piece of consumer electronics these days contains an inverter for the fluorescent backlight. Basically, when you switch on and off a signal, particularly a high voltage/high current signal such as used in the Prius, the varying magnetic fields can manifest as mechanical vibrations in the packaging and wires, etc.. This is also the source of the whine when the regenerative braking is occuring..
The Prius inverter is actually extremely good considering the amount of power being switched.. Basically, you want your switched drive signal to approximate a pure sine wave, and the closer you can get to a real sine wave, the less audible noise you will hear. This generally means a much higher switching or "carrier" frequency, but the problem here is that neither inverter circuitry nor motor windings really like high frequency- they tend to overheat and burn out, so the compromise is usually somewhere in the 1-3 kHz range. The use of IGBTs improves things as well since these parts can switch a lot faster (you still run into the limit of the motor windings though).. Another means of reducing noise is varying the drive frequency within a small range, but I'm not sure if the Prius does this or not..