File size: 398 Bytes
936f6fa
 
 
 
 
 
 
 
 
 
 
 
2002509
936f6fa
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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)