.NET API
ILiveVoiceProvider
Tracon.Abstractions.dllCreates and supervises a provider-hosted live voice session.
public interface ILiveVoiceProviderRemarks
Section titled “Remarks”A live session is not the conversation layer behind
UseVoiceConversation. There, Tracon receives the audio, transcribes
it, runs the agent and synthesizes the answer. Here the provider hosts the whole
conversation and carries the media directly to the media peer; Tracon stands
in two places only: it creates the session, so tenancy, role and
concurrency gates apply and the raw API key never reaches the browser, and it
attaches a server-side control connection, so the work the model
delegates becomes an ordinary Tracon run.
Lifetime: registered singleton. One instance serves every
session in the process, so an implementation must be thread-safe and must hold no
per-session state of its own — ILiveVoiceSideband is where a
session’s state lives.
Tenant: tenant-independent, like
ISpeechSynthesizer. The caller has already resolved and gated the
tenant before a session is created; the provider neither reads nor enforces one,
and must not key any cache or credential by tenant.
Delivery: best-effort. Creating a session and attaching to
it are ordinary network calls with no retry and no idempotency key: a failure is
surfaced to the caller, never retried silently, because a retried create is a
second billed session.
Properties
Section titled “Properties”MaxAppendCharacters
Section titled “ MaxAppendCharacters”Gets the largest number of characters a single ILiveVoiceSideband.AppendAsync may carry.
int MaxAppendCharacters { get; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”The ceiling is in characters, not tokens: Tracon ships no tokenizer and must not take one on (AOT, and no new package). An implementation whose provider states the limit in tokens converts it once, conservatively, and documents the ratio in a single place.
ModelId
Section titled “ ModelId”Gets the model identifier written to the session record.
string ModelId { get; }Property Value
Section titled “Property Value”ProviderName
Section titled “ ProviderName”Gets the provider name written to the session record, e.g. openai.
string ProviderName { get; }Property Value
Section titled “Property Value”Methods
Section titled “Methods”AttachAsync(string, CancellationToken)
Section titled “ AttachAsync(string, CancellationToken)”Opens a server-side control connection to an existing session.
ValueTask<ILiveVoiceSideband> AttachAsync(string providerSessionId, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”providerSessionId string
The identifier returned by ILiveVoiceProvider.CreateSessionAsync.
cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”The sideband connection.
Remarks
Section titled “Remarks”The connection carries no primary audio: WebRTC or SIP carries that. Both connections share one session.
CreateSessionAsync(LiveVoiceCreateRequest, CancellationToken)
Section titled “ CreateSessionAsync(LiveVoiceCreateRequest, CancellationToken)”Relays the media peer’s SDP offer and creates the session.
ValueTask<LiveVoiceSessionHandle> CreateSessionAsync(LiveVoiceCreateRequest request, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”request LiveVoiceCreateRequest
The offer and the session settings.
cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”ValueTask<LiveVoiceSessionHandle>
The provider’s session identifier and its SDP answer.