Skip to content

ElevenLabs TTS: chunk_length_schedule not forwarded in multi-context websocket init #5007

@IanSteno

Description

@IanSteno

Bug summary

chunk_length_schedule is accepted by the ElevenLabs TTS plugin constructor/options, but in the multi-context websocket path it is not forwarded in the init packet (generation_config.chunk_length_schedule).

This makes the setting effectively a no-op for current releases using the multi-context websocket flow.

Affected area

  • livekit-plugins-elevenlabs
  • livekit/plugins/elevenlabs/tts.py

Repro/observations

  • Pre-regression behavior (tag livekit-agents@1.2.6) sends:
    • init_pkt["generation_config"]["chunk_length_schedule"]
  • Current behavior (tag livekit-agents@1.4.3) accepts chunk_length_schedule, but websocket init only sends:
    • text, voice_settings, context_id (plus optional pronunciation dictionaries)
    • no generation_config

Why this is a bug

The plugin API and docs expose chunk_length_schedule, but it is not propagated to the backend request path where it should apply.

Proposed fix

Tracked in PR:

That PR:

  • restores generation_config.chunk_length_schedule in multi-context websocket init packets
  • includes tests for packet composition
  • aligns default auto_mode behavior when an explicit chunk_length_schedule is provided

Additional context

This appears to have regressed during the migration to multi-context websocket handling.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions