985496146dd1ebdc3a43ac921de627c6b61b5200,audio.py,,load_wav,#,10
Before Change
def load_wav(path):
return librosa.core.load(path, sr=hparams.sample_rate)[0]
def save_wav(wav, path):
wav *= 32767 / max(0.01, np.max(np.abs(wav)))
After Change
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
def save_wav(wav, path):
wav *= 32767 / max(0.01, np.max(np.abs(wav)))
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
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: PyMVPA/PyMVPA
Commit Name: 4330f71451565d329e73304df45dacb9470261e4
Time: 2014-11-24
Author: michael.hanke@gmail.com
File Name: mvpa2/datasets/sources/openfmri.py
Class Name: OpenFMRIDataset
Method Name: get_anatomy_image
Project Name: ellisdg/3DUnetCNN
Commit Name: a48b055a628bfa648a0b5a371838848e997440e2
Time: 2017-05-17
Author: david.ellis@unmc.edu
File Name: unet3d/normalize.py
Class Name:
Method Name: get_complete_foreground