Context-Conditioned Quality Judgments for Long-Form Speech

Automatic speech quality metrics judge a sentence as if it were heard alone. People don't listen that way. When a synthetic audiobook or a heavily compressed call runs for minutes, a sentence can be clean on its own and still sound wrong in place. Its pitch may reset where the paragraph should continue, its voice may drift slightly from the previous sentence, or its pacing may break the rhythm that came before. This proposal asks whether that context dependence is large enough to matter. If it is, we build a quality model that scores a target sentence given the preceding 10–20 seconds of audio. The model uses a transformer (a network whose attention layers can link any two moments in a long input) to read the context.

The two-sentence version is this. First, we measure how often listeners' preferences between two renditions of the same sentence change once they hear what came before. Second, we train a pairwise preference model that conditions on that context, and test whether it predicts the changed judgments that sentence-level metrics, which are blind to context by construction, cannot. The first step is a go/no-go test for the whole idea.

Core Claim

Image work has already found a global-structure blind spot in quality metrics. Human Preference Score showed that FID and CLIP reward locally realistic texture while missing anatomical absurdities, and fixed this by fitting a model directly to human A/B choices. We claim speech has a temporal analogue: per-utterance metrics miss incoherence across sentences. We also claim the right fix is a preference model whose input includes the listening history.

Direction 1 supplies the mechanism and suggests the scale of context needed. In Context is all you need?, zero-shot Whisper's word error rate on conversational Austrian German falls from 32.26% to about 26% as preceding context grows to roughly 20 seconds. Context from the other speaker helps as much as context from the same speaker. In contrast, wav2vec2 gains only about 1%, which suggests attention-based models make use of long context where other designs do not. MAEST finds convolutional music taggers plateau at 3–5 s of input while a spectrogram transformer keeps improving up to 30 s. Fujita et al. show speaker rhythm is a property of whole phoneme sequences that frame-level embeddings miss. None of these papers studies perceived quality. Together they suggest the cues listeners might use span many seconds, and that a convolutional evaluator would not see them.

What Exists and Where This Differs

Two transformer-based quality predictors already exist. Mumtaz et al. regress mean opinion score (MOS, the average 1–5 listener rating) from hand-crafted features on 2,075 user-generated clips and report PLCC 0.816. CCATMos stacks convolutions on locally widened frames, adds a transformer over the utterance, and raises average PCC on ConferencingSpeech 2022 from 0.530 to 0.697. Both use self-attention only within the clip being rated; neither conditions on audio outside it.

From Scores to Preferences (MOS-RMBench) supplies our training formulation. It shows that pairwise Bradley–Terry training beats MOS regression, at 80.04% overall pair accuracy. It also documents a "synthetic gap" on neural TTS and explicitly restricts itself to isolated sentences. We reuse its preference loss and its pairs, and we extend its input to include context.

Learned perceptual losses form a third line of work. DPAM and CDPAM learn audio similarity from human judgments with convolutional encoders. Germain et al. use classifier features over roughly 1 s of receptive field. TAAE fine-tunes a codec against WavLM-Large activations. All of these compare a signal with a reference over short windows. Our model is reference-free and conditions on what came before.

Shift-Tolerant Perceptual Similarity acts as a constraint on our design. It found that LPIPS flips its preference ranking 2.81% of the time under 1-pixel shifts that humans mostly cannot see. Our model must not respond the same way to imperceptible changes in pause timing.

Temporal Shift for SER also constrains the design. It shows that emotion classification tolerates temporal misalignment and that attention can be replaced by channel shifting there. That paper itself leaves open whether this holds for quality assessment. We treat this as a reason to test, rather than assume, that attention is needed. A shift-based variant is one of our ablations.

Research Program

The first stage is data. We will build context-swap pairs from contiguous long-form speech. Sources are LibriSpeech audiobook chapters, conversational GRASS recordings, and neural-TTS output in the style of SOMOS. Each item has a preceding context of 0, 5, 10 or 20 s and two renditions, A and B, of the next sentence. The renditions differ along controlled axes:

  • codec degradation, using TAAE, Mimi and DAC at different bitrates;
  • prosodic resets and tempo changes, made by duration and pitch resynthesis;
  • timbre drift, made by partially voice-converting the target;
  • natural variation between independent TTS samples.

Listeners hear the context, then choose between A and B. The same pairs are also judged with no context. The key quantity is the context-flip rate: the fraction of pairs whose majority preference changes when context is added, computed with bootstrap confidence intervals. If this rate falls within the inter-rater noise floor, we stop. In that case the right contribution is a negative result showing sentence-level metrics suffice. For a positive result, we would also want the flips to concentrate on the prosody and timbre axes rather than the codec axis.

The second stage is the model. Frozen WavLM-Large features are extracted from the context $c$ and from each candidate $x$. A small transformer lets the target frames attend to the context frames and outputs a scalar score $s(x \mid c)$. It is trained with

$$P(A \succ B \mid c) = \sigma\big(s(A \mid c) - s(B \mid c)\big),$$

where $\sigma$ is the logistic function. Training data are our context pairs plus the original MOS-RMBench pairs, which have empty context. Including MOS-RMBench means the model keeps its sentence-level competence. Two engineering details matter. TAAE reports LayerNorm blowing up on near-silent input, so we follow its fix of a raised epsilon, since long contexts contain many pauses. We also apply random pause-length jitter during training as a form of shift augmentation.

The third stage closes the loop cheaply, without reinforcement learning. We use the model to rerank N sampled TTS continuations of a passage, then ask listeners whether the reranked passages are preferred over passages chosen by a context-free reranker.

Baselines

The naive reference is the context-free scalar Bradley–Terry model from MOS-RMBench, retrained on our data with an identical WavLM front end. It reports 80.04% overall pair accuracy on MOS-RMBench. That model cannot, by construction, separate pairs whose targets are identical and only the context differs. On the context-sensitive subset it should therefore sit near chance. On MOS-RMBench itself it sets the bar our model must match, within about one point, to show that adding context costs nothing.

The strongest existing transformer evaluator is CCATMos, which reports average PCC 0.697 on ConferencingSpeech 2022. We will run it in two ways. The first is as published. The second gives it the same concatenated context-plus-target audio as input, with its pooled score restricted to target frames. Both versions get the same training pairs, a Bradley–Terry head, and the same hyperparameter search budget as our model, roughly equal GPU-hours and trials. This second setting is the fair "just give the existing model more input" competitor.

For full-reference conditions, CDPAM and PESQ are computed against the clean original sentence. No reported result was found on Lacuna for any of these baselines on context-conditioned pairs, because that test set is new.

Ablations isolate the key ingredient. The first replaces the true context with a length-matched context from a different recording; gains that survive this swap come from extra capacity, not context. The second is a context-length sweep from 0 to 20 s. The third swaps the transformer context encoder for a dilated CNN with a matched parameter count. The fourth uses a parameter-free temporal-shift encoder in the style of Shiftformer.

Beating the baselines means two things. Our model should be significantly more accurate than every baseline on the context-flipped pairs, by a paired bootstrap test. It should also stay within one point of the context-free model on MOS-RMBench.

Why not just…?

Why not just average a sentence-level quality model over every sentence in the passage? Averaging scores each sentence in isolation, so it gives identical scores to a sentence regardless of what preceded it. It therefore fails exactly on the context-flipped pairs. If the context-flip rate turns out to be negligible, this baseline wins and we will say so. That is why the human study comes before any modelling.

Why not just feed longer audio to CCATMos or a WavLM distance? This is the most serious threat, and it is a baseline above rather than something we argue away. Our design differs in how the score is computed: it is restricted to the target and conditioned on the context. Simply widening the window instead mixes context quality into the score. Our shuffled-context ablation is what separates using context as a condition from merely having more input. If extended CCATMos matches our model, the contribution shrinks to the dataset and the measured flip rate. We would report it that way.

Why not just add explicit consistency features, such as speaker-embedding similarity to the previous sentence and pitch-contour continuity? These may capture much of the timbre-drift and prosodic-reset effects. We will train a Bradley–Terry model on these features plus the context-free score, and break down accuracy by degradation axis. Our learned model justifies itself only if it wins on natural TTS variation and conversational GRASS pairs, where no hand-designed feature names the cue. If the features match it everywhere, the cheaper metric is the right recommendation.

Decisive Checks

The first check is human: is the context-flip rate meaningfully above the noise between raters, and does it grow with context up to around 20 s, as the ASR evidence suggests? The second is accuracy on flipped pairs against extended CCATMos and the consistency-feature model, with no regression on MOS-RMBench. The third is a temporal analogue of the shift rank-flip rate: how often the model's preference reverses when pauses are jittered by amounts listeners judge imperceptible. It should be lower than for the WavLM-distance and CDPAM baselines. The fourth is the reranking listening test. These four together tell us whether context-conditioned evaluation reduces the gap between objective scores and what listeners hear in long-form speech, or whether sentence-level metrics were already enough.