985496146dd1ebdc3a43ac921de627c6b61b5200,audio.py,,load_wav,#Any#,10

Before Change




def load_wav(path):
    return librosa.core.load(path, sr=hparams.sample_rate)[0]


def save_wav(wav, path):

After Change


    sr, x = wavfile.read(path)
    signed_int16_max = 2**15
    if x.dtype == np.int16:
        x = x.astype(np.float32) / signed_int16_max
    if sr != hparams.sample_rate:
        x = librosa.resample(x, sr, hparams.sample_rate)
    x = np.clip(x, -1.0, 1.0)
    return x
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: r9y9/wavenet_vocoder
Commit Name: 985496146dd1ebdc3a43ac921de627c6b61b5200
Time: 2019-08-25
Author: zryuichi@gmail.com
File Name: audio.py
Class Name:
Method Name: load_wav


Project Name: dPys/PyNets
Commit Name: e4a36f3215735f8c351beb8f27edeb02eabb121f
Time: 2019-11-04
Author: dpisner@utexas.edu
File Name: pynets/dmri/track.py
Class Name:
Method Name: prep_tissues


Project Name: SeanNaren/deepspeech.pytorch
Commit Name: b8e34cc75b5b655faeab651a8070c068da32c319
Time: 2019-07-25
Author: sean.narenthiran@digitalreasoning.com
File Name: data/data_loader.py
Class Name:
Method Name: load_audio