Skip to content
Tracon

ILiveVoiceSideband

Namespace Tracon · Assembly Tracon.Abstractions.dll

The server-side control connection of a live voice session.

public interface ILiveVoiceSideband : IAsyncDisposable

IAsyncDisposable

Lifetime: never resolved from dependency injection, so neither singleton, scoped nor transient describes it. One instance belongs to one session, is produced by ILiveVoiceProvider.AttachAsync, and is disposed when that session ends. ILiveVoiceSideband.AppendAsync may be called concurrently by several delegations, so an implementation serializes its writes; ILiveVoiceSideband.ReceiveAsync is consumed by a single pump.

Tenant: tenant-independent. The connection carries no tenant of its own — the caller establishes the session’s tenant before the first event is handled, and every run the delegations produce inherits it from there.

Delivery: best-effort in both directions. An append that the provider refuses is reported, not retried, because a retried append can make the model say the same sentence twice; and the event stream ends when the socket does, with no replay of what was missed.

There is deliberately no InterruptAsync: the provider surface offers no way for the sideband to stop the model mid-sentence. Should one appear, it is added as a new LiveVoiceAppendChannel value rather than as a new interface member, so the record and the enum grow while the interface does not.

AppendAsync(LiveVoiceAppend, CancellationToken)

Section titled “ AppendAsync(LiveVoiceAppend, CancellationToken)”

Sends text into the live conversation’s context.

ValueTask AppendAsync(LiveVoiceAppend append, CancellationToken cancellationToken = default)

append LiveVoiceAppend

The channel, the delegation and the text.

cancellationToken CancellationToken

The cancellation token.

ValueTask

The completion task.

Reads the session’s events until the session closes.

IAsyncEnumerable<LiveVoiceEvent> ReceiveAsync(CancellationToken cancellationToken = default)

cancellationToken CancellationToken

The cancellation token.

IAsyncEnumerable<LiveVoiceEvent>

The event stream.