LiveKit audio capture error

What do you need help with?

Question

Installation method

Unity Asset Store

Issue area

Other

Impact

Blocker - I cannot continue

Unity version

6.3

Convai Unity SDK version

4.6.1

Target platform

Meta Quest

Where does it happen?

Not tested yet

Short summary

LiveKit audio capture error in Unity: direct capture requires 10ms frames: got 1024 frames, expected 480.

What happened?

When I run my Unity project using the Convai SDK, the Console continuously shows the following LiveKit errors:
LiveKit: RtcAudioSource#1 capture callback failed: InvalidState - direct capture requires 10ms frames: got 1024 frames, expected 480
and:
LiveKit: RtcAudioSource#1 audio capture failed: InvalidState - direct capture requires 10ms frames: got 1024 frames, expected 480

The errors start when the Convai audio system initializes and keep repeating during runtime.
Could you please let me know what is causing this issue and whether it is related to Unity’s audio/DSP settings, the LiveKit plugin, or the Convai SDK?

What did you expect?

I expected the Convai character’s voice conversation and microphone/audio capture to work normally without LiveKit errors.
I would like to know the recommended fix for the 1024 frames vs. expected 480 frames mismatch.

Screenshots, recording, logs, or minimal repro

I checked the relevant documentation, resources, and similar forum posts before posting.

on

I confirm that I did not include API keys, tokens, passwords, secrets, private character data, private conversation logs, or customer data.

on

Hi Maya,

Thank you for the detailed report.

We’ve identified this as a bug in Convai Unity SDK 4.6.1.

What’s happening

Starting with 4.6.1, the LiveKit microphone sender expects audio to be provided in 10 ms chunks (480 samples), which corresponds to the 480 value shown in the error.

Currently, the SDK only splits microphone audio into 10 ms chunks when Echo Cancellation is enabled. Since Echo Cancellation is disabled by default, Unity’s standard 1,024-sample audio blocks are sent directly and rejected by the microphone sender.

While this is happening, microphone audio is not transmitted to the character, so the character cannot hear the user.

Temporary workaround

The permanent fix is currently under review and will be included in the next SDK update.

In the meantime, you can work around the issue by enabling Echo Cancellation.

From the Unity Inspector:

  1. Select the GameObject containing the ConvaiRoomManager component.
  2. Open Listening > Microphone.
  3. Enable Echo Cancellation.
  4. Enter Play Mode and test again.

If you configure the room through code instead, enable it before connecting:

TurnTakingOptions.LocalAudioPolicy.EnableAcousticEchoCancellation = true;

Android / Quest note

On Android devices, including Meta Quest, enabling Echo Cancellation also switches the device into voice-call audio mode while the microphone is active.

We’re working on a more robust fix so that the microphone audio is handled correctly regardless of whether Echo Cancellation is enabled.

The fix will be included in an upcoming SDK update.