use case · basics · inside VITS stochastic duration & speaking-rate scaling · q4 WASM · 111.30 MB · CC-BY-NC-4.0

Inside VITS: Stochastic Duration Predictor & Speaking-Rate Acoustic Scaling

Why does the same Akan sentence never sound quite identical twice? Compare 3 independent neural draws from VITS's stochastic duration predictor side-by-side, then inspect 0.70× vs 1.00× vs 1.35× speaking-rate acoustic scaling with measured duration (s), RMS loudness, zero-crossing rate (Hz), and waveform envelopes.

1 · Meta MMS-TTS Akan worker (111.30 MB q4 WASM · auto-inits from cache)

2 · Lab A: Live Stochastic Duration Predictor Comparator (Run #1 vs #2 vs #3)

Runs the exact same Akan input three times sequentially in the FIFO worker. Each pass samples fresh duration & flow noise inside onnx/model_q4.onnx, shifting syllable timing and envelope shape.

Select an Akan test phrase

Prepare Meta MMS-TTS Akan above to compare 3 live stochastic duration draws.

Run #1

Duration: — · RMS: — · ZCR: —

Run #2

Duration: — · RMS: — · ZCR: —

Run #3

Duration: — · RMS: — · ZCR: —

Measured Stochastic Duration Spread (16 kHz PCM)

3 · Lab B: Speaking-Rate Acoustic Scaling (0.70× Slow · 1.00× Native · 1.35× Fast)

Synthesizes one native 1.00× Akan utterance and applies pitch-preserving WSOLA time-scaling off the main thread for 0.70× and 1.35×, measuring duration, RMS energy, and ZCR preservation.

Prepare Meta MMS-TTS Akan above to benchmark speaking-rate acoustic scaling.

0.70× Slow (WSOLA)

Duration: — · RMS: — · ZCR: —

1.00× Native VITS

Duration: — · RMS: — · ZCR: —

1.35× Fast (WSOLA)

Duration: — · RMS: — · ZCR: —

Speaking-Rate Duration Comparison

Show the code — Pitch-preserving WSOLA speaking-rate acoustic scaler