# GoogleSpeechOptions

> 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.googlespeechoptions/
> Summary: GoogleSpeechOptions: Settings of GoogleSpeechBuilderExtensions.UseGoogleSpeech.

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

Settings of [GoogleSpeechBuilderExtensions.UseGoogleSpeech](/api/tracon.googlespeechbuilderextensions/#Tracon_GoogleSpeechBuilderExtensions_UseGoogleSpeech_Tracon_ITraconBuilder_System_Action_Tracon_GoogleSpeechOptions__).

```csharp
public sealed class GoogleSpeechOptions
```

<dl class="api-relations"><dt>Inheritance</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.object">object</a> ← <a href="/api/tracon.googlespeechoptions/">GoogleSpeechOptions</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

[GoogleSpeechOptions.Model](/api/tracon.googlespeechoptions/#Tracon_GoogleSpeechOptions_Model) is the only required setting. Tracon carries no Gemini model or voice list in
code: a new model or voice needs no Tracon release.

## Constructors

### <a id="Tracon_GoogleSpeechOptions__ctor"></a> GoogleSpeechOptions\(\)

```csharp
public GoogleSpeechOptions()
```

## Properties

### <a id="Tracon_GoogleSpeechOptions_DialogueSpeakerMode"></a> DialogueSpeakerMode

Gets or sets how a dialogue names its speakers in the request. Default
[GoogleDialogueSpeakerMode.PartMetadata](/api/tracon.googledialoguespeakermode/).

```csharp
public GoogleDialogueSpeakerMode DialogueSpeakerMode { get; set; }
```

#### Property Value

 [GoogleDialogueSpeakerMode](/api/tracon.googledialoguespeakermode/)

#### Remarks

Measured against the live API (2026-10-25): the speaker format depends on the model generation, and
a model refuses the other one with `400`. Set the mode that matches [GoogleSpeechOptions.Model](/api/tracon.googlespeechoptions/#Tracon_GoogleSpeechOptions_Model).

### <a id="Tracon_GoogleSpeechOptions_MaxCharactersPerRequest"></a> MaxCharactersPerRequest

Gets or sets the most characters one [ISpeechSynthesizer.SynthesizeAsync](/api/tracon.ispeechsynthesizer/#Tracon_ISpeechSynthesizer_SynthesizeAsync_Tracon_SpeechRequest_System_Threading_CancellationToken_) call
accepts. Default `5000`.

```csharp
public int MaxCharactersPerRequest { get; set; }
```

#### Property Value

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

Tracon's own guard, the same default as the built-in ElevenLabs client. It is not a Google limit:
Gemini bounds the request by tokens, not characters.

### <a id="Tracon_GoogleSpeechOptions_MaxDialogueCharactersPerRequest"></a> MaxDialogueCharactersPerRequest

Gets or sets the most characters one dialogue request carries, summed over its turns.
Default `2000`.

```csharp
public int MaxDialogueCharactersPerRequest { get; set; }
```

#### Property Value

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

Tracon's own guard, like [GoogleSpeechOptions.MaxCharactersPerRequest](/api/tracon.googlespeechoptions/#Tracon_GoogleSpeechOptions_MaxCharactersPerRequest).

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

Gets or sets the Gemini text-to-speech model, for example `gemini-3.8-flash-tts`. Required.

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

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

A request that names its own model ([SpeechRequest.ModelId](/api/tracon.speechrequest/#Tracon_SpeechRequest_ModelId)) uses that model.
The model decides the audio container: some answer a WAV file, others raw 16-bit PCM.
Tracon reads the answer's MIME type and hands the caller the same `wav` or `pcm`
whichever the model sent.

### <a id="Tracon_GoogleSpeechOptions_Name"></a> Name

Gets or sets the registration name of the synthesizer. A caller selects it with
`"provider": "gemini"` on `POST /api/voice/speak`. Default `gemini`.

```csharp
public string Name { get; set; }
```

#### Property Value

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

The name selects the registration. The tenant's egress policy and provider bindings use the
provider name `google` ([GoogleProviderNames.Google](/api/tracon.googleprovidernames/#Tracon_GoogleProviderNames_Google)), the name the chat provider
has, so one rule covers chat, images and speech.

### <a id="Tracon_GoogleSpeechOptions_UseAsDefault"></a> UseAsDefault

Gets or sets whether the registered synthesizer is also the unnamed default one. Default
[false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool).

```csharp
public bool UseAsDefault { get; set; }
```

#### Property Value

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

The unnamed default serves the `speak` tool and the live conversation. It is registered with
`TryAdd`: a default that is already there stays, so call `UseGoogleSpeech` before
`UseVoice` to make Gemini the default.

The `speak` tool sends `Tracon:Voice:SynthesisModelId` and `Tracon:Voice:OutputFormat` to
the default engine. Leave the model empty, or set it to a Gemini text-to-speech model, or Google refuses
it. The format defaults to `mp3_44100_128`, which Gemini cannot produce: set it to `wav`, or the
tool fails before any call.

Keep Gemini a named provider for the live conversation socket. A stream is raw PCM, and the shipped
conversation panel decodes whole audio files.

### <a id="Tracon_GoogleSpeechOptions_Voices"></a> Voices

Gets the voices `GET /api/voice/voices` lists for the synthesizer. Empty by default.

```csharp
public IList<VoiceDescriptor> Voices { get; }
```

#### Property Value

 [IList](https://learn.microsoft.com/dotnet/api/system.collections.generic.ilist\-1)<[VoiceDescriptor](/api/tracon.voicedescriptor/)\>

#### Remarks

A static declaration: the Gemini API has no voice list. The name of a prebuilt voice, for example
`Kore`, is the [VoiceDescriptor.VoiceId](/api/tracon.voicedescriptor/#Tracon_VoiceDescriptor_VoiceId) a request names.
