Skip to content

AudioStream raises AttributeError: '_processor' attribute not initialized in v1.0.21 #539

@ringofhealth

Description

@ringofhealth

Bug Description

livekit v1.0.21 is completely broken for audio streaming. All AudioStream instances fail
immediately with an AttributeError, making it impossible to receive or process any audio. This
affects all LiveKit agents deployed with this version.

Impact

  • Severity: Critical
  • Affected: All agents using livekit v1.0.21
  • Result: Complete audio failure - no audio can be received or processed

Error

AttributeError: 'AudioStream' object has no attribute '_processor'

Traceback (most recent call last):
  File ".../livekit/rtc/audio_stream.py", line 276, in _run
    if self._processor is not None and self._processor.enabled:
       ^^^^^^^^^^^^^^^
AttributeError: 'AudioStream' object has no attribute '_processor'

Cause

PR #533 added frame processor support but self._processor = None is missing from
AudioStream.__init__(). The attribute is accessed in _run() at line 276 before it's ever
defined, causing every audio stream to crash on startup.

Environment

  • livekit: 1.0.21
  • Python: 3.13
  • OS: Linux (Docker container)

Workaround

Pin to previous version:

livekit>=1.0.20,<1.0.21

Suggested Fix

Add self._processor = None to AudioStream.__init__().

Request

Please consider yanking v1.0.21 from PyPI or releasing an immediate patch, as this version is
unusable for any audio-based application.

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