ZCR and Spectral Centroid in TTS Speech Segmentation

In Text-to-Speech (TTS) front-ends, accurately segmenting voiced sounds from unvoiced sounds is essential for phonetic alignment, prosodic modeling, and pitch contour generation. Zero-Crossing Rate (ZCR) and Spectral Centroid are two complementary, low-latency acoustic metrics used to classify these speech segments. While voiced sounds rely on periodic vocal cord vibrations that produce energy concentrated in lower frequencies, unvoiced sounds are generated by turbulent airflow that yields chaotic, high-frequency energy. By quantifying waveform sign changes and the spectral center of mass, front-end processors can reliably distinguish these sound types to guide downstream acoustic models and vocoders.

Understanding Voiced vs. Unvoiced Speech

Speech signals are fundamentally split into two production mechanisms:

TTS front-ends require an explicit voicing decision to prevent synthesis artifacts, such as predicting a pitch contour where none physically exists.

The Role of Zero-Crossing Rate (ZCR)

The Zero-Crossing Rate measures the frequency at which a digitized audio waveform transitions from positive to negative values, or vice versa, within a given time frame.

Because voiced speech is dominated by the fundamental frequency and its lowest harmonics, the time-domain waveform is relatively smooth and changes polarity at a lower, predictable frequency. Consequently, voiced segments display a low ZCR.

Conversely, unvoiced speech is non-periodic noise containing significant high-frequency components. This erratic, noise-like behavior causes the waveform to cross the zero axis far more frequently within the same frame duration, resulting in a high ZCR. In a TTS front-end, setting dynamic thresholds on ZCR allows the system to quickly flag frames dominated by transient noise and unvoiced consonants.

The Role of Spectral Centroid

While ZCR analyzes the time-domain signal, the Spectral Centroid evaluates the frequency domain. It represents the "center of gravity" of a sound's power spectrum, calculated as the weighted mean of the frequencies present in a given frame.

By tracking the spectral centroid, the TTS front-end distinguishes "bright," noisy phonemes from "dark," resonant phonemes, providing robust support when noise levels complicate pure time-domain analysis.

Integration in TTS Front-Ends

Modern TTS pipelines use ZCR and Spectral Centroid in tandem to perform robust classification:

  1. Fundamental Frequency (\(F_0\)) Masking: Pitch extractors must only operate on voiced segments. Combining low ZCR with a low spectral centroid provides a confident gating mechanism to disable \(F_0\) tracking during unvoiced segments, preventing erratic pitch estimation.
  2. Forced Alignment and Phoneme Segmentation: Before training or inference, front-ends align text to acoustic targets. ZCR and spectral centroid profiles provide clear boundary markers between phoneme transitions, such as moving from a low-centroid vowel to a high-ZCR fricative.
  3. Vocoder Conditioning: Neural and parametric vocoders receive explicit voiced/unvoiced flags or continuous representations derived from these metrics, ensuring the vocoder applies periodic pulse trains to voiced frames and noise-based excitation to unvoiced frames.