2
$\begingroup$

I have been working to find out room for impulse response. I am using Logarithmic sweep sine wave as input say $x(n)$ and my recorded signal is $y(n)$. I know the room impulse response is theoretically as: $$x(n) * h(n) = y(n)$$ where $*$ is convolution function.

I have read a research paper where it was pointed out that using the deconvolution technique we can get the room impulse response. I tried using scipy.signal.deconvolve. Here you can view the documentation.

Now if I perform this process, I am not getting impulse response as per my expectations. I think it may work as: $${\tt deconvolve}((x(n)*h(n)),x(n)) = h(n)$$ where $x(n) * h(n) = y(n)$.

If theoretically, I am correct then why am I not getting the required result? Am I making any mistake? I am posting the files and also the code with a plot.

Wav files

  1. $x(n)$
  2. $y(n)$

Output Graph

enter image description here

$\endgroup$
6
  • $\begingroup$ Khubaivb, the first link (for $x(n)$) doesn't seem to work? $\endgroup$
    – Peter K.
    Aug 31, 2021 at 14:40
  • 1
    $\begingroup$ Hi. This is not how sweep-sine IR measurement should be done. There's no need to deconvolve the sweep from the recording. All you need is to create the inverse filter (which is time-reversed and amplitude modulated version of the original sweep) and convolve it with the recording. Here's how exactly: dsp.stackexchange.com/a/41700/8202. $\endgroup$
    – jojeck
    Aug 31, 2021 at 15:01
  • $\begingroup$ @PeterK. Apology for the inconvenience, I have updated the link. $\endgroup$ Sep 1, 2021 at 6:11
  • $\begingroup$ @jojek That's great. It means that I just need to create a mirror image of my sweep signal and then perform convolution of this mirror and amplitude modulated signal with my recording and I'll get the room impulse response? Right? $\endgroup$ Sep 1, 2021 at 6:18
  • $\begingroup$ That’s correct. Keep in mind that the inverse filter is closely tied to the playback sweep. You might have to regenerate it with a known parameters. $\endgroup$
    – jojeck
    Sep 1, 2021 at 6:20

2 Answers 2

2
$\begingroup$

@jojek answer helped me in attaining the impulse response.I tried the technique but there was some internal issue that my audio being played i.e ESS was noisy. I changed the player in python and it worked flawless.
Also what @hilmar pointed out initially, our data was noisy and due to issue in data, our result was faulty.
Thank you both guys.

$\endgroup$
1
$\begingroup$

Your signals are not suitable for deconvolution. Did you listen to them ?

  1. x(t) is a speech sample recorded in a reverberant space, so it already includes the room impulse response
  2. y(t) is the same reverberant sample but with added noise (babble)

Both x and y include the same room impulse response (I think), so you can't possibly extract it through deconvolution.

$\endgroup$
1
  • $\begingroup$ Thank you for pointing out this thing Hilmar. I listened to them again and probably this is one of the ignored problems on our data. I'll retest with the jojek's technique. $\endgroup$ Sep 1, 2021 at 7:07

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.