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 SessionStartedPayloadConfig

From Leeroopedia
Field Value
source Elevenlabs_Elevenlabs_python
domains Speech-to-Text, Transcription, Session Configuration
last_updated 2026-02-15

Overview

Description

SessionStartedPayloadConfig is a Pydantic model representing the configuration for a transcription session. It defines audio input parameters (sample rate, format), language settings, voice activity detection (VAD) thresholds, transcription model selection, commit strategy, logging, and output options such as timestamps and language detection. This model is auto-generated by Fern from the ElevenLabs API definition and extends UncheckedBaseModel.

Usage

This model is received as part of the session-started event payload in the ElevenLabs speech-to-text streaming API. It reflects the configuration that was applied when a transcription session was initiated, allowing the client to confirm the active settings for the session.

Code Reference

Source Location

src/elevenlabs/types/session_started_payload_config.py

Class Signature

class SessionStartedPayloadConfig(UncheckedBaseModel):
    """
    Configuration for the transcription session.
    """
    ...

Import Statement

from elevenlabs.types import SessionStartedPayloadConfig

I/O Contract

Field Type Required Description
sample_rate Optional[int] No Sample rate of the audio in Hz.
audio_format Optional[AudioFormatEnum] No The audio format of the input audio.
language_code Optional[str] No Language code in ISO 639-1 or ISO 639-3 format.
commit_strategy Optional[SessionStartedPayloadConfigCommitStrategy] No Strategy for committing transcriptions.
vad_silence_threshold_secs Optional[float] No Silence threshold in seconds.
vad_threshold Optional[float] No Threshold for voice activity detection.
min_speech_duration_ms Optional[int] No Minimum speech duration in milliseconds.
min_silence_duration_ms Optional[int] No Minimum silence duration in milliseconds.
model_id Optional[str] No ID of the model to use for transcription.
enable_logging Optional[bool] No When set to false, zero retention mode will be used for the request. Zero retention mode may only be used by enterprise customers.
include_timestamps Optional[bool] No Whether the session will include word-level timestamps in the committed transcript.
include_language_detection Optional[bool] No Whether the session will include language detection in the committed transcript.

Usage Examples

from elevenlabs.types import SessionStartedPayloadConfig

# Typically received as part of a session-started event
config = SessionStartedPayloadConfig(
    sample_rate=16000,
    language_code="en",
    model_id="scribe_v1",
    include_timestamps=True,
    include_language_detection=True,
    vad_silence_threshold_secs=0.5,
    vad_threshold=0.5,
)

# Check if timestamps are enabled
if config.include_timestamps:
    print("Word-level timestamps will be included.")

Related Pages

Page Connections

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