def test_tempogram_extractor(): audio = AudioStim(join(AUDIO_DIR, 'barber.wav')) ext = TempogramExtractor() df = ext.transform(audio).to_df() assert df.shape == (1221, 388) assert np.isclose(df['onset'][1], 0.04644) assert np.isclose(df['duration'][0], 0.04644) assert np.isclose(df['tempo_1'][0], 0.75708) ext2 = TempogramExtractor(win_length=300) df = ext2.transform(audio).to_df() assert df.shape == (1221, 304) assert np.isclose(df['tempo_1'][2], 0.74917)
def test_tempogram_extractor(): audio = AudioStim(join(AUDIO_DIR, "barber.wav")) ext = TempogramExtractor() df = ext.transform(audio).to_df() assert df.shape == (4882, 386) assert np.isclose(df['onset'][1], 0.01161) assert np.isclose(df['duration'][0], 0.01161) assert np.isclose(df['tempo_1'][0], 0.773760) ext2 = TempogramExtractor(win_length=300) df = ext2.transform(audio).to_df() assert df.shape == (4882, 302) assert np.isclose(df['tempo_1'][2], 0.756967)