A real-time voice chat application with avatar support built using Azure Voice Live API and WebRTC.
samples/teams-meeting-delegateconnects an existing Microsoft Foundry Voice-First Agent and avatar to a Microsoft Teams meeting through Azure Communication Services. Its extension design covers selected-user Work IQ grounding, unattended startup, and automatic meeting summaries.samples/meeting-tools-functionis an optional Azure Functions/OpenAPI tool template with customizable meeting disclosure guardrails, recaps, calendar actions, out-of-office guidance, and Teams hand controls.
- Real-time voice communication with AI agent
- Customizable avatar display
- WebRTC-based video streaming
- Voice activity detection
- Transcription support with captions
- Interactive controls (mute, pause, captions toggle)
- Configurable voice and speech settings
voicelive-webapp/
├── backend/ # Python FastAPI backend
│ ├── main.py # Main server implementation
│ ├── utils/ # Utility functions
│ └── requirements.txt # Python dependencies
├── frontend/ # React TypeScript frontend
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── utils/ # Utility functions
│ │ └── types/ # TypeScript type definitions
│ ├── package.json # Node dependencies
│ └── index.html # Entry point
- Python 3.10 or higher
- Node.js 16 or higher
- Azure subscription with Voice Live API access
- Navigate to the backend directory:
cd backend- Install Python dependencies:
pip install -r requirements.txt- Configure environment variables:
Create a
.envfile in the backend directory with:
AZURE_VOICE_LIVE_KEY=your_key_here
AZURE_VOICE_LIVE_REGION=your_region
- Start the backend server:
python main.py- Navigate to the frontend directory:
cd frontend- Install Node dependencies:
npm install- Start the development server:
npm run devThe application uses WebSocket connection to communicate with Azure Voice Live API:
- Real-time audio streaming
- Voice activity detection
- Transcription support
- WebRTC-based avatar video streaming
- Customizable avatar selection
- Synchronized audio-visual experience
- Mute/Unmute audio
- Pause/Resume conversation
- Toggle captions
- Start/End call functionality
The backend supports configuration of:
- Speech language
- Voice type and settings
- Voice activity detection parameters
- Avatar settings
Configurable features include:
- Audio input/output settings
- WebRTC configuration
- Avatar display options
- UI customization
- Backend:
- Add new routes in
main.py - Implement utility functions in
utils/ - Update configuration handling as needed
- Frontend:
- Create new components in
components/ - Add utility functions in
utils/ - Update TypeScript types in
types/
The application uses WebRTC for avatar video streaming:
- Peer connection setup
- ICE server configuration
- SDP offer/answer exchange
- Video stream handling
Common issues and solutions:
- WebSocket Connection:
- Verify Azure credentials
- Check network connectivity
- Ensure backend is running
- Avatar Display:
- Verify WebRTC configuration
- Check browser compatibility
- Ensure proper ICE server setup
- Audio Issues:
- Check microphone permissions
- Verify audio device selection
- Check audio stream configuration
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.