def test_mfcc_options(): np.random.seed(98765) dummy_input = np.random.rand(512) # with c0 cc = pysptk.mfcc(dummy_input, 12, czero=True) assert len(cc) == 13 # wth c0 + power cc = pysptk.mfcc(dummy_input, 12, czero=True, power=True) assert len(cc) == 14 # with power cc = pysptk.mfcc(dummy_input, 12, power=True) assert len(cc) == 13
def __test(length, order): np.random.seed(98765) dummy_input = np.random.rand(length) cc = pysptk.mfcc(dummy_input, order, czero=True, power=True) assert np.all(np.isfinite(cc))
def __test(n): np.random.seed(98765) dummy_input = np.random.rand(512) pysptk.mfcc(dummy_input, 20, num_filterbanks=n)
def __test(n): np.random.seed(98765) dummy_input = np.random.rand(512) cc = pysptk.mfcc(dummy_input, 20, num_filterbanks=n) assert np.all(np.isfinite(cc))