WebSocket disconnects on audio stream start in AppFoundry Cognigy bot

The Genesys Cloud AppFoundry WebSocket connection drops immediately after the audio stream handshake with NICE Cognigy. I’m using the standard genesys-cloud-websocket client in a Node.js wrapper. The connection establishes fine for text, but as soon as the media event fires and I try to pipe the audio buffer, the socket closes with code 1006.

client.on('error', (err) => console.error('WS Error:', err));
client.on('close', (code, reason) => console.log('Closed:', code, reason.toString()));
// Output: Closed: 1006 

The server logs show no explicit rejection. It feels like the audio payload size or format is triggering a silent drop on the platform side. Is there a specific header or buffer chunk size requirement for Cognigy audio streams that isn’t in the docs?

1 Like