Web Asset House Guides
Local AI

Text-to-Speech With Ollama: Phonon Voices, Saving WAV Files and the /v1/audio/speech API

By Web Asset House Studio ·

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 phonon for 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 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

ollama show phonon and the /api/show endpoint list the model's capability as speech, plus its voices.

Ideas for a small office

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.

Related guides

Sources

← All Local AI guides · All guides