Skip to content

Commit

Permalink
feat: add Silero VAD preload
Browse files Browse the repository at this point in the history
- Add "Silero" to the list of recognized terms in VSCode settings for spell checking.
- Replace the VAD model preloading with the Silero VAD model in the Dockerfile.

Signed-off-by: CHEN, CHUN <[email protected]>
  • Loading branch information
jim60105 committed Jan 13, 2025
1 parent d854a53 commit 965a8e9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"saattrupdan",
"setopt",
"setuptools",
"Silero",
"softcatala",
"submuodules",
"theainerd",
Expand Down
11 changes: 9 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,15 @@ ARG CONFIG_HOME
ARG XDG_CONFIG_HOME=${CONFIG_HOME}
ARG HOME="/root"

# Preload vad model
RUN python3 -c 'from whisperx.vad import load_vad_model; load_vad_model("cpu");'
# Preload Silero vad model
RUN python3 <<EOF
import torch
torch.hub.load(repo_or_dir='snakers4/silero-vad',
model='silero_vad',
force_reload=False,
onnx=False,
trust_repo=True)
EOF

# Preload fast-whisper
ARG WHISPER_MODEL
Expand Down

0 comments on commit 965a8e9

Please sign in to comment.