Skip to content

Commit

Permalink
ci: make ci stable (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
yihong0618 authored Nov 21, 2022
1 parent 7aa7f16 commit 6930b17
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
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

0 comments on commit 6930b17

Please sign in to comment.