In this article
RTF comparisons must preserve the audio-duration definition and the processing time included in the numerator.
The comparison being tested
A speech benchmark reports synthesis wall time divided by output audio duration. One pipeline measures the raw waveform; another removes leading and trailing silence before computing duration. Their RTF values can differ even if synthesis took the same time and produced the same samples. The ratio has changed its denominator, so the difference cannot automatically be attributed to faster generation.
The confounding mechanism
Librosa’s trim documentation defines silence relative to a reference level and returns the retained source interval. Threshold, analysis framing and channel aggregation affect that interval. The default relative reference can leave uniformly silent audio untrimmed, so the operation is not a speech detector or quality certificate. Shortening the denominator while holding synthesis time fixed increases RTF; added silent padding can make it look smaller.
Fix the experimental contract
Define whether duration means raw generated samples, delivered postprocessed audio or a separately identified active-speech interval. Preserve sample rate, channel handling, trimming parameters and the exact representation used. Define the numerator too: generation-only time and generation-plus-trimming time answer different questions. A duration function given a file path may read a different representation from the waveform currently held in memory.
A step-by-step comparison
First retain the raw waveform and synthesis interval for a fixed set of requests. Compute its duration from the declared samples and rate. Apply the frozen trimming rule, keeping returned indices and processing duration. Report raw and delivered ratios separately. Use a control that changes only silent padding on an already generated waveform; it should alter the relevant duration without being labeled a model-speed improvement.
Evidence required for the result
The evidence package should include source and retained sample ranges, rates, generation time, trimming time and failed or silent outputs. Listen or apply an appropriate quality review to examples where trimming removes meaningful low-energy content; a numerical threshold cannot establish speech preservation. Acceptance requires that both candidates use the same duration convention and that any difference in delivered content remains visible.
Interpretation and limits
RTF alone does not establish first-audio delay, playback continuity or concurrent serving capacity. A legitimate application may prefer trimmed delivery, but that is a postprocessing contract with its own quality and timing consequences. This protocol does not synthesize speech or measure acceleration. It makes a ratio interpretable by keeping the numerator, denominator and content transformation attached to the reported result.
Primary references and related reading
RTF comparisons must preserve the audio-duration definition and the processing time included in the numerator. librosa silence trimming contract; librosa audio duration inputs.
The proposed investigation of silence trimming rtf denominator is not an executed deployment benchmark. Related reading: Ming TTS on MLX: real-time factor, fused kernels and local API limits; Neural audio codecs turn waveforms into discrete generation targets.
Earn rental income from GPUs
Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.