audeering / opensmile

The Munich Open-Source Large-Scale Multimedia Feature Extractor
https://audeering.github.io/opensmile/
Other
553 stars 74 forks source link

How to extract dynamic features with OpenCV #32

Open jessiejie opened 2 years ago

jessiejie commented 2 years ago

I tried to extract 260-dimension dynamic features (one feature every 0.1 second) using the command: /Users/Documents/PMEmo/opensmile-3.0-osx-x64/bin/SMILExtract -C /Users/Documents/PMEmo/opensmile-3.0-osx-x64/config/is09-13/IS13_ComParE.conf -I /Users/Documents/dataset/Chorus/wav/233.wav -csvoutput test.csv. But the output put is 1 dimension and doesn't contain features for every 0.1 second. Which config or command should I use to extract dynamic features?

In the 2.1.0 version, I extracted lld features in frame size: 60ms, step size: 10ms using the following commands: SMILExtract = os.path.join(opensmiledir,"SMILExtract") config_file = os.path.join(opensmiledir,"config", "IS13_ComParE_lld.conf") subprocess.check_call([SMILExtract, "-C", config_file, "-I", wavpath, "-O", distfile])

How about version 3.0?

chausner-audeering commented 2 years ago

You can use the -lldcsvoutput to output LLDs. The -csvoutput option outputs functionals. See also https://github.com/audeering/opensmile/blob/master/config/shared/standard_data_output.conf.inc.

JessieJie1998 commented 2 years ago

Got it. Can I extracted lld features in frame size: 60s, step size: 1s? The current lld command extracted features in a 10ms step size.

chausner-audeering commented 2 years ago

While technically you can (you might need to make some changes to the config file), most of the LLD features would not make much sense on such large frames (e.g. FFT windows) because they have been designed to be computed on short audio windows. What you probably want to do instead, is to compute functionals on these larger frames. You can do that by editing https://github.com/audeering/opensmile/blob/master/config/shared/FrameModeFunctionals.conf.inc, changing frameMode to fixed and setting frameSize and frameStep, accordingly. Don't forget to use -csvoutput instead of -lldcsvoutput then.