Title: Python bug fix help Post by: crypture on April 03, 2019, 07:05:49 PM I wonder if a python expert can help me. I have this .py file i'm trying to run on OSX 10.11.6 but when i try to run the file whilst in the same directory i get this error
Code: Traceback (most recent call last): file.py Code: import wave Title: Re: Python bug fix help Post by: Joel_Jantsen on April 03, 2019, 07:33:15 PM Did you even google it? The very first SO answer is accurate
Quote 8 Python's wave module works with a specific type of WAV: PCM (WAVE_FORMAT_PCM: 0x0001). In your case, you're using a WAV of type WAVE_FORMAT_GSM610 [0x0031 = hex(49)]. You can use a program like Audacity or some lib for converting codecs to change the type of the WAV file. You can see a list of WAV types here: https://www.videolan.org/developers/vlc/doc/doxygen/html/vlc__codecs_8h.html Python's wave module source code: https://github.com/python/cpython/blob/master/Lib/wave.py Source : https://stackoverflow.com/questions/17297048/opening-a-wave-file-in-python-unknown-format-49-whats-going-wrong If you need help with converting the formats or editing the WAV files, I can help. Title: Re: Python bug fix help Post by: crypture on April 15, 2019, 02:35:00 PM Did you even google it? The very first SO answer is accurate Quote 8 Python's wave module works with a specific type of WAV: PCM (WAVE_FORMAT_PCM: 0x0001). In your case, you're using a WAV of type WAVE_FORMAT_GSM610 [0x0031 = hex(49)]. You can use a program like Audacity or some lib for converting codecs to change the type of the WAV file. You can see a list of WAV types here: https://www.videolan.org/developers/vlc/doc/doxygen/html/vlc__codecs_8h.html Python's wave module source code: https://github.com/python/cpython/blob/master/Lib/wave.py Source : https://stackoverflow.com/questions/17297048/opening-a-wave-file-in-python-unknown-format-49-whats-going-wrong If you need help with converting the formats or editing the WAV files, I can help. I did do a search but i did not find that. But thank you in any case. Are you familiar with the program processing ? |