LiveKit Plugins Hume
raw JSON → 1.5.8 verified Sat May 09 auth: no python
Hume AI TTS plugin for LiveKit Agents, enabling text-to-speech synthesis using Hume's emotional intelligence models. Current version 1.5.8, requires Python >=3.10. Part of the LiveKit Agents ecosystem with monthly releases.
pip install livekit-plugins-hume Common errors
error ModuleNotFoundError: No module named 'livekit.plugins.hume' ↓
cause Package not installed or installed incorrectly.
fix
Run
pip install livekit-plugins-hume error TypeError: TTS() got an unexpected keyword argument 'preemptive_generation' ↓
cause `preemptive_generation` removed in v1.5.0.
fix
Remove argument; use agent PreemptiveGenerationOptions.
error livekit.plugins.hume.TTS requires 'HUME_API_KEY' environment variable ↓
cause API key not provided and not set in environment.
fix
Set HUME_API_KEY environment variable or pass
api_key parameter. error AttributeError: module 'livekit.plugins.hume' has no attribute 'tts' ↓
cause Old import path lowercase 'tts' no longer exists.
fix
Use
from livekit.plugins.hume import TTS (uppercase). Warnings
gotcha Deprecation notice: LiveKit Agents v1.5 removed `preemptive_generation: bool` from TTS classes. Use `agent/voice_pipeline_agent.PreemptiveGenerationOptions` instead. ↓
fix Migrate to `PreemptiveGenerationOptions` (see LiveKit agents v1.5 changelog).
gotcha The `api_key` parameter is no longer read from `HUME_API_KEY` environment variable automatically. You must pass it explicitly. ↓
fix Set `api_key=os.environ.get('HUME_API_KEY')` when constructing TTS.
deprecated Old import path `livekit.plugins.hume.tts` (lowercase) is deprecated. Use `livekit.plugins.hume.TTS` (uppercase). ↓
fix Use `from livekit.plugins.hume import TTS`.
Imports
- TTS
from livekit.plugins.hume import TTS
Quickstart
import os
from livekit import agents
from livekit.plugins.hume import TTS
async def main():
tts = TTS(
api_key=os.environ.get('HUME_API_KEY', ''),
)
# Use with AgentSession or VoicePipelineAgent
session = agents.VoicePipelineAgent(
stt=None,
llm=None,
tts=tts,
)
await session.start()