# VoiceActivityDetectorConfig

<a id="voiceactivitydetectorconfig"></a>

# VoiceActivityDetectorConfig

```cpp
#include <icy/speech/voiceactivitydetector.h>

struct VoiceActivityDetectorConfig
```

[Defined in src/speech/include/icy/speech/voiceactivitydetector.h:31](https://github.com/auscaster/icey/blob/main/src/speech/include/icy/speech/voiceactivitydetector.h#L31)

Settings for a [VoiceActivityDetector](https://auscaster.com/icey/docs/api-reference/icy-speech-VoiceActivityDetector.md#voiceactivitydetector): the source it reports for, the levels that start and stop speech, how long silence lasts before speech ends, and how often it reports while speech continues.

## Public Attributes

| Return | Name | Description |
|--------|------|-------------|
| `std::string` | [`source`](#source-1)  |  |
| `std::string` | [`detectorName`](#detectorname)  |  |
| `int` | [`sampleRateHint`](#sampleratehint)  |  |
| `float` | [`startThreshold`](#startthreshold)  |  |
| `float` | [`stopThreshold`](#stopthreshold)  |  |
| `int64_t` | [`minSilenceUsec`](#minsilenceusec)  |  |
| `int64_t` | [`updateIntervalUsec`](#updateintervalusec)  |  |

---

<a id="source-1"></a>

### source

```cpp
std::string source
```

[Defined in src/speech/include/icy/speech/voiceactivitydetector.h:33](https://github.com/auscaster/icey/blob/main/src/speech/include/icy/speech/voiceactivitydetector.h#L33)

---

<a id="detectorname"></a>

### detectorName

```cpp
std::string detectorName = "energy_vad"
```

[Defined in src/speech/include/icy/speech/voiceactivitydetector.h:34](https://github.com/auscaster/icey/blob/main/src/speech/include/icy/speech/voiceactivitydetector.h#L34)

---

<a id="sampleratehint"></a>

### sampleRateHint

```cpp
int sampleRateHint = 0
```

[Defined in src/speech/include/icy/speech/voiceactivitydetector.h:35](https://github.com/auscaster/icey/blob/main/src/speech/include/icy/speech/voiceactivitydetector.h#L35)

---

<a id="startthreshold"></a>

### startThreshold

```cpp
float startThreshold = 0.045f
```

[Defined in src/speech/include/icy/speech/voiceactivitydetector.h:36](https://github.com/auscaster/icey/blob/main/src/speech/include/icy/speech/voiceactivitydetector.h#L36)

---

<a id="stopthreshold"></a>

### stopThreshold

```cpp
float stopThreshold = 0.020f
```

[Defined in src/speech/include/icy/speech/voiceactivitydetector.h:37](https://github.com/auscaster/icey/blob/main/src/speech/include/icy/speech/voiceactivitydetector.h#L37)

---

<a id="minsilenceusec"></a>

### minSilenceUsec

```cpp
int64_t minSilenceUsec = 250000
```

[Defined in src/speech/include/icy/speech/voiceactivitydetector.h:38](https://github.com/auscaster/icey/blob/main/src/speech/include/icy/speech/voiceactivitydetector.h#L38)

---

<a id="updateintervalusec"></a>

### updateIntervalUsec

```cpp
int64_t updateIntervalUsec = 250000
```

[Defined in src/speech/include/icy/speech/voiceactivitydetector.h:39](https://github.com/auscaster/icey/blob/main/src/speech/include/icy/speech/voiceactivitydetector.h#L39)
