moses TTS

Realtime voice API for AI agents

Your agent speaks while it thinks.

Moses TTS is low-latency streaming text to speech for agentic applications that can’t afford a pause. Stream your language model’s tokens in over a WebSocket and the first words are spoken while the rest of the answer is still being written.

  • ~80 ms to first audio once the first words are ready, measured on the speech worker.

  • Speaks after a few words, not after the whole answer: text is spoken in small pieces as it arrives.

  • Realtime goes first. Live conversations always take priority over batch requests.

Public beta. Sign up with your email, no waitlist. Realtime WebSocket API and OpenAI-style speech endpoint.

Voice agent on a call
LLM writes

Your parcel left our warehouse this morning, and it arrives on Friday.

Caller hears
first audio while the model is on word 5 answer finished, speech already running

Try it now, no account needed

Type a short sentence, pick a voice and listen. The demo uses the standard speech API with the same voices as the API.

Up to 50 characters per try and 10 tries a day. Nothing you type is stored. For longer texts, realtime streaming and your own voices, create a free account.

0 / 50

Silence is the bug in voice AI

A typical pipeline waits for the full answer, sends it to a speech service, waits again, then plays. Every second of that is dead air on a call, in a game or in an assistant. Moses TTS removes the waiting by speaking as the text arrives.

Illustration. The speaking starts after the first piece of text (about 30 characters) plus ~80 ms.

Two APIs, one voice

Use the realtime API when text streams in, and the standard API when you already have the whole text. Both run on the same voices and languages, and both stream audio back as it is made.

Realtime voice API

wss://moses-ai.com/tts/realtime

A WebSocket for LLM token streams. Send text deltas as they arrive and get raw PCM (24 kHz, 16-bit, mono) back, plus events for each spoken segment. Cancel any time for barge-in, warm up a voice before the answer starts, change voice or language per message.

# pip install websockets
async with websockets.connect(
    "wss://moses-ai.com/tts/realtime",
    additional_headers={"Authorization": "Bearer mk_…"}) as ws:
    await ws.send(json.dumps({"type": "config", "voice": "alba"}))
    async for delta in llm_stream():          # your model's tokens
        await ws.send(json.dumps({"type": "text", "text": delta}))
    await ws.send(json.dumps({"type": "end"}))
    async for msg in ws:                      # PCM chunks + events
        ...

Standard speech API

POST https://moses-ai.com/tts/v1/audio/speech

An OpenAI-style text-to-speech endpoint for whole texts: notifications, prompts, cached phrases. The audio streams back while it is generated, as WAV or raw PCM, about 6× faster than real time. Requests wait in a fair queue, so one big batch can’t block anyone else.

curl -N https://moses-ai.com/tts/v1/audio/speech \
  -H "Authorization: Bearer mk_…" \
  -H "Content-Type: application/json" \
  -d '{"input": "Your parcel arrives on Friday.",
       "voice": "alba"}' -o speech.wav

Full API reference: every message, event, field, limit and error code, open to read without an account. JavaScript and TypeScript: npm install @mosesai/tts. Try it in your browser and copy the code for realtime and batch use. Also: OpenAI compatibility, Pipecat, LiveKit, MCP server.

Built for low latency, end to end

Low latency isn’t one trick. It’s every step of the path doing as little waiting as possible.

Speaks in small pieces

The first piece is spoken after about 30 characters, at a natural break. Later pieces follow whole clauses and sentences, so the voice keeps its flow.

Realtime before batch

Each speech worker serves live conversations first. Standard requests may only use part of a worker, so a long batch never makes a caller wait.

Connections stay open

Speech workers keep a permanent connection to the gateway. No handshakes per request, no polling: work is pushed the moment it arrives.

No buffering on the way

Audio is passed on chunk by chunk as it is generated, uncompressed, without re-buffering. Your player gets the first samples right away.

One worker per conversation

A realtime session stays on one speech worker, with its voice already loaded. No round trip over the network for every sentence.

Warm-up before the answer

Send a warm-up while your model is still thinking, and even a new voice or language starts at full speed.

For agents that talk to people

Voices, languages and pronunciation

Seven languages

English, German, French, Italian, Portuguese, Spanish and Dutch, each with built-in voices. Switch language mid-conversation.

Your own voice

Clone a voice from a 5 to 30 second recording, with consent. It belongs to you: no other account can use it.

Says it right

Numbers, dates and prices are read as words. A lexicon fixes names and terms, and acronyms can be spelled out.

Markup when you need it

SSML-style tags for pauses, emphasis, speed, language and voice changes inside one text.

Nothing is stored. Text and audio pass through and are gone. We count characters and seconds per day for your limits, nothing more.

Keys you control. Create personal API keys in the studio. They’re shown once and kept only as a hash; delete one and it stops working within a minute.

Fair for everyone. Per-account limits and a fair queue: requests from different accounts take turns.

Questions

What is a realtime voice API?

It turns text into speech while the text is still being written. You send a language model’s tokens as they arrive and receive audio for the first words while the rest of the answer is still being generated, instead of waiting for the whole answer.

How low is the latency?

Once the first words of a sentence are ready (about 30 characters), the first audio follows in about 80 ms on the speech worker. In practice your agent starts talking after its first few words.

Does it work with OpenAI-style clients?

The standard endpoint takes an OpenAI-style request (input, voice, response_format wav or pcm) and streams the audio back. The model field is accepted and ignored. Use one of the Moses voices.

Can the user interrupt the agent?

Yes. Send {"type": "cancel"} on the realtime connection: audio stops after the current chunk and buffered text is dropped.

Is my text or audio stored?

No. Text and generated audio aren’t stored, and there are no access logs. API keys are kept only as hashes.

Get access

Create an account, confirm your email, and your API key is ready, with 125,000 TTS characters or 333 STT minutes free to try it (valid for 30 days). Pay as you go with prepaid credit, no subscription. No agent platform needed.

  1. Create an account. Email and password; we send a link to confirm the address.
  2. Get your key. Create API keys in the console, with a free trial to start.
  3. Try it in the studio. Voices, your own recordings, and code to copy at moses-ai.com/tts.