Black Friday deposit bonus·Top up $50+ and get $10 · Top up $100+ and get $25·Ends November 30Top up →
Use case

AI podcast voices:
a multi-speaker episode from a script

Turn a script into a multi-voice podcast: a voice per speaker from presets, designed voices or consented clones, one speech request per line, priced per minute.

Last updated 2026-11-05

Prepaid, no subscriptionREST or MCPOne key for models, data and agents
speech$ curl https://lovelyrouter.com/v1/audio/speech -H "Authorization: … ⏺ "model": "qwen3-tts", "voice": "serena"> "input": "Welcome back! Your order has shipped." hello.mp3 · 3.2 s of audio ✓ 200 OK · billed by the second
Black Friday

Black Friday deposit bonus

Every qualifying top-up earns free credit, on top of any other offer.

Ends November 30

Deposit $50
+$10
20% bonus
Deposit $100
+$25
25% bonus
Sign up and claim

A podcast made with AI voices is a script and a cast: a host, a guest, maybe a narrator, each with a voice that stays the same from the first episode to the fiftieth. The text to speech API gives you the voices, and your code turns the script into an episode. Give each speaker a preset voice, a voice designed from a description, or a cloned voice of someone who agreed to it. Send one POST /v1/audio/speech request per line, then put the pieces together in order. The API speaks; joining the lines into one file is a few lines of your own code, shown below. Try voices first in the speech playground.

Hand it to your AI agent

Copy this prompt into Claude Code, Cursor, Codex or any coding agent. It tells the agent where the docs are and how to use your API key.

Build a script-to-podcast pipeline that speaks each line in its speaker's voice with the Lovely Router speech API and joins the audio into one episode.

- Docs (read first): https://lovelyrouter.com/docs/models/speech.md and https://lovelyrouter.com/docs/api/audio.md
- One POST https://lovelyrouter.com/v1/audio/speech per line, with each speaker's preset, designed (`instructions`) or saved voice; join the clips in this project (there is no audio join endpoint).
- Auth: read my API key from the LOVELY_API_KEY environment variable and send it as `Authorization: Bearer $LOVELY_API_KEY`. Never print or commit the key. If it is not set, ask me to create one at https://lovelyrouter.com/app/keys.
- Billing is prepaid: every call is charged to my balance, so test with a small request before running anything large.
- Every docs page is plain Markdown; the full index is https://lovelyrouter.com/llms.txt.

My task: <the script, the speakers and their voices>
01

How it works

010203
  1. Write the script

    A list of lines, each with a speaker and the words. Write it yourself, or have any chat model on your key draft it from your notes as JSON, then edit it.

  2. Cast a voice per speaker

    Pick a preset (ryan, aiden, serena, vivian, …), describe a new voice in instructions and save it, or clone a voice from a 3 to 15 second clip with consent: true. A saved voice gets an id (voice_…) you reuse in every episode.

  3. Speak each line

    One request per line, with that speaker's voice and, on qwen3-tts, a delivery note such as "amused, a little faster". Each answer is the audio itself, with its length in the x-lovely-audio-seconds header.

  4. Put the episode together

    Ask for pcm and the lines are raw 16-bit samples at 24 kHz on both models, so joining them is appending bytes, with a short pause in between. Wrap the result in a WAV header, or encode it to MP3 with your own tools.

02

From script to episode in Python

Python
import os
import wave
import requests

H = {"Authorization": f"Bearer {os.environ['LOVELY_API_KEY']}"}
VOICES = {
    "host": "ryan",                             # a preset voice
    "guest": "voice_8f2c4a1e9b7d3f60a5c2e1d4",  # a saved voice (designed or cloned)
}
script = [
    ("host", "Welcome back to the show. Today we're talking about the history of tea.", "Warm and upbeat"),
    ("guest", "Thanks for having me. It's a story about empires, smugglers and a lot of boiling water.", "Amused, relaxed"),
    ("host", "Let's start with the smugglers.", "Curious, a little faster"),
]

RATE = 24_000                       # pcm = 16-bit, 24 kHz, mono
pause = b"\x00\x00" * int(RATE * 0.4)  # 0.4 s of silence between lines
audio = b""
for speaker, text, style in script:
    r = requests.post("https://lovelyrouter.com/v1/audio/speech", headers=H, timeout=300, json={
        "model": "qwen3-tts",
        "input": text,
        "voice": VOICES[speaker],
        "instructions": style,
        "response_format": "pcm",
    })
    r.raise_for_status()
    audio += r.content + pause

with wave.open("episode.wav", "wb") as f:
    f.setnchannels(1)
    f.setsampwidth(2)
    f.setframerate(RATE)
    f.writeframes(audio)

Each line is one request, so a line that comes out wrong is redone alone. The timeout is generous because the first request after an idle spell waits while the model loads; the text to speech guide has the same calls in cURL and Node.js.

03

Voices for every speaker

Preset voices

qwen3-tts has nine, from uncle_fu (low and mellow) to ono_anna (playful, light); zonos2 has american_female, american_male and british_female. Every voice speaks every language its model supports, best in its native one.

Designed voices

Leave out voice and describe one in instructions: "a calm woman in her fifties with a slight Scottish accent, unhurried". A designed voice comes out a little different each time, so save the clip you like with POST /v1/audio/voices and use its id from then on.

Cloned voices, with consent

POST /v1/audio/voices with a 3 to 15 second clip of one person speaking clearly, its transcript and consent: true. Clone your own voice or a co-host who agreed; you are responsible for how a cloned voice is used. See voice cloning.

Delivery

On qwen3-tts, instructions with a saved or preset voice steers how a line is said: emotion, pace, a whisper. On zonos2, emotion takes happy, sad, angry or surprised, or a mix of weights.

Languages

qwen3-tts speaks 10 languages, including English, Chinese, Japanese, Korean, Spanish and German; zonos2 speaks 40+. Set language to help with short lines and numbers.

04

What the API does and what you do

StepWhoHow
The scriptYou, or a chat model on your keyLines with a speaker each
VoicesThe APIPresets, instructions, POST /v1/audio/voices
Each line's audioThe APIPOST /v1/audio/speech, up to 4,096 characters per request
Joining the linesYour codeAppend pcm samples, or concatenate files with your own audio tools
Music, intro, levels, publishingYour toolsMix and master as for any recording

There is no endpoint that joins audio files or speaks a whole multi-speaker script in one call, and no streaming: each request returns its audio when it is complete. A long passage for one speaker can go in one request (up to 4,096 characters); it is spoken sentence by sentence in the same voice.

05

Recipes

A show with a fixed cast

Save the host and guest voices once and keep their ids in your config. Every episode sounds like the same people.

Narrated articles

Turn each blog post into audio with one designed narrator voice, one request per section, and publish it beside the text.

Bilingual episodes

Speak the same script in English and Chinese with the same saved voice by changing input and language.

Dialogue for games and lessons

Give each character a designed voice and instructions per line ("whispering", "angry"), and keep the files per line for your engine.

A briefing from your data

Have a chat model write a two-voice summary of your day's numbers as JSON, then speak it.

06

What you pay

Both models cost $0.036 per minute of audio, billed by the second, at least one second per request. A 30-minute episode costs $1.08 in speech, however many speakers it has. Saved voices are free, up to 100 per account. A chat model that drafts the script is billed at its own price. Requests need a positive prepaid balance, failed requests aren't charged, and every call is in your logs with the seconds made. Every price is on pricing.

07

Responsible use

Clone only voices that are yours or whose speakers gave permission, and don't use any voice to deceive or impersonate people. If your show uses AI voices, say so to your listeners. The Acceptable Use Policy applies to every request.

08

Frequently asked questions

?
Can one request speak several speakers?+

No. A request has one voice. Send one request per line or per speaker turn, then join the audio in order; the Python example above does it with pcm.

Does the API stitch the episode together?+

No. It returns each line's audio. Joining is yours: append pcm samples, or concatenate files with your own audio tools, then add music and levels as for any recording.

Will a voice sound the same every episode?+

A preset or saved voice does. A voice designed from instructions alone comes out a little different each time, so save a clip you like as a voice and use its id.

Can I clone a guest's voice?+

Only with their permission. Saving a voice requires consent: true, confirming the voice is yours or the speaker agreed, and you are responsible for how it is used.

How long can one line be?+

Up to 4,096 characters per request. Longer text is split into more requests; a long text in one request is spoken sentence by sentence in the same voice.

Why is the first request slow?+

The speech models run on GPUs that sleep when idle. The first request after a quiet spell waits about 45 seconds on qwen3-tts, up to 2 minutes on zonos2. After that, qwen3-tts speaks about twice as fast as real time.

Can an AI agent produce episodes?+

Yes. Copy the prompt on this page into Claude Code, Cursor or Codex: it reads the Markdown docs and writes the script-to-audio pipeline with your key.

For every field, see the audio API reference; for a talking video of the same characters, see video shots, or sign up to get a key.

One prepaid key for models, data and agents

No subscription. Top up, use what you need, see every charge in your logs.