edd8219f5b5766ef9411a0cafc1c728d364c80d8,tests/core/test_augmentation.py,,test_stretch,#,32

Before Change


def test_stretch():
    stretch_factor = .8

    augmented_dataset = augment(dataset, time_stretch=(stretch_factor, stretch_factor))
    aug_item = augmented_dataset[0]
    assert np.allclose(aug_item["mix"].audio_data[1, :], 
        librosa.effects.time_stretch(np.asfortranarray(item["mix"].audio_data[1, :]), stretch_factor))
    for name, source in item["sources"].items():
        assert np.allclose(aug_item["sources"][name].audio_data[1, :], 

After Change


def test_stretch():
    stretch_factor = .8

    augmented = time_stretch(item["mix"], stretch_factor)

    assert np.allclose(augmented.audio_data[1, :], 
            librosa.effects.time_stretch(np.asfortranarray(item["mix"].audio_data[1, :]), stretch_factor))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 8

Instances


Project Name: interactiveaudiolab/nussl
Commit Name: edd8219f5b5766ef9411a0cafc1c728d364c80d8
Time: 2020-05-14
Author: abugler@gmail.com
File Name: tests/core/test_augmentation.py
Class Name:
Method Name: test_stretch


Project Name: interactiveaudiolab/nussl
Commit Name: e6c3eab18602904703510d2e9cf8e5fcd6927253
Time: 2020-04-24
Author: abugler@gmail.com
File Name: tests/core/test_augmentation.py
Class Name:
Method Name: test_stretch


Project Name: interactiveaudiolab/nussl
Commit Name: edd8219f5b5766ef9411a0cafc1c728d364c80d8
Time: 2020-05-14
Author: abugler@gmail.com
File Name: tests/core/test_augmentation.py
Class Name:
Method Name: test_pitch_shift


Project Name: interactiveaudiolab/nussl
Commit Name: e6c3eab18602904703510d2e9cf8e5fcd6927253
Time: 2020-04-24
Author: abugler@gmail.com
File Name: tests/core/test_augmentation.py
Class Name:
Method Name: test_pitch_shift