示例#1
0
 def test_wrong_file(self):
     # ToDo: pesq does not support filenames in the moment
     return
     with self.assertRaisesRegex(
             ChildProcessError,
             r'An error of type 2  \(Reference or Degraded below 1/4 '
             r'second - processing stopped \) occurred during processing.'):
         pesq(__file__, self.deg_path)
示例#2
0
 def test_wb_scores_with_lists_of_arrays_length_one(self):
     scores = pesq(
         [self.ref_array],
         [self.deg_array],
         sample_rate=16000,
     )
     np.testing.assert_allclose(scores, np.asarray([1.083234]), rtol=1e-6)
示例#3
0
 def test_nb_scores_with_lists_of_arrays_length_two(self):
     scores = pesq(
         [self.ref_array, self.ref_array],
         [self.deg_array, self.ref_array],
         sample_rate=16000,
         mode='nb',
     )
     np.testing.assert_allclose(scores, np.asarray([1.607208, 4.548638]))
示例#4
0
 def test_wb_scores_with_paths_directly(self):
     # ToDo: pesq does not support filenames in the moment
     return
     scores = pesq(
         self.ref_path,
         self.deg_path,
         sample_rate=16000,
     )
     np.testing.assert_allclose(scores, np.asarray([1.083]))
示例#5
0
 def test_wb_scores_with_lists_of_paths_length_two(self):
     # ToDo: pesq does not support filenames in the moment
     return
     scores = pesq(
         [self.ref_path, self.ref_path],
         [self.deg_path, self.ref_path],
         sample_rate=16000,
     )
     np.testing.assert_allclose(scores, np.asarray([1.083, 4.644]))
示例#6
0
 def test_nb_scores_with_lists_of_paths_length_one(self):
     # ToDo: pesq does not support filenames in the moment
     return
     scores = pesq(
         [self.ref_path],
         [self.deg_path],
         sample_rate=16000,
         mode='nb',
     )
     np.testing.assert_allclose(scores, np.asarray([1.607]))