79075274

Date: 2024-10-10 16:06:38
Score: 3
Natty:
Report link

I'm getting the same error sending the ulaw_8000 elevenlabs received audio. I'm using javascript but the error is the same. Otherwise, if I use the openai Realtime (in g711_ulaw) response It works fine.

function handleElevenLabsMessage(data, connection, streamSid) {
    if (data.audio) {
        const __filename = fileURLToPath(import.meta.url);
        const __dirname = path.dirname(__filename);

        const debugDir = path.join(__dirname, 'debug');
        if (!fs.existsSync(debugDir)) {
            fs.mkdirSync(debugDir);
        }

        const timestamp = Date.now();
        const filename = path.join(debugDir, `ulaw_audio_${timestamp}.ulaw`);
        fs.writeFileSync(filename, Buffer.from(data.audio, 'base64'));
        console.log(`Saved ulaw audio to ${filename}`);
        connection.send(JSON.stringify({
            event: 'media',
            streamSid: streamSid,
            media: {
                payload: Buffer.from(data.audio, 'base64').toString('base64')
            }
        }));
    }
}

Reasons:
  • RegEx Blacklisted phrase (1): I'm getting the same error
  • Long answer (-1):
  • Has code block (-0.5):
  • Me too answer (2.5): I'm getting the same error
  • Low reputation (1):
Posted by: Braejan David Arias Heregua