v6.2.3

snakers4/silero-vadv6.2.3Sep 23, 2026by adamnsandle

Upgrading?

AI Summary

This release makes the `torchaudio` dependency optional, leaving only `torch` as a requirement. Users needing audio I/O must now explicitly install backends, and the package fixes an import error when `onnxruntime` is missing.

Key Highlights

  • `torchaudio` is now an optional dependency; only `torch` is required.
  • Audio I/O helpers (`read_audio`/`save_audio`) require explicit installation of backends via extras (`[audio]` or `[codec]`).
  • Fixed import failure for `silero_vad` when `onnxruntime` is not installed by using lazy imports.
  • Numpy is now declared in the `[onnx-cpu]` and `[onnx-gpu]` extras.

Breaking Changes

  • Previously, `torchaudio` was required. Now, attempting to use `read_audio` or `save_audio` without an explicit backend will fail with an error.

New Features

  • Support for `torchcodec` as an alternative audio I/O backend.
  • Ability to load audio manually from any source (1-D float32 `torch.Tensor`) without needing audio I/O backends.
  • Lazy loading of the sequence path to resolve import issues.

Full Release Notes

torchaudio is now an optional dependency instead of required. Only torch is required — the model itself never used torchaudio, only the `read_audio` / `save_audio` helpers did.

Users who need audio I/O must now install a backend explicitly:

- `pip install silero-vad[audio]` (torchaudio)
- `pip install silero-vad[codec]` (torchcodec)
- `pip install silero-vad[all]` (everything)

Key changes:

- `read_audio` / `save_audio` now work with either torchaudio or torchcodec; with neither installed they raise an error naming the extra to install
- Fixed: `import silero_vad` failed when onnxruntime was not installed — the sequence path is now imported lazily
- numpy is now declared in [onnx-cpu] / [onnx-gpu]

If you load audio yourself, no backend is needed at all:

```python3
from silero_vad import load_silero_vad, get_speech_timestamps

model = load_silero_vad()
audio = ...                                      # 1-D float32 torch.Tensor from any source
ts = get_speech_timestamps(audio, model, return_seconds=True)
```

Related Repositories