Skip to content
Tracon

ISpeechTranscriber

Namespace Tracon · Assembly Tracon.Abstractions.dll

A provider that transcribes speech to text.

public interface ISpeechTranscriber

The contract is single-shot. The incremental resolution the live conversation layer will need should be a separate interface; adding a member here breaks consumer implementations.

DI lifetime — singleton. The unnamed default is registered as a singleton with TryAdd; a consumer’s own registration wins. More transcribers are registered by name with AddSpeechTranscriber.

Tenant behavior — TENANT-INDEPENDENT implementation, tenant-gated calls. The same rule as ISpeechSynthesizer: the instance never reads the tenant, and Tracon resolves it through the tenant’s checks, and passes the tenant’s own credential in SpeechTranscriptionOptions.Credential only when ISpeechTranscriber.SupportsTenantCredentials is true.

The provider name.

string ProviderName { get; }

string

A tenant’s egress policy and provider bindings name this value.

Gets whether the transcriber honours a tenant credential passed in SpeechTranscriptionOptions.Credential.

bool SupportsTenantCredentials { get; }

bool

The default is false: Tracon refuses a call for a tenant that has its own binding for ISpeechTranscriber.ProviderName rather than make it on the configured credential.

TranscribeAsync(Stream, string, SpeechTranscriptionOptions?, CancellationToken)

Section titled “ TranscribeAsync(Stream, string, SpeechTranscriptionOptions?, CancellationToken)”

Transcribes an audio stream to text.

ValueTask<SpeechTranscript> TranscribeAsync(Stream audio, string mediaType, SpeechTranscriptionOptions? options = null, CancellationToken cancellationToken = default)

audio Stream

The audio stream.

mediaType string

The audio’s MIME type.

options SpeechTranscriptionOptions?

The settings.

cancellationToken CancellationToken

The cancellation token.

ValueTask<SpeechTranscript>

The transcribed text.