-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
write_audiofile raises IndexError/IOError #281
Comments
Interestingly after reducing
Perhaps this is just a simple indexing problem? In the meantime, I have a more reliable (and less efficient) workaround to get the audio signal for anyone else experiencing this bug: import numpy as np
audio = np.vstack(audio_clip.iter_frames()) |
I see one (merged) PR linked from this issue, did it solve the problem? (I'm guessing #19 is related) |
Oh wait, the other issue is in another repo... nevermind. |
Hi I am still facing this issue How to resolve this issue? Any workarounds is appreciated |
audio.write_audiofile("xxxx.wav", fps=44100, codec='pcm_s16le') works for me.
|
This happened while writing a large (159MB, almost 3 hours) audio file.
Related issues
See #246, #262 (?), #265
Temporary Fix
write_audiofile completed successfully after I replaced each call of the form
AudioFileClip(s)
in my script byAudioFileClip(s, buffersize=20000)
(i.e. setting buffersize to 20k). At that time I mistakenly believed the default buffersize for AudioFileClips to be 10k, but it is in fact 200k, so lowering(!) buffersize is what made it work properly. The call to write_audiofile remained unmodified (mentioned because this function also takes a buffersize as argument).I have no idea whether this fix works in general or just for my specific file.
Traceback
(Note that IOError is aliased to OSError in Python3)
The text was updated successfully, but these errors were encountered: