Discussions
how can i integrate amazon polly to streaming talks, can you give me a sample call?
26 days ago by alonso.castro
I need a sample call, so far I hace this const url = 'https://api.d-id.com/talks/streams/id';
const options = {
method: 'POST',
headers: {
accept: 'application/json',
'x-api-key-external': JSON.stringify({ "amazon": "YOUR_AMAZON_POLLY_API_KEY" }), // Amazon Polly key
'content-type': 'application/json',
authorization: 'Basic YOUR_DID_API_KEY'
},
body: JSON.stringify({
script: {
type: 'text',
provider: {
type: 'amazon', // Changed provider to Amazon Polly
voice_id: 'Joanna' // Example Amazon Polly voice
},
ssml: false
},
config: {
fluent: false,
pad_audio: 0.0
},
audio_optimization: '2',
session_id: 'YOUR_SESSION_ID'
})
};