Agora
Agora is a real-time communication and conversational AI platform. With Agora’s API, developers can build AI voice agents with any LLM and integrate with Hume’s expressive text-to-speech API for high-quality voice synthesis.
Hume’s expressive TTS can be integrated into your Agora agents to deliver natural, emotionally-aware speech in conversational AI. This guide covers setup instructions, integration patterns, and configuration best practices for using Hume TTS with Agora.
Wanna get right to the code? See our complete Agora example project on GitHub.
Authentication
To use Hume TTS with Agora, you’ll need both Hume and Agora credentials. Follow these steps to obtain your credentials and set up environment variables.
Get your Hume API key
To get your Hume API key, sign in to the Hume Platform and follow the Getting your API key guide.
Get your Agora credentials
Sign up for an Agora account and create a project in the Agora Console. Copy the following credentials from your project dashboard: Agora App ID, Certificate, Customer ID, and Secret
Usage
Agora’s Conversational AI Engine enables you to build voice AI agents with any LLM by orchestrating the complete speech-to-speech pipeline: automatic speech recognition (ASR) converts user speech to text, your chosen LLM processes the text and generates a response, and Hume TTS synthesizes the LLM’s text output into natural, expressive speech.
Building a Conversational AI Agent
The Conversational AI Engine handles the entire voice interaction flow, allowing you to focus on configuring your LLM and TTS provider. When using Hume TTS, the Agora engine manages audio streaming and interruption handling.
Integration workflow:
-
Configure your LLM: Connect any LLM provider (OpenAI, Azure OpenAI, Google Gemini, Anthropic Claude, or a custom model) to generate responses to user speech.
-
Set Hume as your TTS provider: Configure Hume TTS in your Agora agent to synthesize the LLM’s text responses into natural, emotionally-aware speech.
-
Select a voice: Choose from Hume’s extensive Voice Library or use a custom voice you’ve created for consistent agent personality.
-
Deploy your agent: Agora’s engine handles real-time audio streaming, interruption detection, and maintains the conversation flow between the user and your AI agent.
Configuration example:
For a complete Next.js implementation with Agora and Hume TTS, see our Agora example project.
Best Practices
When building conversational AI agents with Agora and Hume TTS, consider the following:
-
Voice selection: Choose a voice from Hume’s Voice Library that matches your agent’s personality, or create a custom voice for brand consistency.
-
LLM prompt engineering: Design your LLM prompts to work well with voice interactions: keep responses concise and natural for spoken delivery.
-
Interruption handling: Agora’s Conversational AI Engine automatically handles interruptions, allowing users to interrupt the agent mid-response for more natural conversations.
Constraints
-
Audio format compatibility: Hume TTS outputs audio at 48kHz sample rate. Agora supports various sample rates; ensure proper resampling if your Agora configuration requires a different rate.
-
One utterance per request: Each Hume TTS API request processes a single utterance. Split multi-utterance text into separate requests for granular control.
Resources
Reference the official Agora docs for the Conversational AI Engine, including API references, LLM integration, and TTS provider configuration.
Learn how to configure Hume AI as your TTS provider in Agora’s Conversational AI Engine.
Use a working Next.js example to get started with Hume TTS and Agora’s Conversational AI Engine.
Learn more about Hume’s speech-language model, and features of Hume’s TTS API.

