Overview
The Pipecat AgentHuman integration provides a plug-and-play transport layer for adding realistic talking avatars to your voice AI pipelines. Simply configure your avatar and API key - the plugin handles all WebSocket communication, audio formatting, and session management automatically. Perfect for:- Voice AI applications
- Conversational agents
- Real-time speech synthesis
- Interactive AI assistants
Installation
Quick Start
- ✅ Session creation and management
- ✅ WebSocket connection and authentication
- ✅ Audio format conversion (to 16-bit mono PCM)
- ✅ Room configuration and avatar joining
- ✅ Error handling and reconnection
Configuration Options
AgentHumanTransport Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
api_key | string | Yes | Your AgentHuman API key |
avatar_id | string | Yes | Avatar ID to use |
room_url | string | Yes | Daily or LiveKit room URL |
room_token | string | Yes | Room authentication token |
room_platform | string | No | Room platform: 'daily' or 'livekit' (default: 'daily') |
display_name | string | No | Avatar display name in room (default: 'AI Avatar (AH)') |
video_width | int | No | Video width in pixels (default: 1280) |
video_height | int | No | Video height in pixels (default: 720) |
aspect_ratio | string | No | Video aspect ratio: '16:9', '9:16', '1:1' (default: '16:9') |
Complete Example
Pipeline Integration
Audio Flow
AgentHumanTransport automatically:
- Converts audio to the required format (16-bit mono PCM)
- Sends audio via WebSocket to avatar server
- Avatar generates video and streams to your room
Event Handling
Room Setup
Using Daily.co
Using LiveKit
Best Practices
1. Session Management
2. Error Handling
3. Audio Quality
Troubleshooting
Transport Not Connecting
Cause: Invalid API key or avatar ID Solution: Verify credentials in your AgentHuman dashboardNo Video in Room
Cause: Room credentials incorrect or avatar hasn’t joined yet Solution:- Verify room URL and token
- Wait 2-3 seconds after connection
- Check room participant list
Audio Quality Issues
Cause: Pipeline audio format mismatch Solution: Ensure audio is properly formatted before reaching transportResources
- GitHub Repository: github.com/agenthuman/pipecat-agenthuman
- Example Projects: github.com/agenthuman/pipecat-examples
- Pipecat Docs: pipecat.ai/docs
- API Reference: Making Avatars Talk
Support
Need help with Pipecat integration?- Email: [email protected]
- Discord: discord.gg/agenthuman
- GitHub Issues: github.com/agenthuman/pipecat-agenthuman/issues