Skip to content

PyAI Speak · Text to speech

Words worth hearing.
A voice that feels right.

Natural voices that move at the speed of your application. Turn a line of text into speech, from the first greeting to the next great idea.

Your words. Your choice of voice. One speech API.

Your text → Your audioInteractive demo
Try your words. Take the code.

Choose a voice and listen. The code follows your settings.

62 / 240 characters

MP3 · No signup

Live demo: up to 30 requests per day.

import { writeFile } from "node:fs/promises";

const response = await fetch("https://api.pyai.com/v1/audio/speech", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.PYAI_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "model": "pyai-speak",
    "input": "Hi, thanks for calling Acme Dental - how can I help you today?",
    "voice": "stock_ava_en_us",
    "response_format": "mp3"
  }),
});
if (!response.ok) throw new Error(await response.text());
await writeFile("speech.mp3", Buffer.from(await response.arrayBuffer()));

Set PYAI_API_KEY in your server environment. Saves your audio as speech.mp3.

Copy the code to use this text and voice, or explore the full Playground.

Open Playground

A real Speak API request, started only when you choose Generate & listen.

Natural speech, delivered progressivelyStock, cloned and designed voicesOpenAI-compatible API

Hear + Speak · Live demo

Ask a question. Hear the answer.

Record a question about PyAI, see Hear transcribe it, and listen to Speak read the reply. You can also type. The product answers are scripted; the transcription and speech use real PyAI APIs.

Three free questions, no signup required. Daily demo limits apply. Ready to build? Sign up from the demo or use your own key with the integration guide.

Available on ClawHub

Use PyAI Speak in OpenClaw.

Install the skills you need, connect your PyAI account through the official CLI, and ask your assistant to put them to work.

Speak · v1.0.0

Give your next answer a voice.

Turn your text into a spoken update, an accessible audio version or a voiceover with a supported PyAI voice.

Get Speak on ClawHub

A PyAI account and speech-generation permission. Speech generation consumes usage.

Create an account for Speak

A voice for the moment

A little character.
A lot of possibility.

A greeting needs warmth. An update needs clarity. Choose a voice that belongs in the experience you’re building.

01

Find the voice that fits.

Start with the stock catalog. Choose a voice for its character, language and delivery, then hear your own words before you commit.

Explore the voice catalog
02

Bring a voice of your own.

Enroll a voice you have permission to use, then synthesize with its voice ID through the same speech API. Cloning enrollment is free.

Explore voice cloning
03

Start with a description.

Describe the character you have in mind with prompt-to-voice design. Use the resulting voice in the same places you use a stock voice.

Explore voice design

Made for the pace of conversation

The next word.
Without the long wait.

Speak supports progressive streaming so applications can begin playback while audio is still arriving. Phone-ready formats let you connect speech to the way your callers actually listen.

Try voices by language or accent
Streaming synthesis

~53ms

Warm time to first audio byte

Measured in-region on the streaming path. First audio byte, rather than first spoken word. Cold-path TTFB is about 98 ms.

MP3WAVPCMG.711

Fits the way you build

Keep your application.
Change its voice layer.

Already using an OpenAI speech client? Point it at PyAI, use your key and choose a PyAI voice. The familiar request shape keeps the integration small.

ONE REQUEST, A USEFUL RESULT

Your textSpeakYour audio
  • Choose stock, cloned or designed voice IDs
  • Select the audio format your app needs
  • Play the result in your application
Configure the example above
Make it part ofPhone agentsProduct experiencesNotificationsAccessibilityInteractive applications

Speaker diarization

Know the words.
See who said them.

Speak creates audio. Pair it with Hear when you need speaker-labelled transcripts from recordings, with speaker turns and timestamps.

Speaker diarization

Know the words.
See who said them.

Speak creates audio. Pair it with Hear when you need speaker-labelled transcripts from recordings, with speaker turns and timestamps.

A little more detail

Good questions.
Clear answers.

Sandbox keys never bill; live usage requires available credit. See current rates ↗

What is Speak?

Speak is PyAI's text-to-speech (TTS) API. It turns text into natural speech over a low-latency streaming path, with 200 stock voices, free voice cloning, and prompt-to-voice design. It speaks the OpenAI /v1/audio/speech contract, so it's a drop-in replacement for OpenAI TTS.

Can I use speaker diarization with Speak?

PyAI supports speaker diarization through Hear async transcription jobs. Speak generates audio from text; Hear identifies speaker turns in recorded audio. Use Hear to produce a speaker-labelled transcript, then use Speak when your application needs spoken output.

How much does Speak TTS cost?

Voice cloning enrollment and prompt-to-voice design are free - you pay only for the audio you synthesize, billed per minute. Check our pricing page for the latest rates.

How do I migrate from OpenAI TTS?

Point your existing OpenAI SDK at https://api.pyai.com/v1 with your PyAI key. The /v1/audio/speech request shape matches, and the OpenAI preset voice names (alloy, echo, fable, onyx, nova, shimmer) are accepted and map to PyAI stock voices - so most code runs unchanged.

How many voices are there?

200 stock voices, plus your own cloned voices and prompt-designed voices. Browse the live catalog at GET /v1/voices, or pass an OpenAI preset name for drop-in compatibility.

What does voice cloning cost?

Cloning enrollment is free, as is prompt-to-voice design. You pay only for the audio you later synthesize with the voice, at the standard per-minute Speak rate.

Can I get telephony-ready audio?

Yes. Speak encodes server-side into mp3, wav, opus, pcm, or 8 kHz G.711 µ-law/A-law, so phone callers get exactly the format the line needs without a client-side resampler or µ-law encoder.

The next thing you build

Give your words
a voice.