> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zeroruntime.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# LMNT

> Use the LMNT text-to-speech plugin in a Zero Runtime pipeline. Setup and usage in JavaScript.

LMNT is a **text-to-speech** plugin. It streams speech over a WebSocket connection.

## Setup

Set your LMNT API key in the worker environment. Generate a key from the [LMNT site](https://www.lmnt.com/):

```bash theme={null}
export LMNT_API_KEY=<key>
```

## Usage

Import the plugin and pass it to the pipeline's `tts` slot.

```typescript Node JS theme={null}
import { LMNTTTS } from '@zeroruntime/js-sdk/plugins';

const tts = LMNTTTS();

// Pipeline({ tts, ... })
```

> [!NOTE]
>
> `LMNTTTS` ships in the Node JS SDK only. The Python SDK does not include this plugin yet.

## Parameters

*Constructor parameters for `LMNTTTS`.*

| Parameter | Type | Default | Description |
| - | - | - | - |
| `api_key` | `string` | `null` | LMNT API key. Falls back to the `LMNT_API_KEY` environment variable when unset. |
| `voice` | `string` | `"ava"` | Voice to speak with. |
| `model` | `string` | `"blizzard"` | LMNT model. |
| `language` | `string` | `"auto"` | Language code, or `"auto"` to detect it. |
| `format` | `string` | `"pcm_s16le"` | Audio format: `"mp3"`, `"pcm_s16le"`, `"pcm_f32le"`, `"ulaw"`, or `"webm"`. |
| `sample_rate` | `number` | `24000` | Output sample rate in Hz: `8000`, `16000`, or `24000`. |
| `seed` | `number \| null` | `null` | Seed for repeatable output. |
| `temperature` | `number` | `1` | Sampling temperature. |
| `top_p` | `number` | `0.8` | Nucleus sampling cutoff. |
| `ws_url` | `string` | `"wss://api.lmnt.com/v1/ai/speech/stream"` | WebSocket endpoint. |

## Import paths

| SDK | Import | Constructor |
| - | - | - |
| Node JS | `import { LMNTTTS } from '@zeroruntime/js-sdk/plugins'` | `LMNTTTS()` |

Synthesized audio is streamed back to the caller after the [LLM](https://docs.zeroruntime.ai/runtime-sdk/plugins/overview.md) produces a response.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.