BingLingGroup / autosub

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

fix multiple issues #144

Closed jitingcn closed 3 years ago

jitingcn commented 3 years ago

This pull request should fix #142, close #137 and close #143

The major changes are: ci: add ci script for automated testing, switch to GitHub Actions

fix(sub_utils.py): add missing separator and prevent blank input from being accepted

refactor: fix breaking changes in google-cloud-speech v2.0.0 (untest)

Please review and suggestions are welcome.

jitingcn commented 3 years ago

with the option -der:

Translating text from "en" to "zh-cn".
Bilingual subtitles file created at "/home/runner/work/autosub/autosub/test.en&zh-cn.srt".
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.8.5/x64/bin/autosub", line 11, in <module>
    load_entry_point('autosub==0.5.7a0', 'console_scripts', 'autosub')()
  File "/opt/hostedtoolcache/Python/3.8.5/x64/lib/python3.8/site-packages/autosub/__init__.py", line 159, in main
    cmdline_utils.audio_or_video_prcs(args,
  File "/opt/hostedtoolcache/Python/3.8.5/x64/lib/python3.8/site-packages/autosub/cmdline_utils.py", line 1691, in audio_or_video_prcs
    sub_utils.pysubs2_ssa_event_add(
  File "/opt/hostedtoolcache/Python/3.8.5/x64/lib/python3.8/site-packages/autosub/sub_utils.py", line 664, in pysubs2_ssa_event_add
    event.start = src_ssafile.events[i].start
IndexError: list index out of range
Error: Process completed with exit code 1.
BingLingGroup commented 3 years ago

Thanks for your pull request.