LMNT AI TTS
The LMNT AI TTS provider enables your agent to use LMNT AI's high-quality text-to-speech models for generating natural-sounding voice output.
Installation
Install the LMNT AI-enabled VideoSDK Agents package:
pip install "videosdk-plugins-lmnt"
Importing
from videosdk.agents.plugins import LMNTTTS
Authentication
The LMNT plugin requires an LMNT API key.
Set LMNT_API_KEY in your .env file.
Example Usage
from videosdk.agents.plugins import LMNTTTS
from videosdk.agents import Pipeline
# Initialize the LMNT TTS model
tts = LMNTTTS(
voice="ava",
model="blizzard",
language="auto",
)
# Add tts to pipeline
pipeline = Pipeline(tts=tts)
note
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
api_key: Your LMNT API key (can also be set viaLMNT_API_KEYenvironment variable)voice: Voice ID to use for synthesis (default: "ava")model: Model to use for synthesis (default: "blizzard")language: ISO 639-1 language code or "auto" (default: "auto")format: Audio output format. One of "mp3", "pcm_s16le", "pcm_f32le", "ulaw", "webm" (default: "pcm_s16le")sample_rate: Output sample rate. One of 8000, 16000, 24000 (default: 24000)seed: (int) Optional generation seed for reproducibility (default:None)temperature: (float) Sampling temperature, 0.0-1.0 (default: 1.0)top_p: (float) Nucleus sampling parameter, 0.0-1.0 (default: 0.8)ws_url: Override for the WebSocket endpoint (default: "wss://api.lmnt.com/v1/ai/speech/stream")
Additional Resources
The following resources provide more information about using LMNT with VideoSDK Agents SDK.
- LMNT docs: LMNT API docs.
Got a Question? Ask us on discord

