-
(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 -
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
-
the idle video can be replaced with your idle video in index.html
-
the Avatar image in streaming-client-api.js also needs to be replaced with yours on a hosted web endpoint
- 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
- 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