Summary
Passing NoiseCancellation() from @livekit/noise-cancellation-node as inputOptions.noiseCancellation hard-crashes the agent job process on macOS arm64 immediately after room connection, with an uncaught native (C++) exception. Nothing surfaces to JS, so the failure can't be caught or degraded gracefully — the process aborts and the live call drops to dead air.
Environment
@livekit/noise-cancellation-node 0.1.10
@livekit/agents 1.5.0, @livekit/rtc-node 0.13.30
- Node v24.11.1, macOS 15.4.1 (arm64, M-series), worker running locally in dev mode against a LiveKit Cloud project
- Telephony agent: SIP participant (Twilio inbound trunk),
AgentSession with LiveKit Inference STT/LLM + ElevenLabs TTS
Reproduction
import { NoiseCancellation } from '@livekit/noise-cancellation-node';
await session.start({
agent,
room,
inputOptions: {
audioEnabled: true,
participantIdentity,
noiseCancellation: NoiseCancellation(),
},
});
Dial in via SIP. The job process dies right after the room connects, before the agent speaks:
[21:05:55.767] DEBUG (54972): connection state changed
state: 1
Nc::~Nc: Exception caught while destroying the session
libc++abi: terminating due to uncaught exception of type std::runtime_error
The job runner then logs Room disconnected while waiting for participant when the next job starts. Reproduced deterministically on 2/2 inbound PSTN calls; removing the noiseCancellation option fully resolves it.
The log line order suggests the NC session fails during init, and the error is then re-thrown from the Nc destructor during cleanup, which terminates the process.
Expected behavior
- If macOS arm64 isn't a supported platform for this package, a load-time error would be much kinder than a mid-call process abort — the npm package installs cleanly, so there's no signal until a live call dies.
- Regardless of platform support: NC init failures should surface as a JS error (ideally with audio passed through unfiltered) instead of an uncatchable native terminate. A crashed agent process takes the live call down with it.
Happy to provide a full debug log or test a patched build.
Summary
Passing
NoiseCancellation()from@livekit/noise-cancellation-nodeasinputOptions.noiseCancellationhard-crashes the agent job process on macOS arm64 immediately after room connection, with an uncaught native (C++) exception. Nothing surfaces to JS, so the failure can't be caught or degraded gracefully — the process aborts and the live call drops to dead air.Environment
@livekit/noise-cancellation-node0.1.10@livekit/agents1.5.0,@livekit/rtc-node0.13.30AgentSessionwith LiveKit Inference STT/LLM + ElevenLabs TTSReproduction
Dial in via SIP. The job process dies right after the room connects, before the agent speaks:
The job runner then logs
Room disconnected while waiting for participantwhen the next job starts. Reproduced deterministically on 2/2 inbound PSTN calls; removing thenoiseCancellationoption fully resolves it.The log line order suggests the NC session fails during init, and the error is then re-thrown from the
Ncdestructor during cleanup, which terminates the process.Expected behavior
Happy to provide a full debug log or test a patched build.