espnet3.systems.esp2_enh.metrics.stoi.STOI
Less than 1 minute
espnet3.systems.esp2_enh.metrics.stoi.STOI
class espnet3.systems.esp2_enh.metrics.stoi.STOI(fs: int = 16000, extended: bool = False)
Bases: MeanScore
Compute mean STOI or ESTOI. Requires: pip install pystoi.
- Parameters:
- fs – Sampling rate in Hz.
- extended – Whether to compute extended STOI (ESTOI). The result is then reported as
ESTOIinstead ofSTOI.
Examples
>>> metric = STOI(fs=16000)
>>> metric.update(ref=["clean.wav"], hyp=["enhanced.wav"])
>>> metric.compute()
{'STOI': 0.937}Initialize STOI scoring with the configured options.
score(reference: Any, estimate: Any) → float
Return the STOI of one utterance, cut to the shorter signal.
