0
$\begingroup$

I have been working on the decorrelation of audio signals while following this paper :

The Decorrelation of Audio Signals and Its Impact on Spatial Imagery

So far I have generated impulse responses in such a way that magnitude is 1 in all frequency spectrum, while random phase generation between -π to π. I correlated these signals and I am getting the required correlation.

Now moving on, when I convolve this impulse response with my audio signal, results in the case of decorrelation are good but the audio becomes noisy and distorted. I am attaching the reference wav file and decorrelated wav file.

Some points regarding computation:

  • All audio data computations are in float range [-1.0:1.0].
  • I am using Python to perform all the calculations
  • The input reference file is in Short (PCM 16 bit) format which is converted to float range [-1.0:1.0].

I have saved convolved_decorrelated_output.wav in both formats PCM 16 bit short and Float as mentioned above. Still getting the same results. So there are no issues regarding data type conversion as per my knowledge.
Any help will be appreciated.
Regards,
Khubaib Ahmad

P.S: Link to download wav files:
https://www.researchgate.net/post/Why_there_is_static_noise_and_voice_distortion_after_convolving_it_with_impulse_response

Impulse Response: enter image description here

Convolution_code:

resultant_chunk = list()
for chunk in data_chunks:
    resultant_chunk.append(np.convolve(chunk,impulse1,mode="same"))

resultant_chunk = np.hstack(resultant_chunk)
# diff = len(resultant_chunk) - len(data)|
diff = len(resultant_chunk) - len(recorded_data)
resultant_chunk = resultant_chunk[:-diff]
len(resultant_chunk)
$\endgroup$
11
  • $\begingroup$ How long is your audio? and how long is your inpulse response? $\endgroup$
    – Bob
    Commented Mar 4, 2021 at 9:18
  • $\begingroup$ are you sure you aren't clipping? $\endgroup$ Commented Mar 4, 2021 at 11:07
  • $\begingroup$ @user12750353, Audio length is approximately 6 seconds at a sampling rate of 48000. I have made 21 ms of chunks for replicating streaming in real-time. My Impulse response is also of length 21ms i.e 1024 samples. $\endgroup$ Commented Mar 4, 2021 at 11:08
  • $\begingroup$ @MarcusMüller No sir, there seems no clipping because the recorded sound is from the laptop, and while visualizing the audio file in Audacity and In data (array) form, there is no clipping. It's more like robotic sound with static noise added. $\endgroup$ Commented Mar 4, 2021 at 11:10
  • $\begingroup$ yeah, that sounds exactly like what happens when you drastically clip. Make sure none of the floating point values leaving your convolution are outside [-1,1]; other than that, you're asking us to debug your system, which you only tell us about, but don't show, so that'll be hard. $\endgroup$ Commented Mar 4, 2021 at 11:13

1 Answer 1

1
$\begingroup$

I came up with the solution after careful analysis of all the steps I was performing. So basically, I was performing convolution on a 21ms chunk of data and the convolution results were different but when I convolved the complete audio signal with my impulse response, there was no distortion. So, I had to implement the Overlap-add method to counter this issue.

Regards, Khubaib

$\endgroup$

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.