Skip to content

Latest commit

 

History

History
46 lines (36 loc) · 2.19 KB

File metadata and controls

46 lines (36 loc) · 2.19 KB

Streaming Live Demo by D-ID (tested 4/5/25)

Please consider leaving a star :)

https://youtu.be/VhSG-KOyQow image

Initial Setup:

  • (install express) open a terminal in the folder: **run this: npm install express **run this: npm install openai **run this: npm install base64

  • (add your d-id api key and openai key etc) edit the api.json file

  • image

  • Run a test to ensure yor D-id api key is set correctly by checking d-id credit balance: node test_d_id.js

  • Run a test to ensure yor Openai api key is set correctly by checking ChatGPT: node test_openai.js

  • Got issues? Cut and paste to ChatGPT etc and ask for assistance

  • Note: Both tests must woprk before proceeding or you will get frustrated

Image files

  • the idle video can be replaced with your idle video in index.html image

  • the Avatar image in streaming-client-api.js also needs to be replaced with yours on a hosted web endpoint image

OpenAI.js

  • be sure to review the model seletion for Openai in the helper file openai.js
  • image

Start the demo:

  • After testing API key set up as per above
  • Open a session in your terminal in the folder with our code run this: node app.js
  • You should see this message - server started on port localhost:3000
  • (open index.html app) in the browser add localhost:3000
  • (connect) press connect you should see the connection ready
  • (Enter Chat Text) press the start button to start streaming

Final Thoughts

  • Be patient and enjoy the puzzle if things are not working right away -- stay with it you will get it!
  • ChatGPT is your friend... share the code and any errors and ask it for help

image

image