You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hello i want to ask on how to change the framesize for LLD extraction. the default frame size here is 0.01 s and i want to change it to either 0.025 or 0.03. i've tried the instruction in https://audeering.github.io/opensmile-python/usage.html#custom-config but it's returning this error
@naufalrif
I cannot reproduce this error. The minimum example below works for me, if you want to use your config again, you need to use read instead of write for with open.
importaudiofileimportopensmilesignal, sampling_rate=audiofile.read("/home/bagus/train_001.wav")
config_str='''[componentInstances:cComponentManager]instance[dataMemory].type=cDataMemory;;; default source[componentInstances:cComponentManager]instance[dataMemory].type=cDataMemory;;; source\{\cm[source{?}:include external source]};;; main section[componentInstances:cComponentManager]instance[framer].type = cFramerinstance[lld].type = cEnergyinstance[func].type=cFunctionals[framer:cFramer]reader.dmLevel = wavewriter.dmLevel = framescopyInputName = 1frameMode = fixedframeSize = 0.025000frameStep = 0.010000frameCenterSpecial = leftnoPostEOIprocessing = 1[lld:cEnergy]reader.dmLevel = frameswriter.dmLevel = lld\{\cm[bufferModeRbConf{?}:path to included config to set the buffer mode for the standard ringbuffer levels]}nameAppend = energycopyInputName = 1rms = 1log = 1[func:cFunctionals]reader.dmLevel=lldwriter.dmLevel=funccopyInputName = 1\{\cm[bufferModeRbConf]}\{\cm[frameModeFunctionalsConf{?}:path to included config to set frame mode for all functionals]}functionalsEnabled=MomentsMoments.variance = 0Moments.stddev = 1Moments.skewness = 0Moments.kurtosis = 0Moments.amean = 1Moments.doRatioLimit = 0;;; sink\{\cm[sink{?}:include external sink]}'''withopen('my.conf', 'w') asfp:
fp.write(config_str)
smile=opensmile.Smile(
feature_set='my.conf',
feature_level='func',
)
smile.process_signal(
signal,
sampling_rate
)
Output:
pcm_RMSenergy_stddev ... pcm_LOGenergy_amean
start end ...
0 days 0 days 00:00:13.600000 0.000495 ... -12.41271
[1 rows x 4 columns]
hello i want to ask on how to change the framesize for LLD extraction. the default frame size here is 0.01 s and i want to change it to either 0.025 or 0.03. i've tried the instruction in https://audeering.github.io/opensmile-python/usage.html#custom-config but it's returning this error
NameError Traceback (most recent call last)
Cell In[25], line 2
1 with open('myconfig.conf', 'w') as fp:
----> 2 fp.write(config_str)
4 smile = opensmile.Smile(
5 feature_set='my.conf',
6 feature_level='func',
7 )
8 smile.process_signal(
9 signal,
10 sampling_rate
11 )
NameError: name 'config_str' is not defined
please help
The text was updated successfully, but these errors were encountered: