audiogrep icon indicating copy to clipboard operation
audiogrep copied to clipboard

Output supercut files are 0 bytes

Open OisinMoran opened this issue 10 years ago • 1 comments

Audiogrep transcribes the audio files seemingly correctly and when creating a supercut gives many instances of the searched word but the final result is a supercut.mp3 that is 0 bytes. Currently running this on Linux

OisinMoran avatar Mar 09 '15 13:03 OisinMoran

Same symptom for me on OS X. In the compose function, there is a giant try block which catches all errors and silently fails, so our problems could be different.

https://github.com/antiboredom/audiogrep/blob/master/audiogrep.py#L159-187

Removing the try/except statements, I can see that when I try the examples, there is an error coming from within pydub:

Traceback (most recent call last):
  File "./audiogrep/audiogrep.py", line 243, in <module>
    compose(segments, out=args.outputfile, padding=args.padding, crossfade=args.crossfade, layer=args.layer)
  File "./audiogrep/audiogrep.py", line 164, in compose
    files[f] = AudioSegment.from_wav(f)
  File "/usr/local/lib/python2.7/site-packages/pydub/audio_segment.py", line 367, in from_wav
    return cls.from_file(file, 'wav')
  File "/usr/local/lib/python2.7/site-packages/pydub/audio_segment.py", line 342, in from_file
    raise CouldntDecodeError("Decoding failed. ffmpeg returned error code: {0}".format(retcode))
pydub.exceptions.CouldntDecodeError: Decoding failed. ffmpeg returned error code: 1

Was able to debug a bit within pydub, but not much.

It would be nice to try this out!

colinsullivan avatar Apr 03 '15 02:04 colinsullivan