Sometimes before I start the conversation I am getting the “Failed to initialize the audio filter it will not be enabled for this session”. There is no more info related to it. Could you please give me any information as to why is this error being thrown and in what situations and how to debug and solve this.
Hi, how do you reproduce this? Is this related to your Avatar changes? Request for reviewer
It looks like the it’s coming from low level audio processing (at least that’s the only place I can see that erro): rust-sdks/livekit-ffi/src/server/audio_stream.rs at main · livekit/rust-sdks · GitHub
I can’t seem to reproduce this intentionally but this keeps happening been seeing this in our cloud logs, I found this link that others are reporting as well
opened 11:26AM - 23 Dec 25 UTC
bug
### Bug Description
## Description
When using the `livekit-plugins-noise-can… cellation` plugin with LiveKit Cloud, the audio filter fails to initialize with the following error:
livekit_ffi::server::audio_stream:123:livekit_ffi::server::audio_stream - failed to initialize the audio filter. it will not be enabled for
this session.
The agent continues to work, but without noise cancellation enabled.
## Environment
- **livekit-agents version**: 1.3.6
- **livekit-plugins-noise-cancellation version**: 0.2.5
- **Python version**: 3.13.5
- **Platform**: Linux (running in Kubernetes)
- **LiveKit Cloud URL**: `wss://zowie-prod-eu1-mm21kqtw.livekit.cloud` (EU region)
## Configuration
Using `noise_cancellation.BVC()` for WebRTC calls and `noise_cancellation.BVCTelephony()` for SIP calls:
Actual behavior
The audio filter fails to initialize silently. Session works, but I assume the session continues without noise cancellation.
Questions
1. What are the prerequisites for the audio filter to initialize successfully?
2. Is there additional debug logging available to diagnose the root cause?
3. Are there any known issues with running noise cancellation in containerized environments (Kubernetes)?
4. Does the FFI library require outbound network access to specific endpoints for license validation?
Logs
{
"level": "ERROR",
"logger_name": "livekit",
"message": "livekit_ffi::server::audio_stream:123:livekit_ffi::server::audio_stream - failed to initialize the audio filter. it will not be
enabled for this session.",
"path": "/app/.venv/lib/python3.13/site-packages/livekit/rtc/_ffi_client.py",
"func_name": "ffi_event_callback",
"line": 167
}
### Expected Behavior
The audio filter should initialize successfully and noise cancellation should be applied to the audio stream.
No error log, noise cancellation enabled.
### Reproduction Steps
```python
from livekit.plugins import noise_cancellation
from livekit.agents.voice.room_io import RoomInputOptions
noise_cancellation_impl = noise_cancellation.BVC() # or BVCTelephony()
room_input_options = RoomInputOptions(
noise_cancellation=noise_cancellation_impl,
audio_sample_rate=16000
)
await session.start(
room_input_options=room_input_options,
agent=agent,
room=ctx.room,
)
```
### Operating System
K8S, docker image: python:3.13.5-slim
### Models Used
_No response_
### Package Versions
```bash
livekit-agents version: 1.3.6
livekit-plugins-noise-cancellation: 0.2.5
```
### Session/Room/Call IDs
SessionID: RM_34euJScLGWzF
### Proposed Solution
```python
```
### Additional Context
- LiveKit Cloud plan includes noise cancellation
- Running inside a Kubernetes cluster
- The agent connects to rooms and handles audio successfully otherwise
- The error provides no additional details about why initialization failed
### Screenshots and Recordings
_No response_
I will go through the link you shared
Are you self-hosting your agents? Or hosting your agents in LiveKit cloud? I’m just curious since that PR’s environment is self-hosted agents.
i believe it’s in livekit cloud
OK, thanks for the report, I will investigate.
I was unable to reproduce this. Looking at your account, I believe you are self-hosting your agent (you also have an agent in the account create by Agent builder, but I assume you are testing with your other agent). That tracks with all the other (occasional) reports I can find and verify, everyone seems to be using self-hosted agents.
It’s difficult to narrow it down further without more concrete reproduction steps, if you find anything more reproducible I would be grateful