Discussions

Ask a Question
Back to All

Fail in Stream Clips

Hi Team,

Everything was working well, but now we have an issue with the stream API when using Elevenlabs, Amazon or Afflorithmics.

The following request works:

        const playResponse = await fetch(`${DID_API.url}/${DID_API.service}/streams/${streamId}`, {
            method: 'POST',
            headers: {
                Authorization: `Basic ${DID_API.key}`,
                'Content-Type': 'application/json',
            },
            body: JSON.stringify({
                script: {
                    type: 'text',
                    provider: {
                        "type": "microsoft",
                        "voice_id": "en-US-JennyNeural"
                    },
                    ssml: false,
                    input: text
                },
                session_id: sessionId,
            }),
        });

The below request fails - the only difference is the Audio voice provider.

        const playResponse = await fetch(`${DID_API.url}/${DID_API.service}/streams/${streamId}`, {
            method: 'POST',
            headers: {
                Authorization: `Basic ${DID_API.key}`,
                'Content-Type': 'application/json',
            },
            body: JSON.stringify({
                script: {
                    type: 'text',
                    provider: {
                        "type": "elevenlabs",
                        "voice_id": "21m00Tcm4TlvDq8ikWAM"
                    },
                    ssml: false,
                    input: text
                },
                session_id: sessionId,
            }),
        });

Please provide a patch quickly.