Skip to content

Commit

Permalink
Update faster-whisper, fix newer versions of packages breaking, fix t…
Browse files Browse the repository at this point in the history
…ranslated subtitles not added
  • Loading branch information
Sirozha1337 committed Sep 1, 2024
1 parent 4f61220 commit e9ef61a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
2 changes: 1 addition & 1 deletion auto_subtitle/utils/ffmpeg.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def hard_subtitles(input_path: str, output_path: str,
force_style="OutlineColour=&H40000000,BorderStyle=3")

if translated.tmp_file is not None:
intermediate.filter(
intermediate = intermediate.filter(
'subtitles', translated.tmp_file_path,
force_style="OutlineColour=&H40000000,BorderStyle=3,Alignment=6")
ffmpeg.concat(
Expand Down
11 changes: 6 additions & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
faster-whisper==1.0.2
faster-whisper==1.0.3
tqdm==4.66.4
ffmpeg-python==0.2.0
langcodes==3.3.0
transformers>=4.4,<5
torch>=1.6.0
torch>=1.6.0,<=2.3.1
numpy>=1.24.2,<=1.26.4
nltk
sentencepiece
protobuf
nltk<=3.8.1
sentencepiece<=0.2.0
protobuf<=5.27.2
huggingface_hub<=0.23.5
# this package should be installed with `pip install --no-deps EasyNMT==2.0.2`
# EasyNMT==2.0.2
13 changes: 7 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,21 @@
py_modules=["auto_subtitle"],
author="Sergey Chernyaev",
install_requires=[
'faster-whisper==1.0.2',
'faster-whisper==1.0.3',
'tqdm==4.66.4',
'ffmpeg-python==0.2.0',
'langcodes==3.3.0',
'transformers>=4.4,<5',
'torch>=1.6.0',
'torch>=1.6.0,<=2.3.1',
'numpy>=1.24.2,<=1.26.4',
'nltk',
'sentencepiece',
'protobuf',
'nltk<=3.8.1',
'sentencepiece<=0.2.0',
'protobuf<=5.27.2',
'huggingface_hub<=0.23.5',
],
description="Automatically generate and embed subtitles into your videos",
entry_points={
'console_scripts': ['faster_auto_subtitle=auto_subtitle.cli:main'],
},
include_package_data=True,
)
)

0 comments on commit e9ef61a

Please sign in to comment.