from abc import ABC import logging logger = logging.getLogger(__name__) class FeatureExtractor(ABC): """Feature extractor interface.""" # TODO: #API -- decide if .features will be a member variable def setup(self): pass def run(self): pass def teardown(self): pass class LaughterFeatureExtractor(FeatureExtractor): """Feature extractor for laughter detection. This class is responsible for extracting features corresponding to laughter in media files. Here: setup() is used to validate input files & config, which may involve processing video files to extract audio run() is used to extract features from the audio using jrgillick's laughter-detection teardown() is used to clean up any temporary files created during setup according to the config See: https://github.com/jrgillick/laughter-detection for the laughter-detection library """