Closed slowglow closed 3 years ago
I can help fixing this in the code or help re-writing the wiki, if I knew what was the authors' intention. For me, personally, the wiki description makes more sense and branching the code is unnecessary - just output both short- and mid-term feature files if output is requested in the call to MidTermFeatures.mid_feature_extraction_to_file
. Or don't if it isn't...
Can you, please, give some clarification?
fixed in https://github.com/tyiannak/pyAudioAnalysis/commit/fc11a6cad7347502766b9d14e018daaa9327a4cb now all 4 files are written (2 for mid-term and 2 for short-term feature matrices)
The wiki section "Feature extraction - storing to file for a sequence of WAV files stored in a given path" gives the following command and explains that the output should be in four feature files (2 CSVs and 2 NUMPY), one pair for short-term features and one pair for mid-term features:
The result of the command on my machine is that it produces only two short-term files, not the four, as described in the wiki. After some digging around, it seems that the command line call is sent to:
mid_feature_extraction_to_file
executes one of two branches and saves only one pair of files - short or mid-term, depending on the input parameters. Because the inputsstore_short_features=False, store_csv=False, plot=False
are hardcoded as(True, True, True)
inaudioAnalysis.featureExtractionDir
the first branch ofmid_feature_extraction_to_file
which writes the short-term files is always executed. Conversely, the second branch ofmid_feature_extraction_to_file
, which is supposed to write the mid-term files never executes.It seems, that during code refactoring, there was intent to change the behavior of the
mid_feature_extraction_to_file
depending on the input conditions, but the change was carried only halfway.I am seeing this with the latest
master
. Can we have this fixed?