Spaces:
Running
Running
alibabasglab
commited on
Commit
•
ff0c219
1
Parent(s):
af30408
Update scores/nb_pesq.py
Browse files- scores/nb_pesq.py +3 -3
scores/nb_pesq.py
CHANGED
@@ -8,8 +8,8 @@ class NB_PESQ(ScoreBasis):
|
|
8 |
self.score_rate = 16000
|
9 |
|
10 |
def windowed_scoring(self, audios, score_rate):
|
11 |
-
from
|
12 |
if len(audios) != 2:
|
13 |
-
raise ValueError('
|
14 |
-
return pesq(audios[1], audios[0],
|
15 |
|
|
|
8 |
self.score_rate = 16000
|
9 |
|
10 |
def windowed_scoring(self, audios, score_rate):
|
11 |
+
from pesq import pesq
|
12 |
if len(audios) != 2:
|
13 |
+
raise ValueError('PESQ needs a reference and a test signals.')
|
14 |
+
return pesq(score_rate, audios[1], audios[0], 'nb')
|
15 |
|