phonon-31m-en

gradium/phonon-31m-en

作者
gradium
任务
语音合成
下载量
120,463
点赞数
141
趋势分
18
许可证
apache-2.0
收录时间
2026/11/4

license: apache-2.0 language:

  • en pipeline_tag: text-to-speech library_name: transformers tags:
  • text-to-speech
  • tts
  • streaming
  • on-device
  • phonon

phonon-31m English

High-quality Text-to-Speech, on your device.

phonon-31m is a text-to-speech model from the Phonon family. It turns text into natural 24 kHz speech in English. It streams audio while it is still generating, and it is small enough to run in a browser tab, on a phone, or on a laptop CPU.

Phonon builds on Pocket TTS and the Mimi codec, developed by Kyutai.

Try it in your browser · All Phonon models · Runtime on GitHub · Python · Browser · Discord

Model details

  • Model type: text-to-speech. A flow-matching transformer predicts audio latents from the text one 80 ms frame at a time, and the Mimi codec's decoder turns them into audio.
  • Parameters: 31M (excluding the audio tokenizer)
  • Weights file: model.q8.gguf, 64.5 MB (8-bit quantized)
  • Languages: English
  • Output: mono, 24 kHz
  • License: Apache 2.0

The Phonon family

ModelParametersq8 weightsLanguagesLicense
phonon-31m-en31m64.5 MBEnglishApache 2.0
phonon-40m-en40m74.6 MBEnglishCC BY-NC 4.0
phonon-40m-fr40m74.6 MBFrenchCC BY-NC 4.0
phonon-40m-de40m74.6 MBGermanCC BY-NC 4.0
phonon-40m-es40m74.6 MBSpanishCC BY-NC 4.0
phonon-40m-pt40m74.6 MBPortugueseCC BY-NC 4.0
phonon-40m-multilingual40m74.6 MBAll 5 languagesCC BY-NC 4.0

All of them run on the same runtime and use the same file layout, so switching models means changing the repo ID.

Quickstart

Every runtime names this model as hf://gradium/phonon-31m-en, and takes lang, which selects how text is normalized (numbers, symbols, dates). This model speaks English, so use en.

Command line

uvx ptts --lang en --quant q8 \
  --voice Easton "Hello from Phonon." -o speech.wav

uvx runs the Python package's command without installing it. The standalone ptts binary from GitHub Releases or Homebrew (brew install gradium-ai/tap/ptts) takes the same flags.

Python

pip install ptts
import ptts

tts = ptts.TTS("hf://gradium/phonon-31m-en", lang="en", quant="q8")
tts.save("speech.wav", "Hello from Phonon.", voice="Easton")

# Or stream: chunks arrive while the rest is still being generated.
with tts.stream("Speech can start playing right away.", voice="Easton") as audio:
    for pcm in audio:
        ...  # float32 chunks at audio.sample_rate

Transformers usage 🤗

Install 🤗 Transformers from source:

pip install git+https://github.com/huggingface/transformers
from huggingface_hub import hf_hub_download
from safetensors.torch import load_file
from transformers import AutoProcessor, GradiumPhononTTSForConditionalGeneration

model_id = "gradium/phonon-31m-en"
processor = AutoProcessor.from_pretrained(model_id, device_map="auto")
model = GradiumPhononTTSForConditionalGeneration.from_pretrained(model_id, device_map="auto")

# Easton (en-us); every voice and its ID: https://huggingface.co/gradium/phonon-voices
voice_path = hf_hub_download("gradium/phonon-voices", "voices/LMDIYE0Oa377Qh6Z.safetensors")
voice = load_file(voice_path)["speaker_wavs"][0].T.float()  # (num_frames, 512)

conversation = [
    {"role": "user", "content": [{"type": "audio"}, {"type": "text", "text": "Hello from Phonon."}]}
]
inputs = processor.apply_chat_template(
    conversation,
    tokenize=True,
    return_dict=True,
    add_generation_prompt=True,
    processor_kwargs={"audio_prompt_latents": [voice]},
).to(model.device)

outputs = model.generate(**inputs)
audio = processor.decode(outputs.audio_latents, outputs.audio_latents_mask)
processor.save_audio(audio, "speech.wav")

This repo's default-voice.safetensors loads the same way. Unlike the runtime, the tokenizer does not spell out numbers, amounts, symbols or addresses, and long text is split with processor.split_text: see the Transformers docs.

Other platforms

PlatformGuide
Python scripts and backendsptts on PyPI · Python guide
Web apps, in the browserphonon-tts on npm · Browser guide
iPhone, iPad and Mac apps (Core ML)Swift guide
Android appsAndroid guide · Snapdragon NPU preview
Android system voice, for TalkBack and every app that uses TextToSpeechAndroid TTS engine
Server with an OpenAI-compatible API (Docker)Server guide
Home AssistantHome Assistant setup
Streaming over WebSocketWebSocket server
Rustptts on crates.io · Rust guide
C and C++ptts.h

Voices

Phonon comes with a catalog of ~100 voices available in the gradium/phonon-voices repo. Instant voice cloning and voice design are available through the Gradium studio.

Benchmarks

Phonon was compared with other open text-to-speech models on three measures, per language:

  • Elo: human preference from blind pairwise listening tests (higher is better).
  • Hard set LLM WER: word error rate on hard sentences full of structured data (numbers, dates, codes, units), scored with an LLM-assisted ASR comparison (lower is better).
  • Seed-TTS LLM WER: the same metric on the Seed-TTS evaluation sentences (lower is better).

In every language, a Phonon model is first on all three measures.

English (US) (Elo from 468 raters, 8,290 votes)

ModelEloHard set LLM WERSeed-TTS LLM WER
phonon-31m-en20981.5%0.51%
phonon-40m-en21172.3%0.45%
phonon-40m-multilingual20972.0%0.48%
Kokoro20433.5%0.45%
Magpie193928%0.46%
NeuTTS20348.7%0.62%

French (Elo from 172 raters, 2,270 votes)

ModelEloHard set LLM WERSeed-TTS LLM WER
phonon-40m-fr20722.4%1.3%
phonon-40m-multilingual20162.7%1.5%
Kokoro15785.5%1.8%
Magpie160830%2.0%
NeuTTS18539.9%2.7%

German (Elo from 168 raters, 2,220 votes)

ModelEloHard set LLM WERSeed-TTS LLM WER
phonon-40m-de20972.2%0.83%
phonon-40m-multilingual20462.9%0.90%
Magpie164029%1.6%
NeuTTS17689.3%2.6%

Spanish (Spain) (Elo from 201 raters, 2,290 votes)

ModelEloHard set LLM WERSeed-TTS LLM WER
phonon-40m-es21032.1%0.85%
phonon-40m-multilingual20762.6%1.0%
Kokoro16293.8%0.93%
Magpie187025%0.92%
NeuTTS177816%5.1%

Portuguese (Brazil) (Elo from 171 raters, 2,000 votes)

ModelEloHard set LLM WERSeed-TTS LLM WER
phonon-40m-pt21442.9%1.1%
phonon-40m-multilingual20483.2%1.1%
Kokoro16334.1%1.3%

Intended use

Phonon is made for applications that speak on the user's device: offline and private assistants, screen readers and other accessibility tools, games, and interactive apps that cannot wait for a cloud round trip. It also runs as a local server with an OpenAI-compatible API and as a voice for Home Assistant.

Limitations

  • The model speaks only the languages above. Text in other languages is read with the wrong pronunciation.
  • Text is normalized before synthesis (numbers, currency, dates, emails and so on), and that step needs the right language. Choose lang to match the text.
  • Very long inputs are split into sentences and spoken one after the other, so prosody does not carry across the whole text.

Responsible use

Do not use Phonon to impersonate a real person, to deceive listeners about who is speaking, or to clone a voice without the speaker's consent. Tell listeners when speech is synthetic where that matters to them.

License

The weights, tokenizer and voices in this repository are released under Apache 2.0, which allows commercial use. The runtime is a separate project, licensed MIT OR Apache-2.0.

内容来源:Hugging Face 模型卡

在 Hugging Face 查看