b0a78567606a3ff24437501fc83239181b9478b3,pyannote/audio/features/utils.py,,read_audio,#Any#Any#Any#,91
Before Change
// sphere files
if current_file["audio"][-4:] == ".sph":
// dump sphere file to a temporary wav file
// and load it from here...
from sphfile import SPHFile
sph = SPHFile(current_file["audio"])
with tempfile.NamedTemporaryFile() as f:
sph.write_wav(f.name)
y, sample_rate = librosa.load(f.name, sr=sample_rate, mono=False)
// all other files
else:
y, sample_rate = librosa.load(current_file["audio"],
sr=sample_rate,
mono=False)
// reshape mono files to (1, n) [was (n, )]
if y.ndim == 1:
y = y.reshape(1, -1)
// extract specific channel if requested
After Change
// resample if sample rates mismatch
if file_sample_rate != sample_rate:
y = librosa .core.resample(y.T, file_sample_rate, sample_rate).T
return y, sample_rate
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 4
Instances Project Name: pyannote/pyannote-audio
Commit Name: b0a78567606a3ff24437501fc83239181b9478b3
Time: 2019-02-28
Author: pavel.korshunov@idiap.ch
File Name: pyannote/audio/features/utils.py
Class Name:
Method Name: read_audio
Project Name: explosion/thinc
Commit Name: 0060663ebd15bc010175c5a75b214375c6698190
Time: 2016-08-23
Author: honnibal+gh@gmail.com
File Name: examples/mnist.py
Class Name:
Method Name: get_new_model
Project Name: librosa/librosa
Commit Name: 1e9620fa64dc13a2571c0ce39b7429580173410f
Time: 2013-02-11
Author: brm2132@columbia.edu
File Name: librosa/beat.py
Class Name:
Method Name: beat_track
Project Name: f90/Wave-U-Net
Commit Name: 93298920990d3c51d6257ec85fa7691cc0fabaaf
Time: 2019-02-03
Author: daniel@dstoller.net
File Name: Utils.py
Class Name:
Method Name: resample