Discussions
Doing a RAG featuring a set of French lessons with Chat roleplay - Will Share 12/10/23
I have a really cool "Proof of Concept" app to help you learn French I did with new bilingual MS voices. Its RAG model with Langchain and ChatGPT featuring French lessons. You can do some neat Chat roleplay with the Avatar teacher etc. Code is done and its ready for me to do the Video. I'll do that tomorrow and I will share the code and the Video links here on D-ID for reference.
![](https://files.readme.io/91170f0-image.png)
[block:image]
{
"images": [
{
"image": [
"https://files.readme.io/3b3fd55-image.png",
null,
null
],
"align": "center",
"border": true
}
]
}
[/block]
Posted by mccormackjim3 10 months ago
How to choose image and voice for streams api
Hi, I'm doing some tests using your streams api, I would like to change the example face and voice, how can I choose an image to animate and the voice of the playing audio? Is there a list to choose from?
Thanks in advance.
Posted by it 11 months ago
Customer Service Agents with D_ID --- Video for Community
D-ID community members - sharing a video on how to use D-ID with ChatGPT and Langchain to build Customer Service Agents to let your clients do Q&A with your FAQ docs off your support pages:
Here you go (Code included):
<https://youtu.be/KhYjGOzMcFw?si=tlHVSxFZk7Z91FxN>
![](https://files.readme.io/de08154-image.png)
Posted by mccormackjim3 11 months ago
Can we Talk? D-id streaming with Local Llama2
This software just keeps impressing me... So innovative and so much fun to creat with... Love the new credit model. This video has long format responses... used 9 credits to make this. I cannot wait to try a roleplay with this and some multi-language chats.
Here you go ---code freely shared on GitHub via link in the show notes of the video. Please star the repo if you use it. If you're not subscribed to the YouTube channel please consider it as does not cost a thing and helps me reach the community.
<https://www.youtube.com/watch?v=YtLgVdyFN_I&t=165s>
![](https://files.readme.io/93f48fc-image.png)
![](https://files.readme.io/82c0c37-image.png)
Posted by mccormackjim3 11 months ago
About real-time avatar API
Does the real-time avatar API support multiple sessions?
Or is there only one session for one API key?
Posted by Cody 12 months ago
My own avatar chat bot
Hello,
I am interested in creating my own AI avatar with my voice. My goal is to instruct the chatbot about my personal information, provide it with a backstory, and ensure that it can answer questions about me and my life.
Could you please confirm whether this is achievable using your D-ID tools? I am considering purchasing the premium package to begin constructing my AI chatbot and deploy it on my website using your API
Thank you.
Chris
Posted by creativedesign.eshop 12 months ago
Capture the event when video stops during the stream.
Hello, I'm facing an issue with streaming where I need to capture the event when a video stops playing in order to hide and reveal the video for the user on front-end. How can I achieve this?
Posted by diana 12 months ago
Is your server not working or am i doing something wrong? 502 Bad Gateway
Hi im trying to upload an audio file from elevenlabs (because you dont support the new v2 multilingual model for other languages) and then send it with the talk stream (the stream is active and connected) but i always get an 502 - Bad Gateway error, here is the error:
```
(node:15216) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
talk status response: Response {
[Symbol(realm)]: null,
[Symbol(state)]: {
aborted: false,
rangeRequested: false,
timingAllowPassed: true,
requestIncludesCredentials: true,
type: 'default',
status: 502,
timingInfo: {
startTime: 4666.184200048447,
redirectStartTime: 0,
redirectEndTime: 0,
postRedirectStartTime: 4666.184200048447,
finalServiceWorkerStartTime: 0,
finalNetworkResponseStartTime: 0,
finalNetworkRequestStartTime: 0,
endTime: 0,
encodedBodySize: 36,
decodedBodySize: 36,
finalConnectionTimingInfo: null
},
cacheState: '',
statusText: 'Bad Gateway',
headersList: HeadersList {
[Symbol(headers map)]: [Map],
[Symbol(headers map sorted)]: null
},
urlList: [ [URL] ],
body: { stream: undefined }
},
[Symbol(headers)]: HeadersList {
[Symbol(headers map)]: Map(8) {
'date' => 'Sun, 29 Oct 2023 13:29:29 GMT',
'content-type' => 'application/json',
'content-length' => '36',
'connection' => 'keep-alive',
'x-amzn-requestid' => '14ccad85-0271-4925-b1e0-655e1e393d0b',
'x-amzn-errortype' => 'InternalServerErrorException',
'x-amz-apigw-id' => 'NkOpGGNevHcEqsg=',
'x-amzn-trace-id' => 'Root=1-653e5e39-6cc763730644319b5e6f6d8f'
},
[Symbol(headers map sorted)]: null
}
}
```
I tried then to use your audio upload from the api reference and there surprisendly i get an success, but still i used that audio_url i got and send it with the talk Stream and still get an 502 - Bad Gateway. Wierdly before it was a 400 - bad Request but with the same code from your doc. Here is the api request code:
```
console.log(req.file)
const audioFile = req.file
const { streamId, sessionId, message } = req.body
const formData = new FormData()
formData.append('source_url', audioFile.path)
formData.append('audio', createReadStream(audioFile.path))
try {
const audioUpload = await fetch('https://api.d-id.com/audios', {
method: 'POST',
headers: {
Authorization: `Basic ${process.env.DID_API_KEY}`,
// accept: 'application/json',
// 'Content-Type': 'multipart/form-data'
},
body: formData,
})
console.log(audioUpload)
const uploadJSON = await audioUpload.json()
const talkResponse = await fetchWithRetries(`${process.env.DID_URL}/talks/streams/${streamId}`, {
method: 'POST',
headers: {
Authorization: `Basic ${process.env.DID_API_KEY}`,
accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({
script: {
type: 'audio',
// audio_url: 'https://d-id-public-bucket.s3.us-west-2.amazonaws.com/webrtc.mp3',
audio_url: uploadJSON.url
// audio_url: "s3://d-id-audios-prod/auth0|653563f5966d0e4e974a038f/KXe7fZQKkoxXO-bdOj9Fo/elevenLabsAudio.wav",
},
config: {
stitch: true,
},
// session_id: sessionId,
}),
});
console.log('talk status response: ', talkResponse)
} catch (error) {
console.log(error)
res.status(500).json({output: 'An Error appeared on talkToStream Route.', error: error})
}
};
```
The Audio should not be the problem because it worked on your site. I tried to use normal node fetch and your api, to talk to the stream but still same result.
I noticed when i wanted to use your api for audio upload (api.uploadAnAudio()) i get an error that this doesnt exist on the api. Just wanted to mention that.
I tried to use your talk to Stream api reference on the page but even there i get an 502 Bad gateway. But there i couldnt remove the provider in the script object, so i dont know if that was a reason.
I hope you can help me.
Posted by dueltmp+infrm 12 months ago