AudioPart
class AudioPart: TaskPartAudio part representing the audio content block of a multi-modal block.
-
Initializes a new
MPPAudioPartusing in-memory audio buffer data.Declaration
Swift
convenience init(data: Data)Parameters
dataThe raw audio data bytes.
Return Value
An instance of
MPPAudioPartconfigured with in-memory data. -
Initializes a new
MPPAudioPartusing a path or resource handle.Declaration
Swift
convenience init(filePath: String)Parameters
filePathThe path or resource handle for the audio.
Return Value
An instance of
MPPAudioPartconfigured with the file path. -
Initializes a new
MPPAudioPartwith both a resource handle and transient in-memory audio data.Declaration
Swift
init(filePath: String?, data: Data?)Parameters
filePathThe optional path or resource identifier handle to persist in storage.
dataThe optional raw audio data bytes to use for in-memory embedding.
Return Value
An instance of
MPPAudioPart. -
The raw in-memory audio buffer, if initialized with data. Nil if initialized from a file path alone or deserialized from persistent storage.
Declaration
Swift
var data: Data? { get } -
The filesystem path or resource identifier handle (e.g., asset URI) for the audio. May be provided alongside in-memory
datato persist a lightweight handle while embedding from memory.Declaration
Swift
var filePath: String? { get }