Skip to content

Crackling Background Audio #2357

Description

@albertocubeddu

Your question

I tested the same setup using LiveKit Agent Cloud with Python, and the audio sounds perfect.

With Agents JS, though, I can clearly hear a crackling/distorted sound as soon as the call is connected when using:

BuiltinAudioClip.OFFICE_AMBIENCE

What’s confusing is that the audio file included in the package sounds perfectly clean when played directly. The crackling only appears once it’s being played inside an active agent session.

As a test, I took the same ambience file, converted it to WAV, and resampled it to 48 kHz mono:

office-ambience-48k-mono.wav

Using that version in the session, I can no longer hear the crackling.

So I’m raising this more as a question than a confirmed bug: could there be a resampling/audio-format issue in Agents JS when BuiltinAudioClip.OFFICE_AMBIENCE is played into the LiveKit session?

The 48 kHz mono WAV seems to fix it for me, but after spending about three hours listening to office ambience on repeat, I’m no longer confident I can trust my own ears 😅

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions