# VoiceDiagnostics
Source: https://docs.maelstrom-ai.co/0.2/reference/devtools/classes/voicediagnostics/
Documentation revision: 89a8f5e9d10cedcf0b30376d7846113f06f26120
SDK manifests in this build: @maelstrom-co/react@0.2.1, @maelstrom-co/client@0.2.1, @maelstrom-co/connectors@0.2.1, @maelstrom-co/protocol@0.2.1, @maelstrom-co/engine@0.2.1
These docs follow this source revision. Manifest versions do not prove release compatibility; verify the installed package exports before using an API.

Defined in: packages/devtools/src/voice-diagnostics.ts:86

Retains the latest 100 voice metadata events and 16 terminal transport summaries.

## Constructors

### Constructor

> **new VoiceDiagnostics**(): `VoiceDiagnostics`

#### Returns

`VoiceDiagnostics`

## Methods

### getSnapshot()

> **getSnapshot**(): readonly [`DiagnosticEntry`](https://docs.maelstrom-ai.co/0.2/reference/devtools/interfaces/diagnosticentry/) &amp; `object`\[\]

Defined in: packages/devtools/src/voice-diagnostics.ts:94

Returns retained recent metadata.

#### Returns

readonly [`DiagnosticEntry`](https://docs.maelstrom-ai.co/0.2/reference/devtools/interfaces/diagnosticentry/) &amp; `object`\[\]

* * *

### getTransportHistory()

> **getTransportHistory**(): readonly [`RetainedLiveTransport`](https://docs.maelstrom-ai.co/0.2/reference/devtools/interfaces/retainedlivetransport/)\[\]

Defined in: packages/devtools/src/voice-diagnostics.ts:96

Returns bounded terminal transport history.

#### Returns

readonly [`RetainedLiveTransport`](https://docs.maelstrom-ai.co/0.2/reference/devtools/interfaces/retainedlivetransport/)\[\]

* * *

### onSessionEvent()

> **onSessionEvent**(`input`, `identity?`): `void`

Defined in: packages/devtools/src/voice-diagnostics.ts:177

Projects lifecycle and tool events; transcript content is excluded.

#### Parameters

##### input

`unknown`

##### identity?

[`VoiceEventIdentity`](https://docs.maelstrom-ai.co/0.2/reference/devtools/interfaces/voiceeventidentity/) = `{}`

#### Returns

`void`

* * *

### record()

> **record**(`entry`): `void`

Defined in: packages/devtools/src/voice-diagnostics.ts:153

Retains a projected metadata event without content.

#### Parameters

##### entry

[`DiagnosticEntry`](https://docs.maelstrom-ai.co/0.2/reference/devtools/interfaces/diagnosticentry/)

#### Returns

`void`

* * *

### retainTransport()

> **retainTransport**<`T`\>(`snapshot`, `identity`): `void`

Defined in: packages/devtools/src/voice-diagnostics.ts:98

Projects a terminal transport before retaining it.

#### Type Parameters

##### T

`T` _extends_ [`TransportSnapshot`](https://docs.maelstrom-ai.co/0.2/reference/devtools/interfaces/transportsnapshot/)

#### Parameters

##### snapshot

`T`

##### identity

###### backendModel

`string`

###### model

`string`

###### providerInstanceId

`string`

#### Returns

`void`

* * *

### subscribe()

> **subscribe**(`listener`): () => `void`

Defined in: packages/devtools/src/voice-diagnostics.ts:146

Observes metadata and history changes.

#### Parameters

##### listener

() => `void`

#### Returns

() => `void`
