alibabasglab commited on
Commit
804519a
1 Parent(s): a7e2b53

Update scores/mcd.py

Browse files
Files changed (1) hide show
  1. scores/mcd.py +1 -3
scores/mcd.py CHANGED
@@ -6,8 +6,6 @@ import pyworld
6
  import pysptk
7
  from fastdtw import fastdtw
8
  from scipy.spatial.distance import euclidean
9
- #from scores.helper import calculate_mcd
10
- #from pymcd.mcd import Calculate_MCD
11
  #refer to : https://github.com/chenqi008/pymcd/blob/main/pymcd/mcd.py
12
  class MCD(ScoreBasis):
13
  def __init__(self):
@@ -18,7 +16,7 @@ class MCD(ScoreBasis):
18
 
19
  def windowed_scoring(self, audios, score_rate):
20
  if len(audios) != 2:
21
- raise ValueError('MCD needs a reference and a test signals.')
22
  return self.mcd_toolbox.calculate_mcd(audios[1], audios[0], score_rate)
23
 
24
  # ================================================= #
 
6
  import pysptk
7
  from fastdtw import fastdtw
8
  from scipy.spatial.distance import euclidean
 
 
9
  #refer to : https://github.com/chenqi008/pymcd/blob/main/pymcd/mcd.py
10
  class MCD(ScoreBasis):
11
  def __init__(self):
 
16
 
17
  def windowed_scoring(self, audios, score_rate):
18
  if len(audios) != 2:
19
+ return None
20
  return self.mcd_toolbox.calculate_mcd(audios[1], audios[0], score_rate)
21
 
22
  # ================================================= #