alibabasglab commited on
Commit
e51a96f
·
verified ·
1 Parent(s): 6e44725

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -10,7 +10,11 @@ BATCH_SIZE = 1
10
  device = 0 if torch.cuda.is_available() else "cpu"
11
 
12
  def score(test_file, ref_file, score_list_nis, score_list_is, return_timestamps):
13
- score_list = score_list_nis + score_list_is
 
 
 
 
14
  mySpeechScore = SpeechScore(score_list)
15
  scores = mySpeechScore(test_path=test_file, reference_path=ref_file, window=None, score_rate=16000, return_mean=False)
16
  return scores
 
10
  device = 0 if torch.cuda.is_available() else "cpu"
11
 
12
  def score(test_file, ref_file, score_list_nis, score_list_is, return_timestamps):
13
+ score_list = []
14
+ if score_list_nis is not None:
15
+ score_list += score_list_nis
16
+ if score_list_is is not None:
17
+ score_list += score_list_is
18
  mySpeechScore = SpeechScore(score_list)
19
  scores = mySpeechScore(test_path=test_file, reference_path=ref_file, window=None, score_rate=16000, return_mean=False)
20
  return scores