Spontaneous high pitches & loud squeal in headset connected to Mac USB port
Have had similar problem.
It seems to be connected with Safari somehow.
This fix works, but you may need to do it when the sound comes back.

If Safari is running, quit it.
Hold down Shift key and launch Safari
Keep Shift depressed until your homepage appears
Releases Shift and clear history.

This seems to stop the problem for a time, but I have had to do it about once a month for the last 4 tor 5 months may