# helia_edge.models.silero_vad_params

Typed parameters of the Silero VAD v6 streaming model and its weight mapping; importable without Keras.

## helia_edge.models.silero_vad_params.SILERO_VAD_V6_ONNX

`constant` · `python`

```python
SILERO_VAD_V6_ONNX = WeightMapping(name='silero_vad_v6_onnx', source=SourcePin(uri='https://github.com/snakers4/silero-vad/raw/60b7ffa243625ebdc1070275a29f18c87843786a/src/silero_vad/data/silero_vad_16k_op15.onnx', sha256='7ed98ddbad84ccac4cd0aeb3099049280713df825c610a8ed34543318f1b2c49', format='onnx', note='v6.2.2, MIT. silero_vad_16k.safetensors in the same repository holds different weights.'), rows=(WeightRow(sources=('model.stft.forward_basis_buffer'), transforms=(Transpose(perm=(2, 1, 0))), layer='stft', weight='basis'), *_conv(0), *_conv(1), *_conv(2), *_conv(3), WeightRow(sources=('model.decoder.rnn.weight_ih'), transforms=(Transpose(perm=(1, 0))), layer='lstm', weight='kernel'), WeightRow(sources=('model.decoder.rnn.weight_hh'), transforms=(Transpose(perm=(1, 0))), layer='lstm', weight='recurrent_kernel'), WeightRow(sources=('model.decoder.rnn.bias_ih', 'model.decoder.rnn.bias_hh'), combine='sum', layer='lstm', weight='bias'), WeightRow(sources=('model.decoder.decoder.2.weight'), source_shape=(1, SileroVadParams().units, 1), transforms=(Reshape(shape=(SileroVadParams().units, 1))), layer='prob', weight='kernel'), WeightRow(sources=('model.decoder.decoder.2.bias'), layer='prob', weight='bias')))
```

Mapping of every weight of the Silero VAD v6 model (``build(SileroVadParams())``) from the pinned v6.2.2
ONNX file.

Source: `helia_edge/models/silero_vad_params.py:66`

## helia_edge.models.silero_vad_params.MAPPINGS

`constant` · `python`

```python
MAPPINGS: dict[str, WeightMapping] = {SILERO_VAD_V6_ONNX.name: SILERO_VAD_V6_ONNX}
```

Weight mappings for this family, by name.

Source: `helia_edge/models/silero_vad_params.py:118`

## helia_edge.models.silero_vad_params.SileroVadParams

`class` · `python`

```python
SileroVadParams()
```

Silero VAD v6 (16 kHz). The geometry is fixed by the v6.2.2 weights; the options choose how the
model computes it. Every option has the same weights (paths and shapes), so one mapping imports into
each; Keras ``.weights.h5`` files are keyed by layer class, so save one per option set.

Source: `helia_edge/models/silero_vad_params.py:10`

### helia_edge.models.silero_vad_params.SileroVadParams.model_config

`attribute` · `python`

```python
model_config = ConfigDict(frozen=True, extra='forbid')
```

Source: `helia_edge/models/silero_vad_params.py:31`

### helia_edge.models.silero_vad_params.SileroVadParams.family

`attribute` · `python`

```python
family: Literal['silero_vad'] = 'silero_vad'
```

Model family.

Source: `helia_edge/models/silero_vad_params.py:33`

### helia_edge.models.silero_vad_params.SileroVadParams.sample_rate

`attribute` · `python`

```python
sample_rate: Literal[16000] = 16000
```

Audio sample rate in Hz.

Source: `helia_edge/models/silero_vad_params.py:34`

### helia_edge.models.silero_vad_params.SileroVadParams.context

`attribute` · `python`

```python
context: Literal[64] = 64
```

Samples of the previous call repeated at the start of each call.

Source: `helia_edge/models/silero_vad_params.py:35`

### helia_edge.models.silero_vad_params.SileroVadParams.hop

`attribute` · `python`

```python
hop: Literal[512] = 512
```

New samples per call (32 ms).

Source: `helia_edge/models/silero_vad_params.py:36`

### helia_edge.models.silero_vad_params.SileroVadParams.units

`attribute` · `python`

```python
units: Literal[128] = 128
```

LSTM state size of ``state_in_0``/``state_in_1`` (h, c).

Source: `helia_edge/models/silero_vad_params.py:37`

### helia_edge.models.silero_vad_params.SileroVadParams.stft

`attribute` · `python`

```python
stft: Literal['conv1d', 'conv_blocks'] = 'conv1d'
```

``conv1d`` frames the reflect-padded audio with a strided convolution. ``conv_blocks``
convolves 64-sample blocks instead, with the right reflect padding folded into the last
frame's kernel, so the export is mirror-pad-free; it is exact in float.

Source: `helia_edge/models/silero_vad_params.py:38`

### helia_edge.models.silero_vad_params.SileroVadParams.magnitude

`attribute` · `python`

```python
magnitude: Literal['sqrt', 'max_projection'] = 'sqrt'
```

``sqrt`` is the exact magnitude of each bin. ``max_projection`` is the largest of 9
projections of (|re|, |im|) onto directions from 0 to 90 degrees, within 0.25% in float32; it needs no
square root, so the model exports to int16 activations.

Source: `helia_edge/models/silero_vad_params.py:39`

### helia_edge.models.silero_vad_params.SileroVadParams.encoder_tail

`attribute` · `python`

```python
encoder_tail: Literal['conv', 'live_taps'] = 'conv'
```

``conv`` runs the last two encoder layers as convolutions. ``live_taps`` runs them as
dense layers over the kernel taps that see real frames rather than padding; it is exact in float.

Source: `helia_edge/models/silero_vad_params.py:40`

### helia_edge.models.silero_vad_params.SileroVadParams.samples

`attribute` · `python`

```python
samples: int
```

Samples per call: ``context + hop``.

Source: `helia_edge/models/silero_vad_params.py:43`

### helia_edge.models.silero_vad_params.SileroVadParams.input_shape

`attribute` · `python`

```python
input_shape: tuple[int, ...]
```

The fixed audio shape ``(samples,)``, without the batch axis.

Source: `helia_edge/models/silero_vad_params.py:48`
