Overview
LMNT provides real-time text-to-speech synthesis through a WebSocket-based streaming API optimized for conversational AI. The service offers ultra-low latency with high-quality voice models and supports multiple languages with automatic interruption handling.API Reference
Complete API documentation and method details
LMNT Speech Docs
Official LMNT streaming speech API documentation
Example Code
Working example with voice synthesis
Installation
To use LMNT services, install the required dependencies:LMNT_API_KEY
.
Get your API key from the LMNT Console.
Frames
Input
TextFrame
- Text content to synthesize into speechTTSSpeakFrame
- Text that should be spoken immediatelyTTSUpdateSettingsFrame
- Runtime configuration updatesLLMFullResponseStartFrame
/LLMFullResponseEndFrame
- LLM response boundaries
Output
TTSStartedFrame
- Signals start of synthesisTTSAudioRawFrame
- Generated audio data chunks (streaming PCM)TTSStoppedFrame
- Signals completion of synthesisErrorFrame
- WebSocket or API errors
Language Support
View All Supported Languages
View All Supported Languages
Language Code | Description | Service Code |
---|---|---|
Language.DE | German | de |
Language.EN | English | en |
Language.ES | Spanish | es |
Language.FR | French | fr |
Language.HI | Hindi | hi |
Language.ID | Indonesian | id |
Language.IT | Italian | it |
Language.JA | Japanese | ja |
Language.KO | Korean | ko |
Language.NL | Dutch | nl |
Language.PL | Polish | pl |
Language.PT | Portuguese | pt |
Language.RU | Russian | ru |
Language.SV | Swedish | sv |
Language.TH | Thai | th |
Language.TR | Turkish | tr |
Language.UK | Ukrainian | uk |
Language.VI | Vietnamese | vi |
Language.ZH | Chinese | zh |
Language.EN
- EnglishLanguage.ES
- SpanishLanguage.FR
- FrenchLanguage.DE
- GermanLanguage.ZH
- ChineseLanguage.JA
- Japanese
Usage Example
Basic Configuration
Initialize theLmntTTSService
and use it in a pipeline:
Dynamic Configuration
Make settings updates by pushing aTTSUpdateSettingsFrame
for the LmntTTSService
:
Metrics
The service provides real-time metrics:- Time to First Byte (TTFB) - Latency from text input to first audio
- Processing Duration - Total synthesis time
- Character Usage - Text processed for billing
Learn how to enable Metrics in your Pipeline.
Additional Notes
- WebSocket Streaming: Uses persistent WebSocket connection for ultra-low latency
- Custom Voices: Supports custom voice creation through LMNT dashboard
- Language Detection: Automatically handles language variants and fallbacks