Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: make ci stable #52

Merged
merged 5 commits into from
Nov 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions autocut/transcribe.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ def _detect_voice_activity(self, audio):
return [{"start": 0, "end": len(audio)}]
tic = time.time()
if self.vad_model is None or self.detect_speech is None:
# torch load limit https://github.com/pytorch/vision/issues/4156
torch.hub._validate_not_a_forked_repo = lambda a, b, c: True
self.vad_model, funcs = torch.hub.load(
repo_or_dir="snakers4/silero-vad", model="silero_vad", trust_repo=True
)
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = autocut
version = attr: autocut.__version__
license = Apache Software License
description = 通过字幕来剪切视频
description = Cut video by subtitles
long_description = file: README.md
classifiers =
License :: OSI Approved :: Apache Software License
Expand Down
2 changes: 1 addition & 1 deletion test/test_transcribe.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def test_encoding_transcribe(self, file_name):
transcribe = Transcribe(args)
transcribe.run()
with open(
os.path.exists(TEST_VIDEO_PATH + file_name.split(".")[0] + ".md"),
os.path.join(TEST_VIDEO_PATH + file_name.split(".")[0] + ".md"),
encoding="gbk",
):
self.assertTrue(True)
Expand Down