889a295c5c4e0c1cf344e49f2020917a410f64d1,nussl/core/augmentation.py,,time_stretch,#,80

Before Change


    audio_data = signal.audio_data

    for row in range(audio_data.shape[0]):
        audio_row = audio_data[row, :]
        if librosa.__version__ > "0.6.2":
            audio_row = np.asfortranarray(audio_row)
        stretched_source.append(librosa.effects.time_stretch(audio_row, stretch_factor))
    stretched_signal = AudioSignal(audio_data_array=np.array(stretched_source), sample_rate=sample_rate)

    return stretched_signal

After Change


    Returns:
        stretched_signal: A copy of the original audio_signal, with augmented sources. 
    
    if not np.issubdtype(type(stretch_factor), np.number) or stretch_factor <= 0:
        raise ValueError("stretch_factor must be a positve scalar")

    sample_rate = audio_signal.sample_rate
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 5

Instances


Project Name: interactiveaudiolab/nussl
Commit Name: 889a295c5c4e0c1cf344e49f2020917a410f64d1
Time: 2020-05-03
Author: abugler@gmail.com
File Name: nussl/core/augmentation.py
Class Name:
Method Name: time_stretch


Project Name: havakv/pycox
Commit Name: 1b3de6b301f962db0271fdad1bbb5036880b7fbc
Time: 2019-10-12
Author: haavard.kvamme@gmail..com
File Name: pycox/preprocessing/label_transforms.py
Class Name: LabTransPCHazard
Method Name: __init__


Project Name: interactiveaudiolab/nussl
Commit Name: ceb4e40c074d2f0d0bde8e97c7b4493971281a9b
Time: 2020-05-14
Author: abugler@gmail.com
File Name: nussl/core/augmentation.py
Class Name:
Method Name: time_stretch


Project Name: havakv/pycox
Commit Name: 1b3de6b301f962db0271fdad1bbb5036880b7fbc
Time: 2019-10-12
Author: haavard.kvamme@gmail..com
File Name: pycox/preprocessing/label_transforms.py
Class Name: LabTransDiscreteTime
Method Name: __init__