# Path: msaf/exceptions.py
# class WrongFeaturesFormatError(MSAFError):
#     '''Exception class for worngly formatted features files'''
#     pass
# 
# class NoFeaturesFileError(MSAFError):
#     '''Exception class for missing features file'''
#     pass
# 
# class FeaturesNotFound(MSAFError):
#     '''Exception class for missing specific features in a file'''
#     pass
# 
# class FeatureTypeNotFound(MSAFError):
#     '''Exception class for feature type missing'''
#     pass
# 
# class FeatureParamsError(MSAFError):
#     '''Exception class for feature parameters missing'''
#     pass
# 
# class NoAudioFileError(MSAFError):
#     '''Exception class for audio file not found'''
#     pass


import collections
import datetime
import librosa
import logging
import jams
import json
import numpy as np
import os
import six
import msaf
from enum import Enum
from msaf.exceptions import WrongFeaturesFormatError, NoFeaturesFileError,\
    FeaturesNotFound, FeatureTypeNotFound, FeatureParamsError, NoAudioFileError
        if self.feat_type is FeatureTypes.framesync:
            self._compute_framesync_times()
            frame_times = self._framesync_times
        elif self.feat_type is FeatureTypes.est_beatsync:
            frame_times = self._est_beatsync_times
        elif self.feat_type is FeatureTypes.ann_beatsync:
            frame_times = self._ann_beatsync_times

        return frame_times

    @property
    def features(self):
        """This getter will compute the actual features if they haven't
        been computed yet.

        Returns
        -------
        features: np.array
            The actual features. Each row corresponds to a feature vector.
        """
        # Compute features if needed
        if self._features is None:
            try:
                self.read_features()
            except (NoFeaturesFileError, FeaturesNotFound,
                    WrongFeaturesFormatError, FeatureParamsError) as e:
                try:
                    self._compute_all_features()
                    self.write_features()
                except IOError:

# Path: msaf/exceptions.py
# class WrongFeaturesFormatError(MSAFError):
#     '''Exception class for worngly formatted features files'''
#     pass
# 
# class NoFeaturesFileError(MSAFError):
#     '''Exception class for missing features file'''
#     pass
# 
# class FeaturesNotFound(MSAFError):
#     '''Exception class for missing specific features in a file'''
#     pass
# 
# class FeatureTypeNotFound(MSAFError):
#     '''Exception class for feature type missing'''
#     pass
# 
# class FeatureParamsError(MSAFError):
#     '''Exception class for feature parameters missing'''
#     pass
# 
# class NoAudioFileError(MSAFError):
#     '''Exception class for audio file not found'''
#     pass


# Path: msaf/base.py
import collections
import datetime
import librosa
import logging
import jams
import json
import numpy as np
import os
import six
import msaf
from enum import Enum
from msaf.exceptions import WrongFeaturesFormatError, NoFeaturesFileError,\
    FeaturesNotFound, FeatureTypeNotFound, FeatureParamsError, NoAudioFileError

        if self.feat_type is FeatureTypes.framesync:
            self._compute_framesync_times()
            frame_times = self._framesync_times
        elif self.feat_type is FeatureTypes.est_beatsync:
            frame_times = self._est_beatsync_times
        elif self.feat_type is FeatureTypes.ann_beatsync:
            frame_times = self._ann_beatsync_times

        return frame_times

    @property
    def features(self):
        """This getter will compute the actual features if they haven't
        been computed yet.

        Returns
        -------
        features: np.array
            The actual features. Each row corresponds to a feature vector.
        """
        # Compute features if needed
        if self._features is None:
            try:
                self.read_features()
            except (NoFeaturesFileError, FeaturesNotFound,
                    WrongFeaturesFormatError, FeatureParamsError) as e:
                try:
                    self._compute_all_features()
                    self.write_features()
                except IOError:

                    if isinstance(e, FeaturesNotFound) or \