tomchang25 / whisper-auto-transcribe

Auto transcribe tool based on whisper
MIT License
205 stars 14 forks source link

Error when running on Google Colab #55

Open vanminhle opened 11 months ago

vanminhle commented 11 months ago

When using on Google Colab (T4 GPU) through Command-line interface, I get error related to Vocal extracter. Specifically

Running Command: !python /content/whisper-auto-transcribe/cli.py '/content/Files/Youtube.mp4' --output '/content/tmp/Youtube.srt' -lang ja --model large

Error Message:

FileNotFoundError: [Errno 2] No such file or directory: 'demucs --two-stems=vocals "/tmp/tempfreesubtitle/main.mp4" -o "/tmp" --filename "{stem}.{ext}"'

Exception: Error. Vocal extracter unavailable. Received: 
/content/Files/Youtube.mp4, /tmp/tempfreesubtitle/main.mp4, /tmp
demucs --two-stems=vocals "/tmp/tempfreesubtitle/main.mp4" -o "/tmp" --filename "{stem}.{ext}"

Output:

Traceback (most recent call last):
  File "/content/whisper-auto-transcribe/src/utils/task.py", line 108, in transcribe
    subprocess.run(cmd, check=True)
  File "/usr/lib/python3.10/subprocess.py", line 503, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.10/subprocess.py", line 971, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.10/subprocess.py", line 1863, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'demucs --two-stems=vocals "/tmp/tempfreesubtitle/main.mp4" -o "/tmp" --filename "{stem}.{ext}"'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/content/whisper-auto-transcribe/cli.py", line 139, in <module>
    cli()
  File "/content/whisper-auto-transcribe/cli.py", line 121, in cli
    subtitle_path = transcribe(
  File "/content/whisper-auto-transcribe/src/utils/task.py", line 110, in transcribe
    raise Exception(
Exception: Error. Vocal extracter unavailable. Received: 
/content/Files/Youtube.mp4, /tmp/tempfreesubtitle/main.mp4, /tmp
demucs --two-stems=vocals "/tmp/tempfreesubtitle/main.mp4" -o "/tmp" --filename "{stem}.{ext}"

Solution that i have tried: I set the vocal_extractor to False on Line 27 in src/util/task.py, it working properly with no issues. Source: (https://github.com/tomchang25/whisper-auto-transcribe/issues/47#issuecomment-1528943062). But i would like to have a better solution for running this without disable Vocal extracter