This app streams a HeyGen avatar into a Microsoft Teams meeting, allowing you to send text that the avatar will speak during the call.
-
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.
-
Node.js 16+
-
Vite + React frontend
-
Azure Communication Services (ACS) Token
-
Microsoft Teams Meeting Link
-
HeyGen API Key and Avatar ID
Create a .env file with:
VITE_HEYGEN_API_KEY=
VITE_HEYGEN_AVATAR_ID=
VITE_ACS_USER_ACCESS_TOKEN=
VITE_TEAMS_MEETING_LINK=
-
Clone the repository.
-
Install dependencies:
npm install- Run the app locally:
npm run dev- Open your browser at
http://localhost:5173
-
Go to Azure Portal.
-
Create a Communication Services resource.
-
Copy your Connection String:
endpoint=https://your-resource.communication.azure.com/;accesskey=YOUR_ACCESS_KEY- Install Azure CLI:
npm install -g @azure/communication-administration- 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"
Example:
az communication identity token issue \
--scope voip \
--connection-string "endpoint=https://heygenacs.unitedstates.communication.azure.com/;accesskey=BgGt0udHfNvLAPocekQ082uSzSkLsDYVVttQsdN13cg9JfDF3VeSJQQJ99BDACULyCp6OqvWAAAAAZCSDW2Q"Azure Communication Services tokens expire after 24 hours (default).
-
Run the app locally.
-
Wait for "Avatar is joining your Teams meeting...".
-
Join the Microsoft Teams meeting using the provided link.
-
Enter a message (e.g., "Hello, how are you?") in the textbox.
-
Click Send to Avatar.
-
Watch the avatar speak your message inside the Teams meeting!
-
Note: Avatar's audio/video is streamed into Teams only, not browser.