SpeechScore / scores /stoi.py
alibabasglab's picture
Update scores/stoi.py
2002509 verified
raw
history blame contribute delete
398 Bytes
from basis import ScoreBasis
class STOI(ScoreBasis):
def __init__(self):
super(STOI, self).__init__(name='STOI')
self.intrusive = False
self.mono = True
def windowed_scoring(self, audios, score_rate):
from pystoi.stoi import stoi
if len(audios) != 2:
return None
return stoi(audios[1], audios[0], score_rate, extended=False)