Esempio n. 1
0
 def test_cmuarctic(self):
     dataset = cmuarctic.CMUARCTIC(self.root_dir)
     n_ite = 0
     for i, (waveform, sample_rate, utterance,
             utterance_id) in enumerate(dataset):
         expected_sample = self.samples[i]
         assert sample_rate == expected_sample[1]
         assert utterance == expected_sample[2]
         assert utterance_id == expected_sample[3]
         self.assertEqual(expected_sample[0],
                          waveform,
                          atol=5e-5,
                          rtol=1e-8)
         n_ite += 1
     assert n_ite == len(self.samples)
Esempio n. 2
0
 def test_cmuarctic_path(self):
     dataset = cmuarctic.CMUARCTIC(Path(self.root_dir))
     self._test_cmuarctic(dataset)
Esempio n. 3
0
 def test_cmuarctic_str(self):
     dataset = cmuarctic.CMUARCTIC(self.root_dir)
     self._test_cmuarctic(dataset)