v3.0
snakers4/silero-vadv3.0Dec 7, 2021by snakers4
AI Summary
This release consolidates previous VAD models into a single, high-performance version that offers improved quality and speed. It introduces a simplified API with new functions for speech detection and streaming, effectively replacing deprecated legacy methods.
Key Highlights
- Unified model architecture with significantly improved quality and speed metrics
- Support for GPU acceleration and batching
- Flexible configuration options including sampling rates (8000/16000 Hz) and minimal chunk size (30ms)
- Radically simplified examples and code structure
Breaking Changes
- Deprecated `get_speech_ts` method
- Deprecated `get_speech_ts_adaptive` method
- Deprecated `VADiterator` class
- Deprecated `VADiteratorAdaptive` class
New Features
- New `get_speech_timestamps` function for unified speech detection
- New `VADIterator` class designed for streaming tasks
- GPU and batching support
- Flexible sampling rate and chunk size configurations
Full Release Notes
## Main changes
- One VAD to rule them all! New model includes the functionality of the previous ones with [improved quality](https://github.com/snakers4/silero-vad/wiki/Quality-Metrics) and [speed](https://github.com/snakers4/silero-vad/wiki/Performance-Metrics)!
- Flexible sampling rate, `8000 Hz` and `16000 Hz` are supported;
- Flexible chunk size, minimum chunk size is just 30 milliseconds!
- 100k parameters;
- GPU and batching are supported;
- Radically simplified examples;
## Migration
Please see the new [examples](https://github.com/snakers4/silero-vad/wiki/Examples-and-Dependencies#examples).
New `get_speech_timestamps` is a simplified and unified version of the old deprecated `get_speech_ts` or `get_speech_ts_adaptive` methods.
```
speech_timestamps = get_speech_timestamps(wav, model, sampling_rate=16000)
```
New `VADIterator` class serves as an example for streaming tasks instead of old deprecated `VADiterator` and `VADiteratorAdaptive`.
```
vad_iterator = VADIterator(model)
window_size_samples = 1536
for i in range(0, len(wav), window_size_samples):
speech_dict = vad_iterator(wav[i: i+ window_size_samples], return_seconds=True)
if speech_dict:
print(speech_dict, end=' ')
vad_iterator.reset_states()
```