Skip to content
saifelancePublic

About

Resources

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

Avatar Teams Integration App

This app streams a HeyGen avatar into a Microsoft Teams meeting, allowing you to send text that the avatar will speak during the call.

Features

  • Connects to a HeyGen Avatar session.

  • Streams live avatar video into a Microsoft Teams Meeting using Azure Communication Services (ACS).

  • Allows user to send text to avatar, and avatar speaks it inside Teams meeting.

  • Auto-refreshes HeyGen session every 8 minutes to avoid expiration.

  • Responsive and user-friendly UI.

Requirements

  • Node.js 16+

  • Vite + React frontend

  • Azure Communication Services (ACS) Token

  • Microsoft Teams Meeting Link

  • HeyGen API Key and Avatar ID

Environment Variables (Vite)

Create a .env file with:

VITE_HEYGEN_API_KEY=
VITE_HEYGEN_AVATAR_ID=
VITE_ACS_USER_ACCESS_TOKEN=
VITE_TEAMS_MEETING_LINK=

Setup Instructions

  1. Clone the repository.

  2. Install dependencies:

npm install
  1. Run the app locally:
npm run dev
  1. Open your browser at http://localhost:5173

How to Set Up Azure Communication Services (ACS)

  1. Go to Azure Portal.

  2. Create a Communication Services resource.

  3. Copy your Connection String:

endpoint=https://your-resource.communication.azure.com/;accesskey=YOUR_ACCESS_KEY
  1. Install Azure CLI:
npm install -g @azure/communication-administration
  1. Issue a User Access Token:
az communication identity token issue \
  --scope voip \
  --connection-string "endpoint=https://your-resource.communication.azure.com/;accesskey=YOUR_ACCESS_KEY"
Screenshot 2025-04-28 at 2 24 19 PM

Example:

az communication identity token issue \
  --scope voip \
  --connection-string "endpoint=https://heygenacs.unitedstates.communication.azure.com/;accesskey=BgGt0udHfNvLAPocekQ082uSzSkLsDYVVttQsdN13cg9JfDF3VeSJQQJ99BDACULyCp6OqvWAAAAAZCSDW2Q"

⚠️ Attention:

Azure Communication Services tokens expire after 24 hours (default).

How to Test the App

  1. Run the app locally.

  2. Wait for "Avatar is joining your Teams meeting...".

  3. Join the Microsoft Teams meeting using the provided link.

  4. Enter a message (e.g., "Hello, how are you?") in the textbox.

  5. Click Send to Avatar.

  6. Watch the avatar speak your message inside the Teams meeting!

  7. Note: Avatar's audio/video is streamed into Teams only, not browser.

About

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages