Speech models in Ollama
Ollama can now turn text into speech. The first speech model is Phonon, a family of small, state-of-the-art text-to-speech models from Gradium. Speech models are now available for macOS, with Windows and Linux support coming soon.
On Apple Silicon, Ollama is accelerated by MLX, Apple’s machine learning framework, for state-of-the-art throughput. On a MacBook Pro with M5 Max, Ollama was 35% faster than the next fastest engine, Gradium’s own runtime.
Ollama’s implementation is just as accurate, matching the word error rate of the reference implementation in Hugging Face Transformers:
Choose a voice with --voice, or voice in the API:
The voices come from Gradium’s voice catalog. ollama show phonon lists them all.
phonon is released under Apache 2.0. The 40M models are released under CC BY-NC 4.0, which limits them to noncommercial use.
Pipe a chat model’s reply into Phonon. Text is spoken as it arrives, so the reply starts playing after its first sentence:
Run ollama run phonon with no text to type lines at a prompt, or redirect the output to save a WAV file:
Phonon works with the OpenAI-compatible /v1/audio/speech endpoint, so existing code that uses the OpenAI SDK only needs a new base URL.
The response streams while the audio is generated, so it can play right away:
Audio is 24 kHz mono, returned as WAV by default or as raw 16-bit samples with "response_format": "pcm".
Speech models run on Apple Silicon Macs. Download Ollama 0.40.11 or later, then pull Phonon: