zackees / transcribe-anything

Input a local file or url and this service will transcribe it using Whisper AI. Completely private and Free 🤯🤯🤯
MIT License
418 stars 34 forks source link

FileExistsError #2

Closed suntrop closed 1 year ago

suntrop commented 1 year ago

I just discovered your tool last week and had tested some videos, and it worked fine. Liked it and was nice and easy to work with. But today no video and no YouTube URL work. Didn't change anything in particular. Seems to be a problem with permissions? Did try to run as sudo and made sure write permissions are OK.

Getting this error on every file or URL:

sam@sams-iMac-2 Transcribe_Anything-test % transcribe_anything ./video.mp4
Traceback (most recent call last):
  File "/usr/local/bin/transcribe_anything", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.10/site-packages/transcribe_anything/cmd.py", line 54, in main
    transcribe(
  File "/usr/local/lib/python3.10/site-packages/transcribe_anything/api.py", line 55, in transcribe
    os.makedirs(output_dir, exist_ok=True)
  File "/usr/local/Cellar/python@3.10/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/os.py", line 225, in makedirs
    mkdir(name, mode)
FileExistsError: [Errno 17] File exists: 'video.mp4'

I am using Python 3.10.8 on macOS 12.6.1


EDIT Just noticed, when I set output like dir --output_dir "./output/" it works

zackees commented 1 year ago

Help me reproduce the issue by providing your exact command you are executing that are giving you the problems.

zackees commented 1 year ago

I was able to reproduce it. I'll issue a fix

zackees commented 1 year ago

Okay it's fixed, please run pip install transcribe-anything --upgrade to get the latest version

suntrop commented 1 year ago

Thanks! Works nicely again 👍