I am running on Ubuntu. I am using a fairly cheap Logitech headset so it is possible that this is where the problem lies. However, I do not want to buy a different headset without knowing that this will solve the problem.
I am hoping that someone with experience could listen to the mp3 and suggest a way to diagnose the problem
Well I tried to download your .mp3, but it says you’ve reached your download quota…
The most common source of hum is a “ground loop”, but that would be pretty unusual for a computer headset.
Tell us a bit more about your setup. Is the headset a USB device, or an analog headset plugged into your computers soundcard?
Is the computer a laptop or a deskside. If it is a laptop you might try recording “unplugged”. If it is a deskside you could try isolating the ground on the machine (the easiest way to do that is with a 3-pin to 2-pin plug adapter. (That is assuming you are in the North America, I don’t know what options are for other parts of the world). Of course isolating the ground is a potential safety issue.
Is it possible the hum is acoustic in origin – an air-conditioner next door perhaps?
No it just means your hum is 3 semitones lower (multiples of 50 Hz instead of 60Hz).
A quick frequency analysis on your hum show that it is indeed exactly 50 Hz and therefore almost certainly being coupled into your microphone circuit from the mains somehow.
Are there any large electrical panels nearby? High voltage wires over your back yard?
I would start by looking carefully at the where the mic plugs into the computer, there might be a bad connection there. If you can wiggle the connection while listening to the hum. Try unplugging the headphone connector, but leaving the Mic connected. It also might be a broken shield in the headset cables.
You try recording a clip with the microphone unplugged (but with level controls exactly as you had them for recording) and see if the hum is any different. If the hum is still there then the problem is internal to your computer and the best suggestion is an external (USB) sound card, or perhaps just a USB headset to replace the logitech. Unfortunately if the hum goes away it might still be the computer, mic jacks often have contacts that mute the connection if the mic is unplugged.
It is a residential area so I suspect there are no high voltage wires.
I tried wiggling the mic connection but it made no difference to the hum.
I unplugged the speaker wire at the sound card and that made no difference either.
I unplugged the mic wire and the hum went away.
I have some older headphones (no mic) which seem to act as a microphone when plugged into that socket.
If I supplied a recording using them, could you analyse the output to see if the 50 Hz is present? Would that be a meaningful test?
I have an extension cable which can be used between the sound card and the mic wire. If I just have the extension cable plugged into the mic socket and make a recording, could that be a way to remove the logitech from the picture?
Oh I’m sure they are around, but perhaps they are underground in your neighborhood.
I have some older headphones (no mic) which seem to act as a microphone when plugged into that socket.
If I supplied a recording using them, could you analyse the output to see if the 50 Hz is present? Would that be a meaningful test?
Yes there would be value in that test. The analysis is easy enough. Record a few seconds of the noise, then select the section in Audacity and choose “analyze → plot spectrum”. Set the “Size” to the largest value that it will accept (Ideally the 65536 maximum). I the resulting graph you will see clear peaks at 50Hz, 100Hz, 150 Hz, etc. if the noise there. You can also use “Effect → Amplfiy” to make it loud enough to listen to to verify that it is the same nature.
I have an extension cable which can be used between the sound card and the mic wire. If I just have the extension cable plugged into the mic socket and make a recording, could that be a way to remove the logitech from the picture?
That MIGHT be useful as well. What you are seeing is bad enough I’m pretty sure there must be a broken shield or something in your headset. If a headset is the right thing for you you are trying to do (and sharing what you are trying to do would help us to further advise), then I suspect that the most effective solution is a new USB headset which will eliminate the computer soundcard as a potential issue as well.
I have done two tests.
The first test was a recording with just the extension cable
connected to the mic socket. Analysis showed a peak at 50Hz
but only -43dB.
The second test was a recording with the old headphones
connected to the mic socket. Analysis showed a peak at 50Hz
at -21dB contrasting with the -16dB shown by the
example attached in the first reply.
The ultimate goal is to be able to use a SIP client (voice
over IP) without the hum. I am using the client to phone in to
a radio show which also produces a podcast of the show. Listeners
to the show noted that the hum was present. Whilst
it would be possible to clean up the audio using a tool like
Audacity, I would like to avoid producing the noise in the first
place.
Assuming it is a wiring problem, how can I avoid buying another
lemon? I got the logitech headset from off the shelf and
the salesman did not advise me that there might be sound quality
problems.
Well all of that would seem to point to the computer as having a fault of some sort. Unfortunately there are lots of possibilities. It could be just the soundcard is too close to the power supply inside the box, or is just poorly made. There could be fault in the computer’s power supply.
There could also be a fault in the outlet that the computer is plugged into – A bad ground (in particular ground that perhaps has some voltage on it due to a ground fault somewhere else in the house) or reversed neutral and hot connections in the plug. You might try moving the computer lock, stock and barrel to another part of the house as an experiment. I don’t know if there is any easy way to isolate the computer from the building ground with UK style plugs, but if there is that would be a good test. Here in the US they sell adapters for plugging 3-pin plugs into older ungrounded outlets in any hardware store: http://www.amazon.com/CableWholesale-Wholesale-Grounding-Converter-30W1-32200/dp/B000I96AUM which also make it real easy to isolate a bit of gear from ground if need be. Don’t know if there is a UK equivalent. Do be cautious, as if the problem is a power-supply fault then you may find that the chassis of your computer is now quite “hot” without the ground connection.
You could try a few more experiments with the extension cable – does the noise level change if you are holding the cable vs having the cable coiled up neatly on the machine? Try touching the metal end of the extension cable to a water pipe.
I’d like to say that a USB headset will cure your problem, but I can’t really guarantee it.
I modified a 4-way block (4 3-pin sockets leading to one plug)
by disconnecting the earth (ground) wire in the plug.
I could then either boot the computer powered by a socket
of the block, or a normal socket.
Comparing recordings made in both configurations there seemed
to be no significant difference between the loudness of the
50 Hz hum, as measured by “Plot Spectrum”.
I then did two recordings with just the extension wire plugged
into the mic. With the extension end pressed against a water pipe,
50 Hz was -36.9 dB.
With the extension not pressed, -40.1 dB
So, there does seem to be a significant difference
Yes there’s some faint mains hum but the main problem is [brown] noise … Brownian noise - Wikipedia [ sounds like light rain ].
Audacity’s noise removal will help a bit to reduce that hiss noise,
but see if you can turn up something to improve the signal-to-noise ratio,
as that’s preferable to noise reduction which adds processing artifacts.
I only have a smattering of Linux : i think you need turn something up [“capture”?] in the ALSA sound mixer to make the signal louder, ( and the hiss noise will be comparatively less if you succeed ). Audio/Alsamixer - Ubuntu Wiki or the equivalent soundcard controls [“PulseAudio”?].
If it worked it would reduce level of hiss relative to the signal, it would not reduce hum.
Here’s a digital solution to removing your mains-hum …
Paste the code below into something called “Nyquist Prompt” (in Audacity Effects Menu )
(setf s (notch2 s 450 25))
(setf s (notch2 s 400 25))
(setf s (notch2 s 350 25))
(setf s (notch2 s 250 25))
(setf s (notch2 s 200 25))
(setf s (notch2 s 100 25))
(setf s (notch2 s 50 1))
So it looks like this …
Then apply "Nyquist Prompt " like any other Audacity effect …
NB: this will only remove hum , it makes no difference to the hiss.
PS the spectrogram of your “xx” hum example is consistent with an electrical-hardware problem called “impedance mismatch”, i.e. you need to try a different microphone to get better sound into that computer.
I have been using the “noise removal” option in Audacity, selecting a few seconds of sound where I do not speak, to guide the removal process. This seems to work very well as the noise is almost completely gone.
It would be nice if there was an application I could run to sit between me and the SIP client, filtering out the noise.