# SpeechEvent

<a id="speechevent"></a>

# SpeechEvent

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

struct SpeechEvent
```

[Defined in src/speech/include/icy/speech/event.h:44](https://github.com/auscaster/icey/blob/main/src/speech/include/icy/speech/event.h#L44)

A speech:start, speech:update or speech:end event, with the source, detector, audio and signal levels that produced it.

## Public Attributes

| Return | Name | Description |
|--------|------|-------------|
| `std::string` | [`type`](#type-21)  |  |
| `std::string` | [`source`](#source)  |  |
| `std::string` | [`detector`](#detector)  |  |
| `int64_t` | [`emittedAtUsec`](#emittedatusec)  |  |
| [`AudioRef`](https://auscaster.com/icey/docs/api-reference/icy-speech-AudioRef.md#audioref) | [`audio`](#audio-3)  |  |
| `bool` | [`active`](#active-4)  |  |
| `float` | [`level`](#level-2)  |  |
| `float` | [`peak`](#peak)  |  |
| [`json::Value`](https://auscaster.com/icey/docs/api-reference/icy-json.md#value) | [`data`](#data-8)  |  |

---

<a id="type-21"></a>

### type

```cpp
std::string type = "speech:update"
```

[Defined in src/speech/include/icy/speech/event.h:46](https://github.com/auscaster/icey/blob/main/src/speech/include/icy/speech/event.h#L46)

---

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

### source

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

[Defined in src/speech/include/icy/speech/event.h:47](https://github.com/auscaster/icey/blob/main/src/speech/include/icy/speech/event.h#L47)

---

<a id="detector"></a>

### detector

```cpp
std::string detector
```

[Defined in src/speech/include/icy/speech/event.h:48](https://github.com/auscaster/icey/blob/main/src/speech/include/icy/speech/event.h#L48)

---

<a id="emittedatusec"></a>

### emittedAtUsec

```cpp
int64_t emittedAtUsec = 0
```

[Defined in src/speech/include/icy/speech/event.h:49](https://github.com/auscaster/icey/blob/main/src/speech/include/icy/speech/event.h#L49)

---

<a id="audio-3"></a>

### audio

```cpp
AudioRef audio
```

Type: [`AudioRef`](https://auscaster.com/icey/docs/api-reference/icy-speech-AudioRef.md#audioref)

[Defined in src/speech/include/icy/speech/event.h:50](https://github.com/auscaster/icey/blob/main/src/speech/include/icy/speech/event.h#L50)

---

<a id="active-4"></a>

### active

```cpp
bool active = false
```

[Defined in src/speech/include/icy/speech/event.h:51](https://github.com/auscaster/icey/blob/main/src/speech/include/icy/speech/event.h#L51)

---

<a id="level-2"></a>

### level

```cpp
float level = 0.0f
```

[Defined in src/speech/include/icy/speech/event.h:52](https://github.com/auscaster/icey/blob/main/src/speech/include/icy/speech/event.h#L52)

---

<a id="peak"></a>

### peak

```cpp
float peak = 0.0f
```

[Defined in src/speech/include/icy/speech/event.h:53](https://github.com/auscaster/icey/blob/main/src/speech/include/icy/speech/event.h#L53)

---

<a id="data-8"></a>

### data

```cpp
json::Value data = json::Value::object()
```

Type: [`json::Value`](https://auscaster.com/icey/docs/api-reference/icy-json.md#value)

[Defined in src/speech/include/icy/speech/event.h:54](https://github.com/auscaster/icey/blob/main/src/speech/include/icy/speech/event.h#L54)
