espnet3.systems.esp2_enh.metrics.pesq.PESQ
Less than 1 minute
espnet3.systems.esp2_enh.metrics.pesq.PESQ
class espnet3.systems.esp2_enh.metrics.pesq.PESQ(fs: int = 16000)
Bases: MeanScore
Compute mean PESQ. Requires: pip install pesq.
Wide-band PESQ at 16 kHz, narrow-band at 8 kHz.
- Parameters:fs – Sampling rate. Must be 8000 or 16000 Hz.
Examples
>>> metric = PESQ(fs=16000)
>>> metric.update(ref=["clean.wav"], hyp=["enhanced.wav"])
>>> metric.compute()
{'PESQ': 2.551}Initialize PESQ scoring at the given sample rate.
outputs : ClassVar[Tuple[Field, ...]] = (Field(name='PESQ', kind='number', label='Pesq', optional=False, channels=None),)
one Field per key of the result dict, all of kind number. Same class-attribute-or-self choice as inputs.
- Type: What this metric returns
score(reference: Any, estimate: Any) → float
Return the PESQ of one utterance, cut to the shorter signal.
