DEV Community

Shivam Dwivedi
Shivam Dwivedi

Posted on Fully Autonomous

My first Phonon WAV, with the model and language pinned

speech.wav was the first useful result: a mono PCM file containing 44,160 samples at 24,000 Hz. That works out to 1.84 seconds of audio for “Hello from Phonon.”

I generated it with Phonon's public English checkpoint on CPU. Getting that file is a more useful starting point for me than borrowing a leaderboard latency number from a different machine.

Waveform of the generated Hello from Phonon clip, with seconds on the horizontal axis and normalized PCM amplitude on the vertical axis.

Actual generated samples. The plot shows the resulting audio, not synthesis speed or a speech-quality score. Image by the author.

Listen to the generated WAV.

The new Hugging Face write-up revisits Phonon's recent release and its integration options. [1] The model was already available before that article; this walkthrough checks one concrete route from the published tooling to a file.

Pin the tool and the checkpoint

I used ptts 0.6.0 and the phonon-31m-en checkpoint at revision 92741c5b07d085ff840e26fea8ce43110b87852f. The runtime's Python package wraps its native implementation; this route does not require installing PyTorch. [2]

You need uv, a Python version supported by the published wheel, and a supported CPU platform. The first run needs access to the public model files. In a new working directory, this was my literal command:

uvx --from ptts==0.6.0 ptts --lang en --device cpu --seed 13 \
  --model hf://gradium/phonon-31m-en@92741c5b07d085ff840e26fea8ce43110b87852f \
  'Hello from Phonon.' -o speech.wav
Enter fullscreen mode Exit fullscreen mode

It returned:

wrote speech.wav (1.84s)
Enter fullscreen mode Exit fullscreen mode

That final number is the duration of the generated clip. It is not the time the command spent generating it. The model download and loading step also belong outside any claim about time to first audio.

I used the checkpoint's default voice. There was no voice cloning, account creation or hosted inference request in this check.

The language flag does real work

I also tried the command without --lang. It exited with status 2 before synthesis and asked for a language.

The CLI normalizes text before tokenization, so it requires an explicit language or none to skip that step. Its help lists normalization languages; that list should not be read as a promise that every checkpoint speaks all of them. [2] The checkpoint here is specifically the English model.

The model card lists Apache-2.0 for this English checkpoint. [3] The Phonon family includes other checkpoints with different licences. Check the particular files you plan to ship rather than carrying one model's label across the family.

Inspect the file before building around it

Here is the standard-library check I ran from the directory containing speech.wav:

import wave

with wave.open('speech.wav', 'rb') as audio:
    channels = audio.getnchannels()
    rate = audio.getframerate()
    frames = audio.getnframes()
    print('channels:', channels)
    print('sample rate:', rate)
    print('frames:', frames)
    print('seconds:', frames / rate)
    assert channels == 1 and rate == 24000
Enter fullscreen mode Exit fullscreen mode

It printed:

channels: 1
sample rate: 24000
frames: 44160
seconds: 1.84
Enter fullscreen mode Exit fullscreen mode

I also checked that the PCM samples were not all zero. A readable, non-silent WAV confirms the basic output path; it doesn't establish intelligibility, pronunciation quality or a model ranking.

The first command populated the model cache. I then ran the same text and seed with the cached checkpoint directory passed directly as the model location, and that local-folder run completed too. I did not disable the machine's network, so this is not a network-isolation test.

Dishant's Phonon TTS: 64 MB, Six Milliseconds, One Licence Trap raises the useful packaging question: which checkpoint and supporting files are actually being deployed? [4] I kept this run to one public English checkpoint and verified the resulting file. The next integration decision should follow your application: save a whole clip, or consume a stream as audio becomes available. This command checks the file path.

References

  1. Gradium and Hugging Face contributors, A Closer Look at Phonon TTS.
  2. Gradium, ptts runtime and integration documentation, and ptts 0.6.0 on PyPI.
  3. Gradium, the pinned English checkpoint.
  4. Dishant, Phonon TTS: 64 MB, Six Milliseconds, One Licence Trap. Third-party latency claims were not reproduced here.

Asset credits

Original waveform of the generated clip. Speech was synthesized with Gradium's public Phonon English checkpoint and its default voice from the stated input text; the linked WAV is AI-generated audio. No person's recording was supplied or cloned.

AI disclosure

AI was used to draft the article.

Top comments (0)