aquila icon indicating copy to clipboard operation
aquila copied to clipboard

Bug while reading .wav file

Open ISilviu opened this issue 5 years ago • 2 comments

Hi, I'm using the Aquila library for a personal project and I was trying to load some .wav files in order to feed them to a neural network.

The problem is that the Aquila::WaveFile constructor takes a very long time and it doesn't read the .wav file properly. More explicitly, Aquila::WaveFile yields a total number of 1283469498 samples, while, if we read the same file with another library, that one yields a total number of 19584 samples. Certainly, something went wrong.

This link contains the .wav file.

I'm using Visual Studio 2017 and Windows 10 x64.

Could you help me solve this problem?

Thanks in advance.

ISilviu avatar Sep 13 '19 10:09 ISilviu

I going to check this, I been loading wav files with no issues. I got the file so let me see what is the problem.

Thanks

cailtin avatar Feb 28 '21 20:02 cailtin

RIFF format file, can you transform this to a plain PCM file (pcm) ?

sox input.wav [-b BITS] [-r SAMPLERATE] [-c #CHANELS] -t raw output.pcm

The issue is that this file is a windows format file and this library is expecting a PCM formatted (yes this has PCM but in blocks and it has its own structure, which is not handled by this library)

cailtin avatar Feb 28 '21 20:02 cailtin