-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support audio with frame rates over 48k #134
Comments
I am surprised that this limitation is in the standard wave module.
The reader of scipy has not the problem:
But I suppose you do not want to have dependencies on scipy? |
Has the problem anything to do with the frame rate? Isn't it due to
It is unclear to me if monkey patching |
@fnielsen Yeah, right now pydub can work on raw audio data (i.e., wave files) without needing to install any dependencies. That's a pretty nice deal and it's the main reason not to require scipy. I'm not familiar with |
I have the same bug, it seems some libraries exist which reimplement the whole .wav parsing, it might be possible to do something similar, or to give an option when loading pydub to monkey-patch the wav reading and writing with those libs or with scipy if the user has it installed already https://github.com/tuffy/python-audio-tools/blob/master/audiotools/wav.py |
This allows pydub to open files having more than 48KHz and/or 32-bit data. If scipy is not available, falls back to using the standard wave module as before. Fixes jiaaro#134
Related to: #129
Python (and by extension, pydub) cannot handle audio with frame rates over 48k. That's a bummer.
We could use ffmpeg to convert the framerate down to 48k in those cases, but users with 96k files on disk are probably not going to be happy with that solution.
I wonder if there is a way to solve this without reimplementing the functionality in
audioop
. Maybe if we just lie about the framerate toaudioop
it will work fine?The text was updated successfully, but these errors were encountered: