Hume AI TTS
The Hume AI TTS provider enables your agent to use Hume AI's high-quality text-to-speech models for generating natural-sounding voice output.
Installation​
Install the Hume AI-enabled VideoSDK Agents package:
pip install "videosdk-plugins-humeai"
Importing​
from videosdk.plugins.Hume import HumeAITTS
Authentication​
The Hume plugin requires an Hume API key.
Set HUMEAI_API_KEY
in your .env
file.
Example Usage​
from videosdk.plugins.hume import HumeAITTS
from videosdk.agents import CascadingPipeline
# Initialize the Hume AI TTS model
tts = HumeAITTS(
voice="Serene Assistant",
instant_mode=True,
)
# Add tts to cascading pipeline
pipeline = CascadingPipeline(tts=tts)
When using .env file for credentials, don't pass them as arguments to model instances or context objects. The SDK automatically reads environment variables, so omit api_key
and other credential parameters from your code.
Configuration Options​
instant_mode
: (bool) Whether to use instant mode synthesis (default:True
). Instant mode requires specifying a voice.voice
: (str) Voice name to use (default:"Serene Assistant"
). Required wheninstant_mode
isTrue
.speed
: (float) Speaking rate multiplier (default:1.0
). Values >1.0 increase speed.api_key
: (str) Hume AI API key. Can also be set via theHUMEAI_API_KEY
environment variable.
Additional Resources​
The following resources provide more information about using Hume with VideoSDK Agents SDK.
-
Python package: The
videosdk-plugins-hume
package on PyPI. -
GitHub repo: View the source or contribute to the VideoSDK Hume AI TTS plugin.
-
Hume AI docs: Hume AI docs.
Got a Question? Ask us on discord