### Install Dependencies and Run Server Source: https://github.com/heygen-official/streamingavatar/blob/main/README.md Install the necessary Node.js dependencies (like Express) and then start the demo server. The server will listen on port 3000. ```Shell npm install express node server.js ``` -------------------------------- ### Clone Streaming Avatar Repository Source: https://github.com/heygen-official/streamingavatar/blob/main/README.md Instructions to clone the HeyGen Streaming Avatar GitHub repository to your local machine, which contains the demo application. ```Shell git clone https://github.com/HeyGen-Official/StreamingAvatar.git ``` -------------------------------- ### Configure HeyGen API Key in index.js Source: https://github.com/heygen-official/streamingavatar/blob/main/README.md Update the `index.js` file with your HeyGen API Key or Trial Token. This key is essential for the demo to connect to the HeyGen Streaming API. ```JavaScript "apiKey": "YourApiKey"; ``` -------------------------------- ### Configure OpenAI API Key for Talk Mode Source: https://github.com/heygen-official/streamingavatar/blob/main/README.md Optionally set your OpenAI API key in the `server.js` file to enable the 'Talk' mode feature, allowing the avatar to respond using OpenAI's models. ```JavaScript const openai = new OpenAI({ apiKey: "", }); ``` -------------------------------- ### API Reference: List Voices v2 Endpoint Source: https://github.com/heygen-official/streamingavatar/blob/main/README.md Reference to the HeyGen API endpoint for listing available AI voices. This endpoint helps you find Voice IDs compatible with the Streaming API. ```APIDOC Endpoint: https://docs.heygen.com/reference/list-voices-v2 Purpose: Retrieve IDs for AI Voices compatible with the Streaming API. ``` -------------------------------- ### API Reference: List Sessions Endpoint Source: https://github.com/heygen-official/streamingavatar/blob/main/README.md Reference to the HeyGen API endpoint for checking the number of active streaming sessions. Useful for monitoring concurrent session limits. ```APIDOC Endpoint: https://docs.heygen.com/reference/list-sessions Purpose: Check the number of active streaming sessions. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.