Sending Structured Data during a call
Hi guys, I need a way for data that is captured to be sent to make as it is recieved and not at the end of a call. Is it possible to do that?
Thanks
Thanks
"wss://your-listenUrl/transport" with your actual listenUrl. ⤵️ Mention @Vapi Support Bot for follow-ups 🐥
"wss://your-listenUrl/transport"const WebSocket = require('ws');
let pcmBuffer = Buffer.alloc(0);
const ws = new WebSocket("wss://your-listenUrl/transport");
ws.on('message', (data, isBinary) => {
if (isBinary) {
pcmBuffer = Buffer.concat([pcmBuffer, data]);
// Process or forward the audio data here in real-time
}
});