Unity package for integrating ElevenLabs' conversational AI with real-time speech-to-speech capabilities.
Before installing this package, add NativeWebSocket:
- Open Unity Package Manager (Window → Package Manager)
- Click + → Add package from git URL
- Enter:
https://github.com/endel/NativeWebSocket.git#upm - Click Add
- Open Unity Package Manager (Window → Package Manager)
- Click + → Add package from git URL
- Enter:
https://github.com/danieloquelis/Unity-QuestConversationalAI.git?path=/com.convai.elevenlabs - Click Add
- Visit ElevenLabs and create an account
- Navigate to the Conversational AI section
- Create a new Conversational Agent in the dashboard
- Configure the agent's personality and behavior
- Important: Make the agent secured
- Note down the Agent ID for Unity configuration
- In your ElevenLabs dashboard, generate an API key
- Ensure the key has access to speech-to-speech functionality
- Copy the API key for Unity configuration
- In Unity, go to
Assets/Resources/ - Right-click → Create → ElevenLabs → Config
- Add your API key to the configuration asset
- Save the configuration
The main prefab for handling ElevenLabs conversational AI.
Setup:
- Drag
AgentConversationManagerprefab into your scene - Assign your ElevenLabs config to the
configfield - Set your Agent ID in the
agentIdfield - Configure
startOnAwakeif you want automatic conversation start - Run the scene and start speaking
Key Properties:
| Property | Type | Description |
|---|---|---|
agentId |
string |
Your ElevenLabs agent identifier |
config |
ElevenLabsConfig |
Configuration asset with API key |
startOnAwake |
bool |
Begin conversation automatically |
micStreamer |
MicrophoneStreamer |
Microphone input component |
audioPlayer |
PcmAudioPlayer |
Audio output component |
onAgentVadScore: Fired with agent voice activity detection score (float)onAgentTranscript: Fired when agent speaks (provides transcript text)onUserTranscript: Fired when user speaks (provides transcript text)