TtsAudioChunk
public struct TtsAudioChunk : Sendable, EquatableIncremental mono PCM audio chunk emitted by TextToSpeech.synthesizeStream and TtsStream.readNext (also available as AudioChunk).
-
Normalized 32-bit floating-point mono PCM samples in [-1.0, 1.0].
Declaration
Swift
public var samples: [Float] -
Audio sample rate in Hz.
Declaration
Swift
public var sampleRateHz: Int -
Zero-based monotonic index of this chunk within the stream.
Declaration
Swift
public var chunkIndex: Int -
True if this is the final chunk of the synthesis stream.
Declaration
Swift
public var isFinal: Bool -
Word-level timing alignments for this chunk.
Declaration
Swift
public var wordTimestamps: [TtsWordTimestamp] -
Duration of this chunk in seconds.
Declaration
Swift
public var durationSeconds: Float { get }