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

Before Change


            raise IOError("Cannot read from file, {file}".format(file=input_file_path))

        self.path_to_input_file = input_file_path
        self._active_end = signal_length if signal_length is not None else self._audio_data.shape[self._LEN]
        self._active_start = signal_starting_position

    def load_audio_from_array(self, signal, sample_rate=constants.DEFAULT_SAMPLE_RATE):
        Loads an audio signal from a numpy array. Only accepts float arrays and int arrays of depth 16-bits.

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)

            audio_input, self.sample_rate = librosa.load(input_file_path,
                                                         sr=None,
                                                         offset=offset,
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

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: ANTsX/ANTsPy
Commit Name: 6286ba014120ce05b49302007a0a28feed6d98c4
Time: 2020-09-10
Author: stnava@gmail.com
File Name: ants/segmentation/joint_label_fusion.py
Class Name:
Method Name: joint_label_fusion


Project Name: tgsmith61591/pmdarima
Commit Name: d8a351a4d505d46cdd4713292ee651a6cbc11712
Time: 2019-11-18
Author: tgsmith61591@gmail.com
File Name: pmdarima/arima/arima.py
Class Name: ARIMA
Method Name: predict_in_sample