Skip to content

LMNTTTS

Convert text to speech using LMNT's Blizzard model via a simple REST API.

Use LMNTTTS when you want low-latency, high-quality speech synthesis from LMNT’s Blizzard model via a simple REST call. Each synthesize() request returns the complete audio as a Blob — no WebSocket management required. Voices from LMNT’s catalog and instant voice cloning are both supported through the voice option.

Prerequisites

  • An LMNT API key or a CompositeVoice proxy server
  • No additional dependencies required. LMNTTTS uses native fetch internally.

Basic setup

import {
  CompositeVoice,
  NativeSTT,
  AnthropicLLM,
  LMNTTTS,
  BrowserAudioOutput,
} from 'composite-voice';

const voice = new CompositeVoice({
  providers: [
    new NativeSTT(),
    new AnthropicLLM({
      proxyUrl: '/api/proxy/anthropic',
      model: 'claude-haiku-4-5',
    }),
    new LMNTTTS({
      proxyUrl: '/api/proxy/lmnt',
      voice: 'leah',
      model: 'blizzard',
      format: 'mp3',
    }),
    new BrowserAudioOutput(),
  ],
});

await voice.initialize();
await voice.startListening();

Configuration options

OptionTypeDefaultDescription
apiKeystringLMNT API key (direct mode)
proxyUrlstringProxy server URL (recommended for production)
voicestringrequiredVoice ID from GET /v1/ai/voice/list or a cloned voice
modelstring'blizzard'The speech model to use
formatstring'mp3'Output format: mp3, wav, aac, ulaw, webm, pcm_s16le, pcm_f32le
sampleRatenumberAPI defaultOutput sample rate: 8000, 16000, or 24000 Hz
languagestringauto-detectTwo-letter ISO 639-1 code (e.g. en), or auto
temperaturenumberAPI defaultExpressiveness — lower is more neutral, higher is more dynamic
topPnumberAPI defaultStability — lower is more consistent, higher is more flexible
endpointstringCustom API endpoint URL
maxRetriesnumber3Retry count for failed requests

Available voices

List voices with LMNT’s GET /v1/ai/voice/list endpoint, or create your own with instant voice cloning. The catalog voice leah is a good starting point.

Output formats

FormatUse case
mp396kbps MP3; good compression, wide browser support (default)
wav16-bit PCM in a WAV container; uncompressed, highest quality
aacOptimized for mobile devices
ulaw8-bit G711 µ-law with WAV header; telephony
webmWebM container with Opus codec
pcm_s16le / pcm_f32leRaw PCM without a container; for custom audio pipelines

Complete example

import {
  CompositeVoice,
  MicrophoneInput,
  DeepgramSTT,
  AnthropicLLM,
  LMNTTTS,
  BrowserAudioOutput,
} from 'composite-voice';

const tts = new LMNTTTS({
  proxyUrl: '/api/proxy/lmnt',
  voice: 'leah',
  model: 'blizzard',
  format: 'mp3',
  language: 'en',
  temperature: 0.7,
});

const voice = new CompositeVoice({
  providers: [
    new MicrophoneInput(),
    new DeepgramSTT({ proxyUrl: '/api/proxy/deepgram' }),
    new AnthropicLLM({
      proxyUrl: '/api/proxy/anthropic',
      model: 'claude-haiku-4-5',
    }),
    tts,
    new BrowserAudioOutput(),
  ],
});

voice.on('tts.start', () => console.log('Speaking...'));
voice.on('tts.end', () => console.log('Done speaking'));

await voice.initialize();
await voice.startListening();

Expressiveness controls

  • temperature — influences how expressive and emotionally varied the speech becomes. Lower values (like 0.3) create more neutral, consistent speaking styles; higher values (like 1.0) allow more dynamic emotional range.
  • topP — controls the stability of the generated speech. A lower value (like 0.3) produces more consistent, reliable speech; a higher value (like 0.9) gives more flexibility but might occasionally produce unusual intonations.
  • language — Blizzard supports 31 languages. Specifying the language is recommended for faster generation; omit it (or use auto) for automatic detection.

Tips

  • LMNTTTS is REST-based, not streaming. The full audio Blob is returned after the API processes the entire input (max 5000 characters per request). For real-time streaming, consider DeepgramTTS.
  • LMNT also offers a full-duplex streaming WebSocket API (speech sessions); this provider intentionally uses the simpler REST endpoint, and streaming support may be added later.
  • Use proxyUrl in production so your API key stays server-side — set lmntApiKey in your proxy config.

Further reading

© 2026 CompositeVoice. All rights reserved.

Font size
Contrast
Motion
Transparency