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