I have an audio file that is 24bit depth. When I try to read the file using wavfile
, I get this error:
I then went ahead and replaced the original wavfile.py by the updated enhanced wavfile.py found here, that can supposedly read 24bit files. However, I then got this error:
For a little extra background, I used Adobe Audition to get the original 24bit file. But Adobe seems to add extra data like probably meta data to the audio file? I then used sox
to write over the Adobe file to an equivalent sox
24bit file as I think that sox
removes this extra meta data?
I also used a 24bit file from the Urbansound dataset and there are no errors.
Can you tell me what I can do to read my 24bit file?
Here is the location of the file I am trying to read:
Any help will be greatly appreciated!
I can load the file 2IN_HomeStairs_Yeti_4GAL_repop_TCL_b_clp_24bit.wav
here using
from scipy.io import wavfile
wavfile.read('./Downloads/2IN_HomeStairs_Yeti_4GAL_repop_TCL_b_clp_24bit.wav')
I suppose you are using a scipy version earlier than 1.6.0
, when arbitrary bit depth support was added (I used 1.6.2 for the above test).