# Cheap text-to-speech API: Kokoro, Piper and open voices, per hour of audio

Paid voice APIs charge by the character, and the bill grows fast for audiobooks, read-aloud articles or voice agents. Open voices such as Kokoro and Piper now sound good enough for most of that work. Here's a cheap text-to-speech API built on them, how it's billed, and how to call it.

Published 2026-11-19 · https://inpherio.co.uk/blog/cheap-text-to-speech-api-kokoro-piper

Key points:
- Kokoro 82M and Piper voices give natural speech from tiny open models.
- Speech is billed on the length of the audio, to the second, with a 1-second minimum, at the voice's price per hour.
- The endpoint is OpenAI's /v1/audio/speech, so existing OpenAI TTS code works with a changed base URL.
- Whisper and other transcription models use /v1/audio/transcriptions, billed the same way.
- For a branded, cloned or highly emotive voice, a premium voice API is still the better tool.

Voice used to mean paying a premium API by the character. For an article read aloud, a long audiobook chapter or a voice assistant that talks all day, that adds up quickly. Open voices changed the maths: Kokoro, an 82-million-parameter model, sounds natural, and Piper voices run on almost anything. Here's a cheap text-to-speech API built on them.

## The open voices worth knowing

| Voice model | Size | Strengths |
|---|---|---|
| Kokoro 82M | Tiny | Natural prosody; dozens of voices including British and American English |
| Piper (e.g. en_GB Alan, Cori; en_US Lessac, Ryan) | Tiny | Very fast, clear, runs on a Raspberry Pi |
| Chatterbox Turbo | Larger | Expressive delivery |
| Qwen3 TTS | Larger | Custom voices |

Kokoro is the one to try first. Our look at [Phonon](/blog/phonon-on-ollama-gradium-s-tiny-text-to-speech-family-first-look) covers another small TTS family and its licence catch, which is worth reading before you ship any open voice.

(Live on Inpherio: https://inpherio.co.uk/models/speaches-ai/Kokoro-82M-v1.0-ONNX)

## How it's billed

Text-to-speech is billed on the **length of the audio produced**, to the second, with a 1-second minimum, at the voice's price per hour of audio. There's no per-character fee and no subscription, and failed requests cost £0. Hosts set the price per voice; the [marketplace](/marketplace) shows them all live.

Billing per second of output has a nice property: you pay for what listeners hear, not for markup, punctuation or SSML in your text.

## Calling it with the OpenAI SDK

```python
from openai import OpenAI
client = OpenAI(base_url="https://inpherio.co.uk/v1", api_key="YOUR_KEY")
audio = client.audio.speech.create(
    model="speaches-ai/Kokoro-82M-v1.0-ONNX",
    voice="bf_emma",
    input="Your order has shipped and should arrive on Tuesday.",
)
audio.write_to_file("shipped.mp3")
```

It's OpenAI's `/v1/audio/speech` shape, so code written for OpenAI's TTS works with a changed base URL, key and model. Voices depend on the model: Kokoro's are named like `af_heart`, `bf_emma` and `bm_george`. The [API reference](/api-reference) has the parameters and audio formats.

## Speech to text, the same way

The other direction uses `/v1/audio/transcriptions` with Whisper (tiny to large-v3), Parakeet or Qwen3 ASR, billed on the length of the audio in the same way. We compared what transcription costs across paid APIs and open models in [what speech-to-text actually costs](/blog/what-speech-to-text-actually-costs-per-minute-apis-vs-open-models).

```python
with open("meeting.m4a", "rb") as f:
    t = client.audio.transcriptions.create(model="Systran/faster-whisper-small", file=f)
print(t.text)
```

(Live on Inpherio: https://inpherio.co.uk/models/Systran/faster-whisper-small)

## Good uses for open TTS

- **Articles read aloud** and accessibility features.
- **Notifications and IVR prompts** that change too often to record.
- **Voice agents**: pair Whisper in, an LLM in the middle and Kokoro out.
- **Language learning and reading apps** that need lots of clear speech.

When a premium voice API is still the right call: cloned brand voices, highly emotive acting, or a language the open voices don't cover yet.

## Choosing a Kokoro voice

Kokoro's voices are named by language and gender: `af_` and `am_` are American English female and male, `bf_` and `bm_` British English female and male, and other prefixes cover further languages. A few to try first: `af_heart` and `af_bella` for warm American narration, `bf_emma` and `bm_george` for British English, `bm_lewis` for a deeper British voice. Speed can be adjusted, and short sentences with clear punctuation give the most natural rhythm.

Piper voices are named by language, region, speaker and quality, such as `en_GB-alan-medium` or `en_US-lessac-high`. "High" voices sound better and are a little slower; "medium" voices are quicker and still clear. Piper is the pick when latency matters more than warmth, such as reading out notifications.

## Building a voice agent with open models

A full voice loop needs three models, and all three can be open:

1. **Listen:** send the user's audio to `/v1/audio/transcriptions` with Whisper small or large-v3 Turbo.
2. **Think:** send the text to a chat model through `/v1/chat/completions`. Small, fast models like Qwen3 8B keep the reply quick.
3. **Speak:** send the reply to `/v1/audio/speech` with Kokoro.

Keep replies short in the system prompt ("answer in one or two sentences") so the speech step stays fast, and stream the chat reply so you can start speech on the first sentence while the rest is still being written. Everything runs through one key and one bill.

## Estimating the cost of an audiobook

A useful rule of thumb is that narration runs at about 150 words a minute. A 90,000-word book is therefore about 10 hours of audio. With per-hour pricing, the cost is the voice's hourly price times 10, whatever the punctuation, formatting or retries in your script. Check the live price on the voice's model page and you can cost a whole project before you start. Failed renders cost nothing, so it's safe to re-run a chapter that came out wrong.

## Getting natural-sounding output

Open voices reward a little preparation of the text. Spell out abbreviations the voice might misread ("approx." as "approximately"), write numbers the way you want them spoken, and break long sentences into shorter ones. Add a full stop at the end of headings so the voice pauses. For long pieces, render paragraph by paragraph and join the audio: it's easier to re-render one paragraph than a whole chapter.

## Formats and streaming

Ask for MP3 for downloads and the web, Opus for small files over slow connections, and WAV when you'll edit the audio afterwards. For a voice assistant, generate speech sentence by sentence as the chat model streams its reply; the user hears the first sentence while the rest is still being written, and the total cost is the same because you pay for the seconds of audio either way.

## Serving voices yourself

Speech models are small enough for a CPU, a Mac or a Raspberry Pi. If you run Speaches, Piper, Coqui XTTS or AllTalk at home, [self-serve](/self-serve) gives you an API key for your own machine at £0, and listing your voices lets them [earn when you're not using them](/providers).

## FAQ

**What's the cheapest text-to-speech API?** For open voices, prices are set per voice by competing hosts and billed per hour of audio. The marketplace shows every TTS model with its live price.
**Is Kokoro good enough for production?** For narration, read-aloud articles, notifications and many voice agents, yes. It's an 82M-parameter model with natural prosody in English and several other languages.
**How is text-to-speech billed?** On the length of the audio produced, to the second, with a 1-second minimum, at the model's price per hour of audio. Failed requests cost £0.
**Can I transcribe audio too?** Yes. Whisper models and others are served through /v1/audio/transcriptions, billed on the length of the audio.
