SpeechScore / scores /pesq.py
alibabasglab's picture
Update scores/pesq.py
2a60863 verified
raw
history blame
399 Bytes
from basis import ScoreBasis
class PESQ(ScoreBasis):
def __init__(self):
super(PESQ, self).__init__(name='PESQ')
self.intrusive = False
self.mono = True
self.score_rate = 16000
def windowed_scoring(self, audios, rate):
from pesq import pesq
if len(audios) != 2:
return None
return pesq(rate, audios[1], audios[0], 'wb')