efc54499191ead69f875877badd3578c60eba7a6,nussl/audio_signal.py,AudioSignal,load_audio_from_file,#AudioSignal#Any#Any#Any#,265

Before Change


             Defaults to 0 seconds

        
        if signal_length is not None and signal_starting_position >= signal_length:
            raise IndexError("signal_starting_position cannot be greater than signal_length!")

        try:
            with audioread.audio_open(os.path.realpath(input_file_path)) as input_file:
                self.sample_rate = input_file.samplerate
                file_length = input_file.duration
                n_ch = input_file.channels

            read_mono = True
            if n_ch != 1:
                read_mono = False

            audio_input, self.sample_rate = librosa.load(input_file_path,
                                                         sr=input_file.samplerate,
                                                         offset=0,
                                                         duration=file_length,

After Change


            with audioread.audio_open(os.path.realpath(input_file_path)) as input_file:
                file_length = input_file.duration

            if offset > file_length:
                raise ValueError("offset is longer than signal!")

            if duration is not None and offset + duration >= file_length:
                warnings.warn("offset + duration are longer than the signal. Reading until end of signal...",
                              UserWarning)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 11

Instances


Project Name: interactiveaudiolab/nussl
Commit Name: efc54499191ead69f875877badd3578c60eba7a6
Time: 2017-02-08
Author: ethanmanilow@gmail.com
File Name: nussl/audio_signal.py
Class Name: AudioSignal
Method Name: load_audio_from_file


Project Name: interactiveaudiolab/nussl
Commit Name: d5f74cc30a8f0a192d5ef8818c6d72c3707c4a97
Time: 2017-02-04
Author: ethanmanilow@gmail.com
File Name: nussl/audio_signal.py
Class Name: AudioSignal
Method Name: load_audio_from_file


Project Name: tgsmith61591/pmdarima
Commit Name: ea36b28c92b4f5f8314707051ee936fd2393bfd5
Time: 2019-11-25
Author: tgsmith61591@gmail.com
File Name: pmdarima/utils/array.py
Class Name:
Method Name: diff_inv