agents icon indicating copy to clipboard operation
agents copied to clipboard

AudioStreamDecoder - error decoding audio

Open zaheerabbas-prodigal opened this issue 2 months ago • 6 comments

Bug Description

I am noticing this error for the first time - so wanted to check what this error could occur from. Is this an issue from TTS' audio being incorrect format?

{"message": "error decoding audio\nTraceback (most recent call last):\n  File \"/usr/local/lib/python3.11/site-packages/livekit/agents/utils/codecs/decoder.py\", line 173, in _decode_loop\n    container = av.open(\n                ^^^^^^^^\n  File \"av/container/core.pyx\", line 418, in av.container.core.open\n  File \"av/container/core.pyx\", line 283, in av.container.core.Container.__cinit__\n  File \"av/container/core.pyx\", line 303, in av.container.core.Container.err_check\n  File \"av/error.pyx\", line 424, in av.error.err_check\nav.error.InvalidDataError: [Errno 1094995529] Invalid data found when processing input: '<none>'", "level": "ERROR", "name": "livekit.agents", "pid": 3762, "job_id": "AJ_S8XHPK6b7P2i", "timestamp": "2025-11-10T15:02:44.588072+00:00"}

Expected Behavior

No audio decode error

Reproduction Steps

Unable to reproduce - the above exception is from production logs

Operating System

k8s - docker - 3.11.11-slim

Models Used

Deepgram Nova3, Elevenlabs turbo v2.5

Package Versions

livekit==1.0.16
livekit-agents==1.2.17
livekit-api==1.0.7
livekit-blingfire==1.0.0
livekit-plugins-anthropic==1.2.17
livekit-plugins-cartesia==1.2.17
livekit-plugins-deepgram==1.2.17
livekit-plugins-elevenlabs==1.2.17
livekit-plugins-google==1.2.17
livekit-plugins-noise-cancellation==0.2.5
livekit-plugins-silero==1.2.17
livekit-plugins-turn-detector==1.2.17
livekit-protocol==1.0.4

Session/Room/Call IDs

No response

Proposed Solution

No solution - Asking a question

Additional Context

No response

Screenshots and Recordings

No response

zaheerabbas-prodigal avatar Nov 10 '25 15:11 zaheerabbas-prodigal

Hi, I am also getting this issue in 1.2.18

2025-11-10 21:01:32,303 - ERROR livekit.agents - error decoding audio Traceback (most recent call last): File ".........../env/lib/python3.12/site-packages/livekit/agents/utils/codecs/decoder.py", line 173, in _decode_loop container = av.open( ^^^^^^^^ File "av/container/core.pyx", line 417, in av.container.core.open File "av/container/core.pyx", line 282, in av.container.core.Container.cinit File "av/container/core.pyx", line 302, in av.container.core.Container.err_check File "av/error.pyx", line 424, in av.error.err_check av.error.InvalidDataError: [Errno 1094995529] Invalid data found when processing input: ''

vvv-001 avatar Nov 10 '25 20:11 vvv-001

Hello, I'm getting this issue too when I try to use Google TTS in streaming mode with the OPUS code in livekit 1.2.17. BTW anybody knows why livekit is trying to transcode from OPUS? Isn't OPUS the audio codec that livekit uses internally?

alepmalagon avatar Nov 10 '25 21:11 alepmalagon

Facing the issue again today

{"message": "error decoding audio\nTraceback (most recent call last):\n  File \"/usr/local/lib/python3.11/site-packages/livekit/agents/utils/codecs/decoder.py\", line 173, in _decode_loop\n    container = av.open(\n                ^^^^^^^^\n  File \"av/container/core.pyx\", line 418, in av.container.core.open\n  File \"av/container/core.pyx\", line 283, in av.container.core.Container.__cinit__\n  File \"av/container/core.pyx\", line 303, in av.container.core.Container.err_check\n  File \"av/error.pyx\", line 424, in av.error.err_check\nav.error.InvalidDataError: [Errno 1094995529] Invalid data found when processing input: '<none>'", "level": "ERROR", "name": "livekit.agents", "pid": 157681, "job_id": "AJ_nWzRLHPZYzfp", "timestamp": "2025-11-17T17:30:46.179456+00:00"}

cc: @longcw

zaheerabbas-prodigal avatar Nov 17 '25 17:11 zaheerabbas-prodigal

Facing the same, did someone figure it out?

Image

shivamkataria2000 avatar Nov 24 '25 15:11 shivamkataria2000

Any update here?

L65FREAD avatar Dec 19 '25 15:12 L65FREAD

I'm seeing this issue as well with Google as STT provider. Any updates here?

deanihansen avatar Dec 23 '25 14:12 deanihansen