-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
I'm trying to process a bunch of different soundfiles but I run into a problem when pydub tries to load a wav file that is:
96000 sample rate
24 bits
stereo
1 second
at line:
sound = AudioSegment.from_file(file)
returns:
Traceback (most recent call last):
File "/Users/erikparr/Documents/_Projects/LandscapesStudy/LandscapeStudy/convertAudiofilesToWav.py", line 17, in
f2w.convertAll(60)
File "/Users/erikparr/Documents/_Projects/LandscapesStudy/LandscapeStudy/flac2wav.py", line 107, in convertAll
sound = AudioSegment.from_file(file, frame_rate=48000, channels=2)
File "build/bdist.macosx-10.10-x86_64/egg/pydub/audio_segment.py", line 427, in from_file
File "build/bdist.macosx-10.10-x86_64/egg/pydub/audio_segment.py", line 460, in _from_safe_wav
File "build/bdist.macosx-10.10-x86_64/egg/pydub/audio_segment.py", line 136, in init
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/wave.py", line 511, in open
return Wave_read(f)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/wave.py", line 164, in init
self.initfp(f)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/wave.py", line 144, in initfp
self._read_fmt_chunk(chunk)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/wave.py", line 274, in _read_fmt_chunk
raise Error, 'unknown format: %r' % (wFormatTag,)
wave.Error: unknown format: 65534