跳到正文
实时
Ollama Blog·· 22 天前精选62

Ollama上线语音模型,首发Phonon文本转语音

Speech models in Ollama

要点速览

Ollama新增文本转语音能力,首个接入的语音模型是Gradium的小型TTS模型家族Phonon,目前支持macOS、Windows和Linux,支持即将推出。

Why it matters

原文给出Ollama接入语音模型后的吞吐对比、准确率与OpenAI兼容接口,可据此判断本地TTS的落地方式。

同一件事另外 1 家也报道了

  1. Ollama Blog··首发·当前阅读

    Ollama上线语音模型,首发Phonon文本转语音

  2. IT之家 · AI··+3 天

    Ollama Mac 版新增离线生成 AI 语音:数据不出门,速度比原方案最高快 35%

    新增信息:搭载 M5 Max 芯片的 MacBook Pro 上 Phonon 语音生成速度提升 35%。

按发布时间排列 · 事件后续出现时自动追加 · 由模型根据各家标题与摘要比对

正文 · 原文

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.

ollama run phonon "Hello from Ollama."

    Unedited output from Ollama 0.40.11 on a MacBook Pro with M5 Max.

    Performance on Apple Silicon

    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.

    Throughput

    Times faster than real time

    Measured on a MacBook Pro with M5 Max, generating 45 seconds of speech. Median of 10 runs. Gradium's own runtime, ptts, uses 8-bit weights on the CPU, fp16 on the Neural Engine and f32 on the GPU; Ollama runs the model in bf16.

    Ollama’s implementation is just as accurate, matching the word error rate of the reference implementation in Hugging Face Transformers:

    Accuracy

    Word error rate

    Lower is better. 200 sentences from the Seed-TTS English test set, transcribed with Whisper large-v3.

    Voices

    Choose a voice with --voice, or voice in the API:

    ollama run phonon --voice Hadley "Hello from Ollama."
    

    The voices come from Gradium’s voice catalog. ollama show phonon lists them all.

    Languages

    Model Language
    phonon English
    phonon:40m-fr French
    phonon:40m-de German
    phonon:40m-es Spanish
    phonon:40m-pt Portuguese
    phonon:40m-multilingual All five

    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:

    ollama run gemma4 --hidethinking "Tell me a fun fact about owls in two sentences." | ollama run phonon
    

    Run ollama run phonon with no text to type lines at a prompt, or redirect the output to save a WAV file:

    ollama run phonon "Save this to a file." > speech.wav
    

    API

    Phonon works with the OpenAI-compatible /v1/audio/speech endpoint, so existing code that uses the OpenAI SDK only needs a new base URL.

    curl http://localhost:11434/v1/audio/speech \
      -H "Content-Type: application/json" \
      -d '{
        "model": "phonon",
        "voice": "Zoey",
        "input": "Hello from Ollama."
      }' --output speech.wav

    The response streams while the audio is generated, so it can play right away:

    curl -sN http://localhost:11434/v1/audio/speech \
      -H "Content-Type: application/json" \
      -d '{"model": "phonon", "input": "Playback starts right away."}' \
      | ffplay -nodisp -autoexit -loglevel error -
    

    Audio is 24 kHz mono, returned as WAV by default or as raw 16-bit samples with "response_format": "pcm".

    Get started

    Speech models run on Apple Silicon Macs. Download Ollama 0.40.11 or later, then pull Phonon:

    ollama pull phonon
    

    For more information, see:

    来源: Ollama Blog · ollama.com