Audio content block for messages.
Represents an audio attachment (voice messages, audio files).
Fields
url- URL to the audio file (optional if data is provided)data- Base64-encoded audio data (optional if url is provided)media_type- MIME type (e.g., "audio/mp3", "audio/ogg")duration- Duration in seconds (optional)transcript- Text transcript of the audio (optional)
Examples
Audio.new("https://example.com/voice.ogg")
Audio.new("https://example.com/voice.ogg", media_type: "audio/ogg", duration: 15)
Summary
Functions
Creates a new audio content block from base64-encoded data.
Creates a new audio content block from a URL.
Returns the Zoi schema for Audio content