I am trying to isolate the sound of someone speaking while music plays back in a noisy environment.

I have multiple speakers and a microphone in my system. I am able to

  1. play back just music and record it, then

  2. play back music while speaking and record it.

After that, I can look at the difference in the signals and get the meaningful information I need.

In order for this to work in real-time, I would need to calculate what that first recording would sound like. If I have the impulse+magnitude response or some other data about the system, is it possible to predict what the microphone will detect?

EDIT:I suspect that some kind of transform could be derived from the impulse response that will give a decent prediction of what the mic will hear. To be clear, this doesn't need to be incredibly accurate. I just want a general idea of what the mic will pick up.

  • 3
    $\begingroup$ Many people ask “is this possible” questions and since you don’t seem to be asking about impossible operations like time travel, of course it is possible. Is it as simple as you describe, that’s hard to tell and your question is too broad to provide a good answer. One thing to know is that the impulse response varies by location. There is an impulse response between every two points in your 3D volume. A few representative impulse responses may be good enough but “possible” covers a lot of territory $\endgroup$
    – user28715
    Aug 20, 2018 at 14:57
  • $\begingroup$ Thanks for the reply. Check out my updated question and EDIT notes. I have tried to refine the question a bit. $\endgroup$ Aug 20, 2018 at 17:14
  • $\begingroup$ @StanleyPawlukiewicz After learning a bit more, I think what I need is a convolution to get from 'what is sent to the speaker' to 'what the mic hears'. I think I could then use that convolution to roughly predict what a certain sound file will sound like to my microphones. Does that make sense? $\endgroup$ Aug 22, 2018 at 13:54
  • 1
    $\begingroup$ A linear (time invariant) filter is essentially convolution of an impulse response with, in your case is music. yes, you are on the right track $\endgroup$
    – user28715
    Aug 22, 2018 at 14:14
  • $\begingroup$ Yep, that ended up doing exactly what I wanted. $\endgroup$ Aug 28, 2018 at 13:16

2 Answers 2


You can use convolution to hear a recording as it would sound through a specific speaker. The linked page describes how to get an impulse response and convolve a signal with it.



An other way to get the impulse-response of your system without the need of Matlab is using an LMS-Filter and white gaussian noise as input. In this setup the LMS-Filter should minimize the error between the original white noise and the colored noise (generated thru your system). The filtercoeffitients you get are the impulse-response you are looking for.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.