I am using Python with the library opensmile. My target is to generate *.arff files to use in Weka3 ML-Tool. My problem is, that It is rather unclear for me how to save the extracted features into an *.arff file.
for example:
import opensmile
smile = opensmile.Smile(
feature_set=opensmile.FeatureSet.ComParE_2016,
feature_level=opensmile.FeatureLevel.Functionals,
)
y = smile.process_file('audio.wav')
//ToDo save y in arff
I should be possible since there are questions about the generated files eg:here. However I can't find anything specific about that.
Instead of generating ARFF directly, you could generate a CSV file in a format that Weka can load it:
As a second (and optional) step, convert the CSV file to ARFF using the CSVLoader class from the command-line:
NB: You will need to adjust the paths to audio files,
weka.jar
, CSV and ARFF file to fit your environment, of course.