Giter Club home page Giter Club logo

streamingavatar's Introduction

Streaming Avatar Demo

Pre-Requisites

  • Apply for becoming a Streaming avatar whitelist user
  • Node.js and npm installed on your system.
  • API key for HeyGen's API.

Run the Demo

  1. Clone the repository.

    git clone https://github.com/HeyGen-Official/StreamingAvatar.git
    
  2. Open the index.js file and replace 'YourApiKey' with your API key:

    "apiKey": "YourApiKey";
    
  3. (optional) Open the server.js file and set your OpenAI API key to use talk mode:

    const openai = new OpenAI({
      apiKey: "<your openai api key>",
    });
    
  4. open a terminal in the folder and then install the express and run the server.js:

    npm install express
    node server.js
    
  5. you will see App is listening on port 3000!.

Use the Demo

  1. Make sure you are whitelisted to use the HeyGen's Streaming avatar API.
  2. Open the web browser and enter the http://localhost:3000to start the demo.
  3. Click the "New" button to create a new session. The status updates will be displayed on the screen.
  4. After the session is created successfully, click the "Start" button to start streaming the avatar.
  5. To send a task to the avatar, type the text in the provided input field and click the "Repeat Text" button.
  6. In order to use Talk mode, set your OpenAI key in server.js before starting the server and click "Talk" button
  7. Once done, click the "Close Connection" button to close the session.

Remember, this is a demo and should be modified according to your needs and preferences. Happy coding!

Troubleshooting

In case you face any issues while running the demo or have any questions, feel free to raise an issue in this repository or contact our support team.

Please note, if you encounter a "Server Error", it could be due to the server being offline. In such cases, please contact the service provider.

streamingavatar's People

Contributors

rui-movio avatar nbietz avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.