# SpeechDialogueRequest

> 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.speechdialoguerequest/
> Summary: SpeechDialogueRequest: A request to voice a dialogue.

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

A request to voice a dialogue.

```csharp
public sealed record SpeechDialogueRequest : IEquatable<SpeechDialogueRequest>
```

<dl class="api-relations"><dt>Inheritance</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.object">object</a> ← <a href="/api/tracon.speechdialoguerequest/">SpeechDialogueRequest</a></dd><dt>Implements</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.iequatable-1">IEquatable&lt;SpeechDialogueRequest&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>

## Constructors

### <a id="Tracon_SpeechDialogueRequest__ctor"></a> SpeechDialogueRequest\(\)

```csharp
public SpeechDialogueRequest()
```

## Properties

### <a id="Tracon_SpeechDialogueRequest_Credential"></a> Credential

Gets the tenant's own credential for the provider, or [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) to use
the credential the synthesizer was configured with.

```csharp
public ModelProviderCredential? Credential { get; init; }
```

#### Property Value

 [ModelProviderCredential](/api/tracon.modelprovidercredential/)?

#### Remarks

Tracon sets it from the tenant's provider binding, and only for a synthesizer whose
[ISpeechDialogueSynthesizer.SupportsTenantCredentials](/api/tracon.ispeechdialoguesynthesizer/#Tracon_ISpeechDialogueSynthesizer_SupportsTenantCredentials) is
[true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool); a value the caller sets is replaced. It lives in memory for
the call and is never persisted; its text form never shows the key.

### <a id="Tracon_SpeechDialogueRequest_IncludeTimestamps"></a> IncludeTimestamps

Gets whether each turn's time range and the character timing are returned with the
audio. Default [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool).

```csharp
public bool IncludeTimestamps { get; init; }
```

#### Property Value

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

Gets the language's ISO 639-1 code. The provider detects it itself if empty.

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

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

Gets the dialogue model to use. When empty, the synthesizer uses its own default
(the built-in client: `VoiceOptions.DialogueModelId`, then the provider's
default).

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

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

The single-voice model (`VoiceOptions.SynthesisModelId`) is not used here: a
model that speaks one voice need not voice a dialogue.

### <a id="Tracon_SpeechDialogueRequest_OutputFormat"></a> OutputFormat

Gets the provider's output format name (for example, `pcm_24000`); when empty,
the synthesizer's default.

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

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

Not a MIME type. Raw `pcm_*` output carries no file header: the caller that
joins several results adds the header itself.

### <a id="Tracon_SpeechDialogueRequest_ProviderSettings"></a> ProviderSettings

Gets the provider-specific settings, keyed under the provider's prefix (for example
`elevenlabs.stability`). Empty by default.

```csharp
public IReadOnlyDictionary<string, JsonElement> ProviderSettings { get; init; }
```

#### Property Value

 [IReadOnlyDictionary](https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlydictionary\-2)<[string](https://learn.microsoft.com/dotnet/api/system.string), [JsonElement](https://learn.microsoft.com/dotnet/api/system.text.json.jsonelement)\>

#### Remarks

A synthesizer refuses an unknown key, another provider's key, a key that has no
effect on a dialogue, and a value of the wrong type, before it calls the service. It
never ignores one. The message names the key, never the value.

### <a id="Tracon_SpeechDialogueRequest_Turns"></a> Turns

Gets the turns, in the order they are spoken.

```csharp
public required IReadOnlyList<SpeechDialogueTurn> Turns { get; init; }
```

#### Property Value

 [IReadOnlyList](https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlylist\-1)<[SpeechDialogueTurn](/api/tracon.speechdialogueturn/)\>

## Methods

### <a id="Tracon_SpeechDialogueRequest_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_SpeechDialogueRequest_Equals_Tracon_SpeechDialogueRequest_"></a> Equals\(SpeechDialogueRequest?\)

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

`other` [SpeechDialogueRequest](/api/tracon.speechdialoguerequest/)?

#### Returns

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

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

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

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

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

### <a id="Tracon_SpeechDialogueRequest_op_Equality_Tracon_SpeechDialogueRequest_Tracon_SpeechDialogueRequest_"></a> operator ==\(SpeechDialogueRequest?, SpeechDialogueRequest?\)

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

`left` [SpeechDialogueRequest](/api/tracon.speechdialoguerequest/)?

`right` [SpeechDialogueRequest](/api/tracon.speechdialoguerequest/)?

#### Returns

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

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

`left` [SpeechDialogueRequest](/api/tracon.speechdialoguerequest/)?

`right` [SpeechDialogueRequest](/api/tracon.speechdialoguerequest/)?

#### Returns

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