msaf/base.py
def _compute_all_features(self):
        """Computes all the features (beatsync, framesync) from the audio."""
        # Read actual audio waveform
        self._audio, _ = librosa.load(self.file_struct.audio_file,
                                      sr=self.sr)

        # Get duration of audio file
        self.dur = len(self._audio) / float(self.sr)

        # Compute actual features
        self._framesync_features = self.compute_features()

        # Compute framesync times
        self._compute_framesync_times()

        # Compute/Read beats
        self._est_beats_times, self._est_beats_frames = self.estimate_beats()
        self._ann_beats_times, self._ann_beats_frames = self.read_ann_beats()

        # Beat-Synchronize
        pad = True  # Always append to the end of the features
        self._est_beatsync_features, self._est_beatsync_times = \
            self.compute_beat_sync_features(self._est_beats_frames,
                                            self._est_beats_times, pad)
        self._ann_beatsync_features, self._ann_beatsync_times = \
            self.compute_beat_sync_features(self._ann_beats_frames,
                                            self._ann_beats_times, pad)
def _compute_all_features(self):
        """Computes all the features (beatsync, framesync) from the audio."""
        # Read actual audio waveform
        self._audio, _ = librosa.load(self.file_struct.audio_file,
                                      sr=self.sr)

        # Get duration of audio file
        self.dur = len(self._audio) / float(self.sr)

        # Compute actual features
        self._framesync_features = self.compute_features()

        # Compute framesync times
        self._compute_framesync_times()

        # Compute/Read beats
        self._est_beats_times, self._est_beats_frames = self.estimate_beats()
        self._ann_beats_times, self._ann_beats_frames = self.read_ann_beats()

        # Beat-Synchronize
        pad = True  # Always append to the end of the features
        self._est_beatsync_features, self._est_beatsync_times = \
            self.compute_beat_sync_features(self._est_beats_frames,
                                            self._est_beats_times, pad)
        self._ann_beatsync_features, self._ann_beatsync_times = \
            self.compute_beat_sync_features(self._ann_beats_frames,
                                            self._ann_beats_times, pad)
def _compute_all_features ( self ) : # Read actual audio waveform self . _audio , _ = librosa . load ( self . file_struct . audio_file , sr = self . sr ) # Get duration of audio file self . dur = len ( self . _audio ) / float ( self . sr ) # Compute actual features self . _framesync_features = self . compute_features ( ) # Compute framesync times self . _compute_framesync_times ( ) # Compute/Read beats self . _est_beats_times , self . _est_beats_frames = self . estimate_beats ( ) self . _ann_beats_times , self . _ann_beats_frames = self . read_ann_beats ( ) # Beat-Synchronize pad = True # Always append to the end of the features self . _est_beatsync_features , self . _est_beatsync_times = self . compute_beat_sync_features ( self . _est_beats_frames , self . _est_beats_times , pad ) self . _ann_beatsync_features , self . _ann_beatsync_times = self . compute_beat_sync_features ( self . _ann_beats_frames , self . _ann_beats_times , pad )
Computes all the features (beatsync, framesync) from the audio.
Computes all the features ( beatsync framesync ) from the audio .