BingLingGroup / autosub

Command-line utility to transcribe/translate from video/audio/subtitles to subtitles
GNU General Public License v2.0
1.97k stars 243 forks source link

Google Colab #188

Closed Mennaruuk closed 2 years ago

Mennaruuk commented 2 years ago

Make sure you have read the readme, searched and read the issues related to yours. Otherwise it will be considered as a duplicate which will be closed immediately.

Is your feature request related to a problem? Please describe. (Optional)

Hello my friends. Many of us have slow computers and low budgets. Google Colab offers free but limited GPU to those with Google accounts.

Describe the solution you'd like I would love help in getting autosub to work inside Google Colab. I don’t know how to get started in making it work.

Describe alternatives you've considered (Optional) I’m currently using autosub with my computer, but it’s very slow.

Additional context (Optional) Thank you for your awesome work.

Mennaruuk commented 2 years ago

Okay, so I did some trial and error, and I made something that kinda works! I uploaded it here in this comment if anyone wants to take a look and modify it as they please.

But I get an error when I run the autosub command. Of course, this error is no stranger to this repo! It's the dreaded enums error. I saw that a commit 3489be8 was made to address this, but unfortunately it isn't working on my end. I'm also using the dev branch as suggested here. Is there a way to fix this problem? Thank you very much!

Traceback (most recent call last):
  File "/usr/local/bin/autosub", line 5, in <module>
    from autosub import main
  File "/usr/local/lib/python3.7/dist-packages/autosub/__init__.py", line 16, in <module>
    from autosub import ffmpeg_utils
  File "/usr/local/lib/python3.7/dist-packages/autosub/ffmpeg_utils.py", line 18, in <module>
    from autosub import constants
  File "/usr/local/lib/python3.7/dist-packages/autosub/constants.py", line 16, in <module>
    from google.cloud.speech_v1p1beta1 import enums  # pylint: disable=unused-import
ImportError: cannot import name 'enums' from 'google.cloud.speech_v1p1beta1' (/usr/local/lib/python3.7/dist-packages/google/cloud/speech_v1p1beta1/__init__.py)
codesimp1e commented 2 years ago

You can just run !pip install google.cloud.speech==1.3 instead of the latest version

Mennaruuk commented 2 years ago

You can just run !pip install google.cloud.speech==1.3 instead of the latest version

THANK YOU! Due to your answer, now it's working!!!