1fac747306ceadbf1a01faa82ba2decfe0de059d,pyannote/audio/features/utils.py,,read_audio,#Any#Any#Any#,94

Before Change


        from sphfile import SPHFile
        sph = SPHFile(current_file["audio"])
        y = sph.content
        sample_rate_ = sph.format["sample_rate"]
        if sample_rate is not None and sample_rate_ != sample_rate:
            y = librosa.resample(y, sample_rate_, sample_rate)
        else:
            sample_rate = sample_rate_

After Change


        // 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)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: pyannote/pyannote-audio
Commit Name: 1fac747306ceadbf1a01faa82ba2decfe0de059d
Time: 2018-06-29
Author: bredin@limsi.fr
File Name: pyannote/audio/features/utils.py
Class Name:
Method Name: read_audio


Project Name: oddt/oddt
Commit Name: c9a8472f03e0a71b7a5a762e1f649aeadf80bcfb
Time: 2017-11-30
Author: marta-sd@users.noreply.github.com
File Name: tests/test_pandas.py
Class Name:
Method Name: test_csv


Project Name: eth-cscs/reframe
Commit Name: df68bb766c5dda92b9c48624700234393a49f3e1
Time: 2018-03-23
Author: karakasis@cscs.ch
File Name: unittests/fixtures.py
Class Name:
Method Name: generate_test_config