Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Removing original audio from ambient input

Status
Not open for further replies.

wavepropagation

New Member
Hi,

I'm working on a project where I have the original audio (music) which is output to speakers. The output from speakers is captured by a microphone. The signal captured by the microphone can be a combination of white noise, music, and conversation. What I'm interested in achieving is obtaining a confirmation that someone is speaking while the music is playing. The confirmation can be either a binary 0 / 1 or a level of confirmation from 0 - 10.

My current thought is to use a differential amplifier. The original signal + gain + buffer is fed on one input and the input of the microphone is fed on the other input. The goal is to match the amplitude of the signal from the microphone with the amplitude of the original signal and then subtract the two signals. If no one is speaking then I would expect a very low amplitude signal but if someone is speaking then I should detect a signal with amplitude exceeding a threshold. This can be fed directly in to a comparator outputting a 1 / 0.

Also, is the phase shift between the input of the original signal and the signal captured by the microphone something I need to be concerned about?
Please let me know if this would work or any other options to accomplish this goal.
Thanks!
 
That scheme may work if you average each signal with a low-pass RC filter with a long time-constant (say around 0.5s to 1s) and compare the two. That should minimize any phase differences between the two signals. If you adjust the gain between the two signals to give the same amplitude, then the difference should stay close to zero, independent of the music level. Any added voice signal would then increase the average level of the mic signal which would be detected.
 
If you are trying to detect the human voice, I suggest you filter just that range of frequencies to begin with and process from there, but as Nigel said, it won't be an easy task to achieve. It may be slightly easier, if you have access to the original signal being sent to the speakers. You could sample it to detect quiet periods in the music, little pauses etc and gate your microphone input only on those, that should at least remove a whole lot of unwanted stuff you are not interested in processing. During those quieter periods in the music is where you will most likely hear any voice detected by the microphone :)
 
I missed a requirement for the scheme I proposed in post #2.
You need to rectify the signals to get the average (rectified) value.
You could also rectify to get the peak value but I think the average value will work better (by adding a resistor in series with the diode and a resistor across the filter capacitor to ground).
 
Status
Not open for further replies.

Latest threads

Back
Top