VadSilero¶
processing extra: vad-silero
Use the Silero VAD model to perform voice activity detection on audio content. Find the model here: https://github.com/snakers4/silero-vad
- Node type:
VadSilero- Input:
AudioPayload- Output:
AudioPayload- Extra:
vad-silero
$ pip install "juturna-nodes[vad-silero]"
How it works¶
The node keeps the last keep audio messages, and runs the model on their
concatenation every time a new message arrives. The output payload carries
the speech found in that audio, and the output meta describes it:
Meta key |
Description |
|---|---|
|
|
|
The detected speech segments |
|
Duration of the speech audio left after the detection |
|
The audio the detection ran on, before the cut |
|
Version of the last buffered message |
TranscriberWhisper relies on silence and speech_timestamps, so the two
nodes are usually linked together.
Arguments¶
The detection arguments are passed to the Silero get_speech_timestamps
function.
Argument |
Type |
Default |
Description |
|---|---|---|---|
|
|
|
Where to run the model ( |
|
|
|
Sampling rate of the source audio, in Hz |
|
|
|
Speech probability threshold |
|
|
|
Discard speech chunks shorter than this |
|
|
|
Split speech chunks longer than this |
|
|
|
Silence to wait after speech ends before cutting |
|
|
|
Padding added to each side of a speech chunk |
|
|
|
Number of audio messages the detection runs on |
License¶
Code and weights: silero-vad, MIT (its
LICENSEfile and the PyPI classifier); the model ships inside thesilero-vadpackage.Runtime: PyTorch, BSD-3-Clause (its
LICENSEfile).
Configuration¶
Default node arguments, as defined in the node config.toml file. Any of
them can be overridden in the node configuration of a pipeline.
[arguments]
device = "cpu"
rate = 16000
threshold = 0.75
min_speech_duration_ms = 0
max_speech_duration_s = "inf"
min_silence_duration_ms = 2000
speech_pad_ms = 400
keep = 1
[meta]
Pipeline usage¶
{
"name": "vad_silero",
"type": "VadSilero",
"configuration": {}
}
Reference¶
- class VadSilero(
- device: str,
- rate: int,
- threshold: float,
- min_speech_duration_ms: int,
- max_speech_duration_s: float | str,
- min_silence_duration_ms: int,
- speech_pad_ms: int,
- keep: int,
- **kwargs,
Node implementation class