Skip to content
Tracon

LiveVoiceBuilderExtensions

Namespace Tracon · Assembly Tracon.Core.dll

Extensions that enable the provider-hosted live voice layer.

public static class LiveVoiceBuilderExtensions

objectLiveVoiceBuilderExtensions

object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

This call changes the hosting model. A live session binds to one server instance for as long as it lasts, so a multi-instance deployment needs sticky routing. It is therefore opt-in: without the call no live route is mapped and nothing about the application changes.

The call is independent of UseVoiceConversation. That layer has Tracon transcribe, run and synthesize; this one has the provider host the whole conversation and hand work back. They are different designs for different providers and can be enabled together or separately.

This call registers no provider. A live voice provider is enabled separately — for example UseOpenAILive(...) — and until one is, the live endpoints answer 501.

UseLiveVoice(ITraconBuilder, IConfiguration)

Section titled “ UseLiveVoice(ITraconBuilder, IConfiguration)”

Enables the live voice layer, reading its settings from configuration.

public static ITraconBuilder UseLiveVoice(this ITraconBuilder builder, IConfiguration configurationSection)

builder ITraconBuilder

The Tracon chain.

configurationSection IConfiguration

The Tracon:Voice:Live section.

ITraconBuilder

The continuation of the chain.

builder.AddTracon()
.UseOpenAI(builder.Configuration.GetSection(OpenAIProviderOptions.SectionName))
.UseOpenAILive(builder.Configuration.GetSection(OpenAILiveOptions.SectionName))
.UseLiveVoice(builder.Configuration.GetSection(VoiceLiveOptions.SectionName));

ArgumentNullException

One of the parameters is null.

Enables the live voice layer with default settings.

public static ITraconBuilder UseLiveVoice(this ITraconBuilder builder)

builder ITraconBuilder

The Tracon chain.

ITraconBuilder

The continuation of the chain.

ArgumentNullException

builder is null.

UseLiveVoice(ITraconBuilder, Action<VoiceLiveOptions>)

Section titled “ UseLiveVoice(ITraconBuilder, Action<VoiceLiveOptions>)”

Enables the live voice layer with settings given in code.

public static ITraconBuilder UseLiveVoice(this ITraconBuilder builder, Action<VoiceLiveOptions> configure)

builder ITraconBuilder

The Tracon chain.

configure Action<VoiceLiveOptions>

The settings.

ITraconBuilder

The continuation of the chain.

ArgumentNullException

One of the parameters is null.