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.