Skip to content

Conversation

@hungdoba
Copy link

Description

  • Adds support for offline Silero VAD model loading by introducing silero_repo_or_dir, silero_source and silero_model parameters to AudioToTextRecorder. This allows users to specify a local directory or pre-loaded model, preventing torch.hub.load from attempting to download from GitHub in offline environments.
  • The change also allows customization of the Silero VAD model name for future-proofing against new model variants.

Changes

  • Added silero_repo_or_dir parameter to specify a local directory for Silero VAD.
  • Added silero_source parameter to specify source of models, "local" or "github".
  • Added silero_model parameter to accept a pre-loaded model.
  • Updated torch.hub.load to use source="local" for local directories.
  • Updated README.md with new parameter documentation.
  • Added test script offline_vad.py to verify offline functionality.

Testing

  • Tested with a local Silero VAD directory (./silero-vad) in an offline environment.
  • Verified transcription works with silero_deactivity_detection=True.

with silero_repo_or_dir, silero_source, silero_model parameter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant