Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Elevenlabs Elevenlabs python AudioOutputMulti

From Leeroopedia
Field Value
source Elevenlabs_Elevenlabs_python
domains Audio, Streaming, Text-to-Speech
last_updated 2026-02-15

Overview

Description

AudioOutputMulti is a Pydantic model representing a server payload containing an audio chunk for a specific context. It carries base64-encoded audio data along with optional alignment information (both raw and normalized) and a context identifier. This model supports multi-context audio streaming where different audio chunks may belong to different conversational contexts. This model is auto-generated by Fern from the ElevenLabs API definition and extends UncheckedBaseModel.

Usage

This model is received as part of streaming audio responses when using multi-context audio generation in the ElevenLabs API. Each instance represents a single audio chunk that can be decoded and played back, with optional alignment data for synchronization purposes.

Code Reference

Source Location

src/elevenlabs/types/audio_output_multi.py

Class Signature

class AudioOutputMulti(UncheckedBaseModel):
    """
    Server payload containing an audio chunk for a specific context.
    """
    ...

Import Statement

from elevenlabs.types import AudioOutputMulti

I/O Contract

Field Type Required Description
audio str Yes Base64 encoded audio chunk.
normalized_alignment Optional[NormalizedAlignment] No Normalized alignment data for the audio chunk. Serialized with alias normalizedAlignment.
alignment Optional[Alignment] No Alignment data for the audio chunk.
context_id Optional[str] No The contextId for which this audio is. Serialized with alias contextId.

Usage Examples

from elevenlabs.types import AudioOutputMulti
import base64

# Typically received as part of a streaming response
audio_chunk = AudioOutputMulti(
    audio="SGVsbG8gV29ybGQ=",  # base64 encoded audio data
    context_id="ctx_12345",
)

# Decode the audio data
raw_audio = base64.b64decode(audio_chunk.audio)

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment