AI Logic

Evaluation Metrics

Short-Time Objective Intelligibility (STOI)

Updated:

Computing STOI. Left: the flow of resampling clean and degraded speech to 10 kHz and removing silence, applying the short-time Fourier transform and grouping into 15 one-third-octave bands, extracting envelopes of 30 frames (about 384 ms), normalizing and clipping the degraded side, computing the correlation coefficient d_{j,m}, and averaging. Right: an example of 30 frames in one band with three lines (the clean envelope, the normalized degraded envelope, and the normalized and clipped one), with a correlation of 0.97 without clipping and 0.99 with clipping

Background and overview

STOI (Short-Time Objective Intelligibility) is an evaluation metric that compares clean speech with noisy or denoised speech through the amplitude variation (envelope) in each frequency band, and predicts how easily words can be understood (intelligibility) by averaging correlation coefficients over short segments of about 384 ms. Higher values mean listeners are predicted to recognize more words correctly.

STOI=1JM∑j=1J∑mdj,m\mathrm{STOI} = \frac{1}{JM} \sum_{j=1}^{J} \sum_{m} d_{j,m}

dj,md_{j,m} is the correlation coefficient between the envelopes of clean and degraded speech in the segment at band jj and time mm, JJ is the number of bands (15), and MM is the number of segments.

STOI was proposed by Taal et al. in 2011 in IEEE Transactions on Audio, Speech, and Language Processing. The intelligibility measures of the time (such as the Speech Intelligibility Index, SII, and the Speech Transmission Index, STI) could not predict well the effect of processing that applies different gains for each time and frequency, such as noise reduction. For example, many STI-based measures predict that noise subtraction improves intelligibility, whereas listening experiments show that single-microphone noise reduction usually does not. STOI was designed to agree well with listener results even for speech processed in this way.

The header figure shows the computation flow (left) and an example (right) of normalizing and clipping the degraded side on 30-frame envelopes in one band.

Definition and procedure

STOI is computed as follows. Let xx be the clean speech and yy the degraded speech.

  1. Resample to 10 kHz: resample both to a sampling rate of 10 kHz, which covers the frequency range relevant to intelligibility.
  2. Split into frames and remove silence: split into frames with a 256-sample (25.6 ms) Hann window and 50% overlap. Frames more than 40 dB below the highest-energy frame of the clean speech are removed from both signals, since silent segments do not contribute to intelligibility.
  3. Group into one-third-octave bands: zero-pad each frame to 512 points, apply the discrete Fourier transform, and group the frequency components into 15 one-third-octave bands (center frequencies from 150 Hz to about 4.3 kHz). The amplitude Xj(m)X_j(m) of band jj in frame mm is the square root of the sum of squares of the components in that band.
  4. Extract short-segment envelopes: for each band, form the vector xj,m=[Xj(m−N+1),…,Xj(m)]⊤x_{j,m} = [X_j(m-N+1), \ldots, X_j(m)]^\top of the amplitudes of N=30N = 30 consecutive frames (about 384 ms). Form yj,my_{j,m} for the degraded side in the same way.
  5. Normalize and clip the degraded side: scale yj,my_{j,m} by a constant so that its norm matches the clean side, then clip it so that it does not exceed (1+10−β/20)(1 + 10^{-\beta/20}) times the clean side (β=−15\beta = -15 dB).
yˉj,m(n)=min⁡(∥xj,m∥∥yj,m∥yj,m(n), (1+10−β/20)xj,m(n))\bar{y}_{j,m}(n) = \min\left( \frac{\lVert x_{j,m} \rVert}{\lVert y_{j,m} \rVert} y_{j,m}(n), \ \left(1 + 10^{-\beta/20}\right) x_{j,m}(n) \right)
  1. Compute the correlation coefficient: the correlation coefficient of the two mean-subtracted vectors is the intermediate intelligibility dj,md_{j,m}.
dj,m=(xj,m−μxj,m)⊤(yˉj,m−μyˉj,m)∥xj,m−μxj,m∥ ∥yˉj,m−μyˉj,m∥d_{j,m} = \frac{(x_{j,m} - \mu_{x_{j,m}})^\top (\bar{y}_{j,m} - \mu_{\bar{y}_{j,m}})}{\lVert x_{j,m} - \mu_{x_{j,m}} \rVert \, \lVert \bar{y}_{j,m} - \mu_{\bar{y}_{j,m}} \rVert}
  1. Average: STOI is the mean of dj,md_{j,m} over all bands and segments (the formula at the top).

Normalization cancels overall level differences that have little effect on intelligibility, such as differences in playback volume. Clipping keeps time-frequency regions that are already completely unintelligible from lowering the prediction too much when they degrade further. In the header figure's example, noise remains in the segments without speech (frames 1–3, 12–18, and 28–30), but clipping suppresses its effect, raising the correlation from 0.97 to 0.99.

STOI takes correlations over segments of about 384 ms because tens of milliseconds is too short and a whole sentence is too long. According to the paper, removing amplitude modulations slower than 2–3 Hz does not affect intelligibility, so a window of about 300–500 ms, in which faster modulations are visible, is appropriate. Taking a single correlation over a whole sentence, on the other hand, lets a few high-amplitude segments dominate the value. With N=30N = 30, STOI responds to amplitude modulations of 2.6 Hz and above.

What it measures and its limitations

STOI measures whether the temporal rise and fall of amplitude (the envelope) in each band of speech is preserved as in the clean speech. It is based on the finding that these envelope variations are important for distinguishing words. Because it ignores the fine shape of the waveform (phase), it predicts high intelligibility as long as the envelope is preserved, even if the timbre has been altered artificially.

It has the following limitations.

  • Does not output the fraction of recognized words itself: STOI aims at a monotonic relation with intelligibility; the value itself is not a word accuracy. In the paper, a logistic function fitted to the experimental results was used to map it to word accuracy, and this mapping differed between speech materials (closed-vocabulary sentences or free sentences).
  • Does not measure quality: it predicts whether words can be understood; whether speech is pleasant to hear (quality) is measured separately with PESQ or MOS.
  • Ignores the hearing threshold: it does not include the absolute threshold (the quietest sound audible in a quiet place), so the paper notes that predictions may be wrong for processing that strongly lowers band levels without changing envelopes much (such as low-pass or high-pass filters). For reverberation, too, the paper cites reports that a similar correlation-based measure could not predict it, and says STOI may behave the same.
  • Requires a clean reference: it compares against reference speech (full reference), so it cannot be used for recordings without ground-truth speech.

STOI cannot be computed unless at least 30 frames (about 0.4 s) of speech remain after silence removal. The widely used pystoi implementation issues a warning and returns the value 1e-5 when there are too few, so averaging short utterances as they are drags the overall value down unnaturally. Check utterance lengths and the fraction of silence before evaluating.

Validation in the original paper

The paper compared STOI with the results of three listening experiments on noisy speech with time-frequency gains applied. All of them use the fraction of words that listeners recognized correctly as intelligibility.

ExperimentProcessingListenersCorrelation ρStd. dev. of prediction error
Ideal time-frequency segregationApply ideal binary masks to noisy speech15 Danish0.969%
Single-microphone noise reductionTwo noise reduction methods (and no processing)15 Danish0.927.7%
Ideal masks with errorsDeliberately introduce errors into the masks7 English0.967.1%

The correlation coefficients and standard deviations are computed on STOI mapped to word accuracy with a logistic function.

The main results are as follows.

  • It correctly predicted the effect of noise reduction: in the second experiment, noise reduction did not significantly change listeners' intelligibility, and STOI also predicted nearly the same intelligibility before and after processing. Many STI-based measures wrongly predict an improvement here.
  • It outperformed five other measures: compared with Dau's auditory model, coherence SII (CSII), normalized-covariance-based STI (CSTI), frequency-weighted segmental SNR (FWS), and normalized subband envelope correlation (NSEC), STOI gave the best results on average over the three experiments in correlation, Kendall's τ, and prediction error. Per experiment, CSII was comparable in the noise reduction experiment, and Dau's model was slightly better in the experiment with mask errors.
  • Segment length mattered: varying the segment length NN and the clipping β\beta in the first experiment gave the highest correlation at N=30N = 30 and β=−15\beta = -15 dB, and segment length had a larger effect on the results than clipping. These two values were chosen using only the first experiment and applied unchanged to the other two.

Where it is used

STOI is mainly used in the following situations.

  • Evaluating speech enhancement (noise reduction): it predicts whether denoised speech has become easier to understand. It is commonly reported alongside PESQ for quality and SI-SDR for waveform distortion. Kolbæk et al. (2018) describe STOI as one of the most commonly used intelligibility estimators in speech enhancement evaluation.
  • Evaluating speech separation and hearing aids: it predicts the intelligibility of speech processed per time and frequency, as with ideal binary masks, or by hearing aids and cochlear implants. According to Kolbæk et al., good predictions have also been reported for Danish, Dutch, and Mandarin Chinese.
  • As a training target: some studies use a quantity close to STOI (envelope correlation) as the training objective. However, according to Kolbæk et al., networks trained to maximize STOI achieved no or only slight STOI gains over networks trained with the mean squared error (MSE) of the amplitude spectrum.

Comparison with similar metrics

The table compares four metrics of speech quality and intelligibility from the same viewpoints.

MetricReference speechWhat it measuresRange and directionHow it is computed
SI-SDRRequired (full reference)Waveform distortion (energy ratio of the target component to everything else)dB, no upper bound; higher is betterInner products and energy
PESQRequired (full reference)Perceived quality (degradation as heard over a telephone)Raw value −0.5–4.5, about 1.0–4.6 when mapped to MOS-LQO; higher is betterCompared through an auditory model
STOIRequired (full reference)Intelligibility (whether words can be understood)−1–1 in theory, almost always 0–1 in practice; higher is betterCorrelation of envelopes in short segments
MOSNot required (for ACR, where listeners rate one sample at a time)Subjective quality (impression of human listeners)1–5; higher is betterMean of listeners' ratings

Rough guidelines for choosing:

  • Checking whether noise reduction or separation made words understandable: use STOI. Combined with PESQ for quality, it distinguishes "understandable but bad-sounding" from "clean-sounding but with garbled words".
  • Intelligibility under noise with strongly fluctuating level (modulated noise): the extended version ESTOI (Jensen and Taal, 2016) exists for this. In torchmetrics it can be computed with extended=True.
  • Degradation mainly from low- or high-cut filters or reverberation: STOI's predictions may be off, so confirm with an intelligibility test with listeners.
  • Final decisions: STOI is only a prediction, so for decisive claims in products or papers, run tests with recruited listeners (word accuracy for intelligibility, MOS for quality).

PyTorch example

Show code
python
import torch
from torchmetrics.audio import ShortTimeObjectiveIntelligibility

# torchmetrics STOI calls pystoi internally on the CPU (requires pip install pystoi).
# Pass the input's actual sampling rate as fs. pystoi resamples to 10 kHz internally before computing,
# so 16 kHz or 48 kHz waveforms can be passed as is (unlike PESQ, which accepts only 8k/16k).
# extended=True computes the extended version, ESTOI (Jensen & Taal 2016).
stoi = ShortTimeObjectiveIntelligibility(fs=16000, extended=False)

model.eval()
with torch.no_grad():
  enhanced = model(noisy)            # (batch, time), 16 kHz waveform
print(stoi(enhanced, clean))         # arguments in the order (speech to evaluate, reference); batch mean
print(stoi(noisy, clean))            # comparing with the unprocessed input gives the improvement

# When using pystoi directly, the argument order is (reference, speech to evaluate, fs), the reverse of torchmetrics.
# If fewer than 30 frames (about 0.4 s) remain after silence removal, it warns and returns 1e-5
from pystoi import stoi as pystoi_stoi

score = pystoi_stoi(clean[0].numpy(), enhanced[0].numpy(), 16000, extended=False)


def intermediate_intelligibility(x, y, beta=-15.0, eps=1e-8):
  """Eqs. (3) and (5) of the paper: x and y are envelopes of shape (band, 30) (one-third-octave band amplitudes over 30 frames).
  Returns the per-band correlation coefficient d_{j,m}."""
  y = y * x.norm(dim=-1, keepdim=True) / (y.norm(dim=-1, keepdim=True) + eps)  # normalize
  y = torch.minimum(y, (1 + 10 ** (-beta / 20)) * x)                            # clip
  x = x - x.mean(-1, keepdim=True)
  y = y - y.mean(-1, keepdim=True)
  return (x * y).sum(-1) / (x.norm(dim=-1) * y.norm(dim=-1) + eps)

FAQ

Q. What is the range of STOI values?
A.

As a mean of correlation coefficients, it ranges from −1 to 1 in theory. For real speech it falls almost entirely within 0–1, and approaches 1 for clean speech compared with itself. The value is not word accuracy itself but a quantity monotonically related to it. Converting it to word accuracy requires a mapping fitted to a listening experiment.

Q. Can 16 kHz audio be used as is?
A.

Yes. STOI is defined at 10 kHz, and pystoi (and torchmetrics, which calls it) resamples internally to 10 kHz from the given fs. Pass the true sampling rate of the input as fs. This differs from PESQ, which accepts only 8 kHz or 16 kHz.

Q. Should STOI or PESQ be reported?
A.

Reporting both is common. STOI predicts whether words can be understood (intelligibility) and PESQ predicts perceived quality; they measure different properties. Noise reduction can raise quality without raising intelligibility, and in the paper's experiment single-microphone noise reduction did not significantly change intelligibility.

References

  1. Taal, C. H., Hendriks, R. C., Heusdens, R., & Jensen, J. (2011). An Algorithm for Intelligibility Prediction of Time–Frequency Weighted Noisy Speech. IEEE Transactions on Audio, Speech, and Language Processing, 19(7), 2125–2136.
  2. Kolbæk, M., Tan, Z.-H., & Jensen, J. (2018). On the Relationship Between Short-Time Objective Intelligibility and Short-Time Spectral-Amplitude Mean-Square Error for Speech Enhancement. arXiv:1806.08404.
  3. pystoi (Python implementation of STOI, GitHub repository).
  4. Lightning AI. torchmetrics.audio.ShortTimeObjectiveIntelligibility (API reference).