haoyuanchi / RealtimeAvatarDemo

Use HeyGen's RealtimeAvatar API to stream a Realtime Avatar

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Realtime Avatar Streaming Demo

Pre-Requisites

  • API key for HeyGen's API.

Setup

  1. Clone the repository.

  2. Open the JavaScript file and replace 'YourApiKey' with your API key:

    const apiKey = 'YourApiKey';

Running the Demo

  1. Open the HTML file in a web browser to start the demo.
  2. Click the "New" button to create a new session. The status updates will be displayed on the screen.
  3. After the session is created successfully, click the "Start" button to start streaming the avatar.
  4. To send a task to the avatar, type the text in the provided input field and click the "Send Task" button.
  5. 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.

About

Use HeyGen's RealtimeAvatar API to stream a Realtime Avatar


Languages

Language:JavaScript 88.6%Language:CSS 7.3%Language:HTML 4.1%