.NET API
SpeechAudio
Tracon.Abstractions.dllGenerated audio.
public sealed class SpeechAudio- Inheritance
- object ← SpeechAudio
- Inherited Members
- object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Remarks
Section titled “Remarks”The type is not a record: since the
SpeechAudio.Data field can be large, the generated ToString/equality
comparison must not accidentally copy the entire content. The same
reason applies to AttachmentContent.
Constructors
Section titled “Constructors”SpeechAudio()
Section titled “ SpeechAudio()”public SpeechAudio()Properties
Section titled “Properties”Alignment
Section titled “ Alignment”Character-level timing, requested via SpeechRequest.IncludeTimestamps.
null when not requested, or when the provider does not support it.
public IReadOnlyList<SpeechAlignment>? Alignment { get; init; }Property Value
Section titled “Property Value”IReadOnlyList<SpeechAlignment>?
CharactersBilled
Section titled “ CharactersBilled”The billed character count.
public int? CharactersBilled { get; init; }Property Value
Section titled “Property Value”int?
The raw audio bytes.
public required ReadOnlyMemory<byte> Data { get; init; }Property Value
Section titled “Property Value”Duration
Section titled “ Duration”The audio’s duration. null if the provider does not report it.
public TimeSpan? Duration { get; init; }Property Value
Section titled “Property Value”MediaType
Section titled “ MediaType”The verified MIME type (for example, audio/mpeg).
public required string MediaType { get; init; }Property Value
Section titled “Property Value”ModelId
Section titled “ ModelId”The model that produced the audio, as the synthesizer reports it; null when the synthesizer does not report one.
public string? ModelId { get; init; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”The price is looked up under this model first, then under the model the request named. A synthesizer that reports it is priced correctly even when the caller did not name a model.
ProviderRequestId
Section titled “ ProviderRequestId”Gets the provider’s identifier for this generation, as it reports it; null when it reports none.
public string? ProviderRequestId { get; init; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”The built-in ElevenLabs client reads the request-id response header. A later
request names it to keep the speech continuous across requests
(elevenlabs.previousRequestIds).
UsageSource
Section titled “ UsageSource”Where the SpeechAudio.CharactersBilled value came from.
public SpeechUsageSource UsageSource { get; init; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”If the provider does not report the count, the text’s length is used and the value becomes SpeechUsageSource.Estimated. Showing an estimate as a measurement fabricates a price.