Skip to content

TTS v1.2.0 — A More Natural Voice

Choose a tag to compare

@izuc izuc released this 17 Nov 04:36
· 2 commits to main since this release

TTS v1.2.0 (tts.computer)

A more natural voice. The consonants and the two default voices were fitted to how real speakers make each sound, measured sound by sound against two readers. Still a single self-contained WebAssembly file (tts.wasm): zero external WASM imports, zero models, zero audio samples, with the complete JavaScript TTS SDK embedded inside it.

Held-out CMU Arctic sentences (male / female) v1.0 v1.1 v1.2 Human recordings
Phoneme error rate 9% / 8% 8% / 8% 7% / 7% 8–10%
Predicted naturalness (UTMOS, 1–5) 3.55 / 3.59 3.61 / 3.63 3.78 / 3.78 4.3

On 30 newly written sentences that none of the work had seen, the step from v1.1 is +0.17 / +0.09 naturalness, with the male voice's phoneme error rate down from 8.7% to 6.7% and the female voice's unchanged at 6.9%.

What's New

  • Sharper upper formants. The second and third resonances of every sound are narrower, more so in the male voice, so the formants stand out of the spectrum as a real voice's do. The largest single gain.
  • The "th" of the, that, this after a pause or a consonant is a soft stop — silent for most of its length, the voice setting in at the release — instead of a buzzing fricative. Both readers make it that way.
  • /z/ really loses its voice before a pause or another consonant. The rule existed, but the voice bar kept buzzing through it.
  • Dark /l/ before vowels (lazy, blue), as American speakers have it: its second formant was 450 Hz too high.
  • /u/ after t d n s sh ch j y (too, do, new, you) starts with the tongue still forward and glides back, and these words are misheard less often.
  • Less hiss in /v/ and /f/, and an /h/ between voiced sounds that keeps the voice going (male voice).
  • Default voices: tract length 17.0 cm (male, was 17.5) and 14.2 cm (female, was 13.9), closer to the readers' formants.

How it was found

The naturalness predictor judges a whole sentence and cannot say where a fault lies, so the new tools/phones.py looks inside the sounds: the level through every consonant, and the formants of every vowel and glide, in two readers and in the synthesizer on the same sentences. Where both readers differed from the synthesizer in the same way, the rule was changed — and kept only if the predictor and a phoneme recogniser both agreed. Several changes that were faithful to the readers were not kept: unreleased stops before consonants cost intelligibility, louder nasals cost naturalness.

Known weak spots that remain: /h/ in the female voice, sentences heavy in the vowels of good and go and in /d b j/, and long sentences.

Upgrading from v1.1.0

  • The API is unchanged.
  • The same text does not produce the same samples as v1.1.0, and the default male and female voices have a slightly different colour (sharper formants, new tract lengths). Set tractLengthCm to 17.5 or 13.9 to move back toward the old one.
  • Singing with the singer voices (soprano, alto, tenor, baritone, bass_singer) is sample-for-sample what it was in v1.1.0; sung vowels keep their earlier resonance widths. Laughs and other vocal sounds are made by the same voices as speech, so they take on the new colour too.

Release Assets

  • tts.wasm — standalone self-contained WebAssembly binary (~1.9 MB, ~620 KB gzipped) with internal JS TTS glue (tts_glue_ptr / tts_glue_len) and raw C-ABI exports
  • tts.js — optional ES module loader (import init, { TTS } from "./tts.js")
  • tts.d.ts — full TypeScript declarations
  • tts-demo-site.zip — the demo studio as an upload-ready static site

4-Line Single-File HTML Embed (tts.wasm only)

<script type="module">
  const { instance: { exports: w } } = await WebAssembly.instantiateStreaming(fetch("./tts.wasm"));
  const { TTS } = Function("wasm", new TextDecoder().decode(new Uint8Array(w.memory.buffer, w.tts_glue_ptr(), w.tts_glue_len())))(w);

  const voice = new TTS();
  await voice.play("Hello from tts.computer!");
</script>

Full changelog: v1.1.0...v1.2.0