Skip to content

SpeechAudio

Namespace AgentPrism · Assembly AgentPrism.Abstractions.dll

Generated audio.

public sealed class SpeechAudio

objectSpeechAudio

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

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.

public SpeechAudio()

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; }

IReadOnlyList<SpeechAlignment>?

The billed character count.

public int? CharactersBilled { get; init; }

int?

The raw audio bytes.

public required ReadOnlyMemory<byte> Data { get; init; }

ReadOnlyMemory<byte>

The audio’s duration. null if the provider does not report it.

public TimeSpan? Duration { get; init; }

TimeSpan?

The verified MIME type (for example, audio/mpeg).

public required string MediaType { get; init; }

string

Where the SpeechAudio.CharactersBilled value came from.

public SpeechUsageSource UsageSource { get; init; }

SpeechUsageSource

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.