# How can I calculate what a recording would sound like if it was played through my speakers and mic?

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.

• 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
– user28715
Aug 20, 2018 at 14:57
• Thanks for the reply. Check out my updated question and EDIT notes. I have tried to refine the question a bit. Aug 20, 2018 at 17:14
• @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? Aug 22, 2018 at 13:54
• 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
– user28715
Aug 22, 2018 at 14:14
• Yep, that ended up doing exactly what I wanted. Aug 28, 2018 at 13:16