Text-to-Speech With Ollama: Phonon Voices, Saving WAV Files and the /v1/audio/speech API
Note: Some future links on this site may be affiliate links. We never claim hands-on testing; guides are researched from the public sources listed in each article.
How we wrote this: A summary of Ollama's official "Speech" documentation and the Phonon model page on ollama.com (linked below), checked October 29, 2026. Commands are adapted from those pages. Voice names are the examples the docs give; run
ollama show phononfor the current list.
Ollama has long been about text in, text out. Its speech support adds the reverse direction of private transcription with Whisper: you give it text and a speech model reads it aloud, on your own computer. The docs say Ollama streams the audio as it's generated, so playback can start before the whole passage has been spoken.
What you need
- Ollama v0.40.9 or later. Check with
ollama -v, and update if you're behind (setup guides for Mac, Windows and Linux). - The Phonon model:
ollama pull phonon
The docs say Phonon uses Gradium's 31M English checkpoint and comes with Gradium's English voices, such as Zoey, Easton and Freya. Without a voice, it uses the checkpoint's own voice, default. ollama show phonon lists every voice, and voice names work in any letter case, with or without accents.
Before you use generated audio in a product or a client project, read the license terms on the model's library page; see open model licenses explained.
Speak from the terminal
ollama run plays audio through your speakers:
# Speak some text
ollama run phonon "Hello from Ollama."
# Choose a voice
ollama run phonon --voice Zoey "Hi, this is Zoey."
# Speak text from another program
echo "Text from another program works too." | ollama run phonon
Run ollama run phonon with no text to get a >>> prompt where each line is spoken when you press Enter. Ctrl+C stops speaking; /bye or Ctrl+D exits.
Playback uses your system's built-in player: afplay on macOS, PowerShell on Windows, and on Linux the first of paplay, pw-play, aplay or ffplay that's installed.
Have a chat model's answer read aloud
The docs show piping one model into another:
ollama run gemma4 --hidethinking \
"Tell me a fun fact about owls in two sentences." \
| ollama run phonon
Piped text is spoken as it arrives, so the answer starts playing after its first sentence or two. (--hidethinking keeps a thinking model's reasoning out of the audio.)
Save a WAV file
When output is redirected, ollama run writes a WAV file instead of playing it, which also works on a server with no speakers:
ollama run phonon "Save this to a file." > speech.wav
To hear audio generated on another machine, run ollama locally with OLLAMA_HOST pointing at the server; the sound plays where the command runs.
The API: OpenAI-compatible /v1/audio/speech
Apps can call the same endpoint shape OpenAI uses:
curl http://localhost:11434/v1/audio/speech \
-H "Content-Type: application/json" \
-d '{
"model": "phonon",
"input": "Hello from Ollama.",
"voice": "default"
}' --output speech.wav
The docs include Python and JavaScript versions that use the official OpenAI client libraries with base_url set to http://localhost:11434/v1 and a placeholder API key of ollama. Nothing goes to OpenAI; the client is just speaking the same format to your local server. For the basics of that server, see Ollama's local API.
Audio formats
response_format |
What you get |
|---|---|
wav (default) |
WAV, 16-bit, mono, 24 kHz. The header is written before the length is known, so its size fields hold the maximum value |
pcm |
Raw 16-bit little-endian samples, mono, 24 kHz, no header |
Because the response streams, you can pipe it straight into a player such as ffplay and hear it while the rest is still being generated.
Limits worth knowing
- 4,096 characters of
inputper API request.ollama runsplits longer text at paragraph and sentence breaks for you; in your own code, you'll need to split it yourself. - Numbers and symbols are spelled out:
$4.59is read as "4 dollars and 59 cents." Times and numeric dates are read as written, so the docs suggest writing dates out ("October 23," not "10/23"). - Skipped characters: emoji, bullet characters and markdown markers like
*and#. - Strict options: unsupported settings, such as other formats, speeds or
instructions, return a 400 error rather than being ignored. An unknown voice returns a 400 that lists the available voices. - Speech only: chat, completion and embedding requests to a speech model return a 400.
ollama show phonon and the /api/show endpoint list the model's capability as speech, plus its voices.
Ideas for a small office
- Turn a written policy or a long email into audio you can listen to on a walk.
- Add spoken responses to an internal tool without sending text to a cloud service.
- Read back a draft to catch awkward sentences.
Keep in mind that a local model's privacy depends on how your Ollama server is set up. If you've opened it to your network, reread the network section of the local API guide linked above first.