# VoiceSessionRecord

> Tracon documentation. Tracon is a .NET package family that adds a control
> plane on Microsoft Agent Framework, published as NuGet packages that run
> inside your own ASP.NET Core application.
>
> Page: https://tracon.dev/api/tracon.voicesessionrecord/
> Summary: VoiceSessionRecord: The summary record of a real-time voice connection.

<div class="api-provenance">Namespace Tracon · Assembly <code>Tracon.Abstractions.dll</code></div>

The summary record of a real-time voice connection.

```csharp
public sealed record VoiceSessionRecord : IEquatable<VoiceSessionRecord>
```

<dl class="api-relations"><dt>Inheritance</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.object">object</a> ← <a href="/api/tracon.voicesessionrecord/">VoiceSessionRecord</a></dd><dt>Implements</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.iequatable-1">IEquatable&lt;VoiceSessionRecord&gt;</a></dd><dt>Inherited Members</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object?, object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object?, object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a></dd></dl>

## Remarks

The audio **content** does not sit in this record. The
record is only for measurement and observability: who, when, how many
turns, how much audio. If audio is stored (default *no*), the bytes
are in the `attachments` table.

Each conversation turn also produces a normal `runs` row. Voice does
not change the run path; it only changes the input and output format.

## Constructors

### <a id="Tracon_VoiceSessionRecord__ctor"></a> VoiceSessionRecord\(\)

```csharp
public VoiceSessionRecord()
```

## Properties

### <a id="Tracon_VoiceSessionRecord_AgentName"></a> AgentName

The name of the agent being talked to.

```csharp
public required string AgentName { get; init; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)

### <a id="Tracon_VoiceSessionRecord_Cost"></a> Cost

What the conversation cost; [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) when nothing was priced.

```csharp
public VoiceSessionCost? Cost { get; init; }
```

#### Property Value

 [VoiceSessionCost](/api/tracon.voicesessioncost/)?

### <a id="Tracon_VoiceSessionRecord_CreatedBy"></a> CreatedBy

The actor who opened the connection.

```csharp
public string? CreatedBy { get; init; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)?

### <a id="Tracon_VoiceSessionRecord_EndReason"></a> EndReason

Why the connection closed.

```csharp
public VoiceSessionEndReason? EndReason { get; init; }
```

#### Property Value

 [VoiceSessionEndReason](/api/tracon.voicesessionendreason/)?

### <a id="Tracon_VoiceSessionRecord_EndedAt"></a> EndedAt

The moment the connection closed; [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) while still open.

```csharp
public DateTimeOffset? EndedAt { get; init; }
```

#### Property Value

 [DateTimeOffset](https://learn.microsoft.com/dotnet/api/system.datetimeoffset)?

### <a id="Tracon_VoiceSessionRecord_Id"></a> Id

The connection's identifier.

```csharp
public required Guid Id { get; init; }
```

#### Property Value

 [Guid](https://learn.microsoft.com/dotnet/api/system.guid)

### <a id="Tracon_VoiceSessionRecord_InputSeconds"></a> InputSeconds

The total resolved audio duration (seconds). Stays
[null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) if the provider does not report duration —
Tracon does not fabricate a duration.

```csharp
public decimal? InputSeconds { get; init; }
```

#### Property Value

 [decimal](https://learn.microsoft.com/dotnet/api/system.decimal)?

### <a id="Tracon_VoiceSessionRecord_LiveSeconds"></a> LiveSeconds

The billable wall-clock duration of a provider-hosted live session, in seconds.

```csharp
public decimal? LiveSeconds { get; init; }
```

#### Property Value

 [decimal](https://learn.microsoft.com/dotnet/api/system.decimal)?

#### Remarks

This is **not** [VoiceSessionRecord.InputSeconds](/api/tracon.voicesessionrecord/#Tracon_VoiceSessionRecord_InputSeconds). That field is the
resolved duration of audio Tracon transcribed; this one is how long the
provider hosted the session. Different quantities, different fields. The number
is the provider's — Tracon does not see the media of a live session and does
not invent a duration, so it stays [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) when the provider
reports none.

### <a id="Tracon_VoiceSessionRecord_Model"></a> Model

The model the conversation ran on; [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) when unknown.

```csharp
public string? Model { get; init; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)?

### <a id="Tracon_VoiceSessionRecord_OutputChars"></a> OutputChars

The total characters synthesized to speech.

```csharp
public long? OutputChars { get; init; }
```

#### Property Value

 [long](https://learn.microsoft.com/dotnet/api/system.int64)?

### <a id="Tracon_VoiceSessionRecord_Provider"></a> Provider

The provider that hosted the conversation, e.g. `openai`;
[null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) when Tracon ran the conversation itself.

```csharp
public string? Provider { get; init; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)?

### <a id="Tracon_VoiceSessionRecord_SessionId"></a> SessionId

The identifier of the agent session the conversation runs in.

```csharp
public required string SessionId { get; init; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)

### <a id="Tracon_VoiceSessionRecord_StartedAt"></a> StartedAt

The moment the connection opened.

```csharp
public required DateTimeOffset StartedAt { get; init; }
```

#### Property Value

 [DateTimeOffset](https://learn.microsoft.com/dotnet/api/system.datetimeoffset)

### <a id="Tracon_VoiceSessionRecord_TenantId"></a> TenantId

The tenant. Resolved when the connection is established and
**fixed** for the connection's lifetime.

```csharp
public required string TenantId { get; init; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)

### <a id="Tracon_VoiceSessionRecord_Turns"></a> Turns

The number of completed conversation turns.

```csharp
public int Turns { get; init; }
```

#### Property Value

 [int](https://learn.microsoft.com/dotnet/api/system.int32)

## Methods

### <a id="Tracon_VoiceSessionRecord_Equals_System_Object_"></a> Equals\(object?\)

```csharp
public override bool Equals(object? obj)
```

#### Parameters

`obj` [object](https://learn.microsoft.com/dotnet/api/system.object)?

#### Returns

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### <a id="Tracon_VoiceSessionRecord_Equals_Tracon_VoiceSessionRecord_"></a> Equals\(VoiceSessionRecord?\)

```csharp
public bool Equals(VoiceSessionRecord? other)
```

#### Parameters

`other` [VoiceSessionRecord](/api/tracon.voicesessionrecord/)?

#### Returns

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### <a id="Tracon_VoiceSessionRecord_GetHashCode"></a> GetHashCode\(\)

```csharp
public override int GetHashCode()
```

#### Returns

 [int](https://learn.microsoft.com/dotnet/api/system.int32)

### <a id="Tracon_VoiceSessionRecord_ToString"></a> ToString\(\)

```csharp
public override string ToString()
```

#### Returns

 [string](https://learn.microsoft.com/dotnet/api/system.string)

## Operators

### <a id="Tracon_VoiceSessionRecord_op_Equality_Tracon_VoiceSessionRecord_Tracon_VoiceSessionRecord_"></a> operator ==\(VoiceSessionRecord?, VoiceSessionRecord?\)

```csharp
public static bool operator ==(VoiceSessionRecord? left, VoiceSessionRecord? right)
```

#### Parameters

`left` [VoiceSessionRecord](/api/tracon.voicesessionrecord/)?

`right` [VoiceSessionRecord](/api/tracon.voicesessionrecord/)?

#### Returns

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### <a id="Tracon_VoiceSessionRecord_op_Inequality_Tracon_VoiceSessionRecord_Tracon_VoiceSessionRecord_"></a> operator \!=\(VoiceSessionRecord?, VoiceSessionRecord?\)

```csharp
public static bool operator !=(VoiceSessionRecord? left, VoiceSessionRecord? right)
```

#### Parameters

`left` [VoiceSessionRecord](/api/tracon.voicesessionrecord/)?

`right` [VoiceSessionRecord](/api/tracon.voicesessionrecord/)?

#### Returns

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)
