def test_mfcc(self): path = get_file_path("sample.wav") y = audioread(path)[0] y_filtered = transform.mfcc(y) tc.assert_equal(y_filtered.shape, (291, 13)) tc.assert_isreal(y_filtered)
def test_mfcc(self): path = get_file_path("sample.wav") y = audioread(path)[0] yFilterd = transform.ssc(y) tc.assert_equal(yFilterd.shape, (294, 26)) tc.assert_isreal(yFilterd)
def test_fbank(self): path = get_file_path("sample.wav") y = audioread(path)[0] feature = transform.fbank(y) tc.assert_equal(feature.shape, (240, 23)) tc.assert_isreal(feature) tc.assert_array_greater_equal(feature, 0)
def setUp(self): path = get_file_path("sample.wav") self.x = audioread(path)[0]
def test_write_read_int(self): audiowrite((signal*int16_max).astype(numpy.int), path, threaded=False) read_data = audioread(path)[0] nptest.assert_almost_equal(signal, read_data, decimal=3)
def test_write_read_float(self): audiowrite(signal, path, threaded=False) read_data = audioread(path)[0] nptest.assert_almost_equal(signal, read_data, decimal=3)