brainy-australia-12132
07/15/2025, 1:43 AMleft == right
failed: slice must have 10ms worth of samples
left: 12000
right: 240
note: run with RUST_BACKTRACE=1
environment variable to display a backtrace
FFI Panic: 213058 livekit ERROR livekit_ffi:cabi83livekit ffi:cabi - panic while handling request: Any { .. }
2025-07-14 213058,375 - ERROR livekit - livekit_ffi:cabi83livekit ffi:cabi - panic while handling request: Any { .. } {"session_id": "-"}
invalid request: panic while handling request
Process inference_proc:
Traceback (most recent call last):
File "C:\Users\nabdu\AppData\Local\Programs\Python\Python312\Lib\asyncio\windows_events.py", line 462, in finish_socket_func
return ov.getresult()
^^^^^^^^^^^^^^
OSError: [WinError 64] The specified network name is no longer available
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\nabdu\OneDrive\Desktop\Bytes\BytesAI\venv\Lib\site-packages\livekit\agents\utils\aio\duplex_unix.py", line 57, in aclose
await self._writer.wait_closed()
File "C:\Users\nabdu\AppData\Local\Programs\Python\Python312\Lib\asyncio\streams.py", line 364, in wait_closed
await self._protocol._get_close_waiter(self)
File "C:\Users\nabdu\AppData\Local\Programs\Python\Python312\Lib\asyncio\proactor_events.py", line 286, in _loop_reading
length = fut.result()
^^^^^^^^^^^^
File "C:\Users\nabdu\AppData\Local\Programs\Python\Python312\Lib\asyncio\windows_events.py", line 803, in _poll
value = callback(transferred, key, ov)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\nabdu\AppData\Local\Programs\Python\Python312\Lib\asyncio\windows_events.py", line 466, in finish_socket_func
raise ConnectionResetError(*exc.args)
ConnectionResetError: [WinError 64] The specified network name is no longer available
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\nabdu\AppData\Local\Programs\Python\Python312\Lib\multiprocessing\process.py", line 314, in _bootstrap
self.run()
File "C:\Users\nabdu\AppData\Local\Programs\Python\Python312\Lib\multiprocessing\process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\nabdu\OneDrive\Desktop\Bytes\BytesAI\venv\Lib\site-packages\livekit\agents\ipc\inference_proc_lazy_main.py", line 63, in proc_main
client.run()
File "C:\Users\nabdu\OneDrive\Desktop\Bytes\BytesAI\venv\Lib\site-packages\livekit\agents\ipc\proc_client.py", line 86, in run
loop.run_until_complete(self._task)
File "C:\Users\nabdu\AppData\Local\Programs\Python\Python312\Lib\asyncio\base_events.py", line 691, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "C:\Users\nabdu\OneDrive\Desktop\Bytes\BytesAI\venv\Lib\site-packages\livekit\agents\ipc\proc_client.py", line 162, in _monitor_task
await self._acch.aclose()
File "C:\Users\nabdu\OneDrive\Desktop\Bytes\BytesAI\venv\Lib\site-packages\livekit\agents\utils\aio\duplex_unix.py", line 60, in aclose
raise DuplexClosed() from e
livekit.agents.utils.aio.duplex_unix.DuplexClosedtall-airline-16756
07/15/2025, 1:43 AMtall-airline-16756
07/15/2025, 1:44 AMassertion 'slice must have 10ms worth of samples'
occurs because the audio data passed to the audio processing module does not contain exactly 10 milliseconds worth of samples.
To resolve this, ensure that every audio frame you send to process_stream
or process_reverse_stream
is exactly 10ms in duration. The required frame size is calculated as:
frame_size = (sample_rate / 100) * num_channels
• For 48kHz mono: 480
samples
• For 16kHz mono: 160
samples
• For 48kHz stereo: 960
samples
Split your audio stream into frames of this exact size before passing them to the audio processing functions. This will prevent the assertion failure and ensure correct operation of the pre-processing pipeline.
Sources: libwebrtc/src/native/audio_resampler.rs | android/src/main/java/com/livekit/reactnative/audio/processing/AudioRecordS... | livekit-android-sdk/src/main/java/io/livekit/android/audio/AudioRecordSampl... | livekit-rtc/livekit/rtc/apm.pybrainy-australia-12132
07/15/2025, 1:44 AMtall-airline-16756
07/15/2025, 1:45 AM