I have some audio files affected by an issue during recording, apparently chunks of data were duplicated, like this. Doing a search I realised that I already asked about this, but I have got a very open answer.

This could be posed as classification problem, where each sample is either included or excluded in the final audio.

I assume this can be solved using a greedy approach, and maybe some dynamic programming, but I don't know how to start, how to determine if a sample should be included or not?

For me the most obvious approach to find where the audio was repeated would be to compute correlation, but it is very slow, estimated 20 minutes in my machine, and after finishing I am not sure it would work.

Maybe using phase of STFT could help? Resembles Dynamic time warping, could that be the starting point?

How would you approach this problem?

I also encoded it in an image, if you prefer download the image and use the pixel data as 16kHz 16bit Little Endian audio samples.

import numpy as np
x = np.frombuffer(Image.open('~/Downloads/b5Ra4.png').tobytes(), dtype=np.int16)

enter image description here



Your Answer

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

Browse other questions tagged or ask your own question.