Ollama Introduces Phonon Speech Models for Text-to-Speech
Ollama has introduced Phonon, a family of small, state-of-the-art text-to-speech models developed by Gradium, expanding its capabilities to convert text into speech.
Introduction of Phonon Speech Models in Ollama
Ollama has introduced Phonon, a family of small, state-of-the-art text-to-speech models developed by Gradium. This addition expands Ollama's capabilities to convert text into speech, offering users a new way to interact with AI-generated content. Phonon includes models tailored for specific languages, such as English, French, German, Spanish, and Portuguese, as well as a multilingual variant that supports all five languages. These models are available under the Apache 2.0 license, allowing for broad use and modification. The release of Phonon marks a significant step in making speech synthesis more accessible and efficient for developers and users alike.
Performance and Optimization on Apple Silicon
Speech models in Ollama now support macOS, with Windows and Linux support expected in the future [Ollama]. On Apple Silicon, Ollama leverages MLX, Apple’s machine learning framework, to achieve state-of-the-art throughput [Ollama]. Performance benchmarks on a MacBook Pro with M5 Max show that Ollama is 35% faster than Gradium’s own runtime, the next fastest engine [Ollama]. These optimizations highlight the compatibility and efficiency of Ollama with Apple’s hardware, making it a compelling choice for developers working on Apple platforms.
Accuracy and Comparison with Other Implementations
In comparing Ollama’s speech models to other implementations, the word error rate (WER) is a key metric for evaluating accuracy. According to Ollama, Ollama’s implementation matches the WER of the reference implementation in Hugging Face Transformers, indicating comparable accuracy. This comparison was based on 200 sentences from the Seed-TTS English test set, transcribed using Whisper large-v3, as noted in Ollama. While Ollama’s models demonstrate strong performance in terms of accuracy, it is important to note that the 40M models are released under the CC BY-NC 4.0 license, which restricts their use to noncommercial purposes, as stated in Ollama.
Voice and Language Support in Phonon
The Phonon model in Ollama supports voice and language customization through a variety of options. Users can select from Gradium’s voice catalog by specifying a voice with the --voice flag or via the API, as demonstrated with the command ollama run phonon --voice Hadley "Hello from Ollama.". Language support includes English, French, German, Spanish, Portuguese, and a multilingual variant, with each language corresponding to a specific model variant such as phonon:40m-fr for French. Phonon is released under the Apache 2.0 license, allowing for flexible use and modification. Additionally, Phonon can be integrated with existing OpenAI-compatible code by updating the base URL to use the /v1/audio/speech endpoint. Text is spoken as it is generated, allowing the reply to begin playing after the first sentence. Users can also save audio output to a file using standard redirection, such as ollama run phonon "Save this to a file." > speech.wav.
Integration and Usage with APIs and Tools
Speech models in Ollama can be integrated with APIs and tools through straightforward commands and endpoints. For example, using curl, users can send a request to the /v1/audio/speech endpoint to generate audio from text, specifying the model, voice, and input. The response streams while the audio is generated, allowing playback to start immediately. Audio is returned as WAV by default or as raw 16-bit samples with the response_format set to pcm.Users can also download Ollama 0.40.11 or later and pull the Phonon model using ollama pull phonon. For more details, refer to the Phonon model page, speech documentation, and OpenAI compatibility information. Additionally, Phonon works with the OpenAI-compatible /v1/audio/speech endpoint, meaning existing code using the OpenAI SDK only needs a new base URL to function with Ollama.
Sources and reporting notes
Based on published source material. No independent hands-on testing is claimed.