# how to extract telephone audio only from an mp3

I have mp3s of radio talk shows in which the host interviews people on the phone. The host uses a microphone, and the interviewee uses either a landline phone or a cell phone.

I want to save just the telephone audio to a different file. Is that feasible?

-
Are the recordings from FM radio or something of similar quality? I've never tried to do this, but one idea that comes to mind is that telephone audio is typically pretty narrowband (~300 Hz to ~3 kHz), while in-studio audio from the host should be comparatively wideband (one reason why it sounds better). You might be able to compute something like a spectrogram on the audio and pull out regions of the file where the signal bandwidth appears to be within the region you would expect for telephone audio. – Jason R Jan 27 '13 at 16:22
The recordings are from the radio studio, 44.1 KHz. I thought of a solution similar to yours - FFT the signal, and calculate the ration of the energy between 300 and 3400 Hz and the whole spectrum. If it exceeds a threshold then I keep the audio. I have to run VAD when I have telephone audio to keep the silence between words and sentences. – barisdad Jan 28 '13 at 7:02
@barisdad I generally agree with your suggestion. Just for clarity VAD = Voice Activity Detection. VAD functions as an audio switch that passes the audko signal when voice energy exceeds a predetermined threshold and passes silences otherwise. You can modify the “voice energy” algorithm to favor the full spectrum (broadcast) audio over the phone audio. – user2718 Jan 29 '13 at 17:41
I tried implementing and ran into a problem. I am currently using a rectangular window for the FFT with no overlap and I can't seem to find a consistent energy threshold to tell the signals apart. I think this is due to leakage from the rectangular windows. I want to use a hann / hamming window instead, but I understand these favor the center of the signal, so I want to use overlapping windows with a step size of half the window size, and average the energy in 3 adjacent windows to get the result. Does this sound correct? – barisdad Feb 3 '13 at 7:04
You may want to look in to Independent Component Analysis (ICA) for audio. Here's a paper that is attempting to separate two sources from one source. research.microsoft.com/pubs/66912/2004-hershey-icassp.pdf – Dave C Feb 12 '13 at 19:56

There might be much discrepency in the signal's characteristics of the interviewee that depends partialy on the phones they're using, their mobile operator, etc...
It is much easier to extract the radio's speaker signal. Then, everything that does not come form the radio's host must be from one of the interviewees.
What you need to do is to analyse the signal of the radio's speaker that might contains more prominent low-pitched components for example (depends obviously on the station you recorded from). Also use a window of analysis sufficiently large to take into account that every stream must last at least 500/1000ms. That might introduce a little stability in your extraction.
If you want to split the different interviewees, you can pose the simple condition that interviewee/host must alternate.

-

Here is a way to do this:

First analyze the audio, hone in on the frequencies that are prelevant in one of the signals, but not the other. Use a steep FIR filter to isolate roughly those frequencies. Also, you might want to use some averaging (moving average) to even out the signal.

Next, use a side chained gate triggered by the filtered audio. The gate should remove the silent parts. If it turns out that the silent parts are what you want, simply combine the audio stream with polarity inverted original.

-