Closed Jzmo closed 5 years ago
Thank you. It was fixed at v2.13.7
The wave which is output from sox has wrong header in some situation. Typically, they comes from the stream output and kaldi's wav.scp includes such usage in many recipes.
Because the information of wave has redundant information, many audio library can read such wav file with ignoring the header, e.g. sndfile and sox can read them without any problem, but scipy and python-builtin-wave can't do.
I copied and modified python-builtin-wave to ignore the incorrect information in this case - the data format
in the wave header is wrong only with multi channel case. I don't know why .
Thanks for your reply, it now work well.
Hi,
I'm using kaldiio to process multichannel wav files in espnet, and noticed that in matio.py
can not successfully read the header but the older version (use_scipy_wav=offset is None) can.
I think it is because when processing multichannel files, it firstly call wavio.read_wav() which modified 'fd' but failed(don't know why), then call wavio.read_wav_scipy() with this 'fd' and fail to reach the header.
If my understanding is wrong please let me know, thanks.