Skip to content

mfcc feature extraction error #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
sbelharbi opened this issue Jul 8, 2024 · 1 comment
Open

mfcc feature extraction error #14

sbelharbi opened this issue Jul 8, 2024 · 1 comment

Comments

@sbelharbi
Copy link

hi,
have you encountered this error when extracting mfcc features at abaw5_preprocessing/base/audio.py, in extract_mfcc when creating this:

smile = opensmile.Smile(
        feature_set=opensmile_config_path,
        feature_level=opensmile.FeatureLevel.LowLevelDescriptors
        logfile="smile.log"
    )

opensmile_config_path points to the correct absolute path of abaw5_preprocessing/load/opensmile_mfcc.conf.

  0%|                                                                                        | 0/69 [00:00<?, ?it/s]
Traceback (most recent call last):
  File "abaw5_preprocessing/project/abaw5/main.py", line 55, in <module>
    pre.prepare_data()
  File "abaw5_preprocessing/base/preprocessing.py", line 278, in prepare_data
    self.extract_mfcc_fn(idx, output_filename, npy_folder)
  File "abaw5_preprocessing/base/preprocessing.py", line 824, in extract_mfcc_fn
    extract_mfcc(input_path=input_path,
  File "abaw5_preprocessing/base/audio.py", line 90, in extract_mfcc
    smile = opensmile.Smile(
  File "lib/python3.10/site-packages/audobject/core/decorator.py", line 115, in wrapper
    func(self, *args, **kwargs)
  File "lib/python3.10/site-packages/audeer/core/utils.py", line 192, in new_func
    return func(*args, **kwargs)
  File "lib/python3.10/site-packages/opensmile/core/smile.py", line 185, in __init__
    self.params = self.to_dict(flatten=True)
  File "lib/python3.10/site-packages/audobject/core/object.py", line 300, in to_dict
    name = utils.create_class_key(self.__class__, include_version)
  File "lib/python3.10/site-packages/audobject/core/utils.py", line 38, in create_class_key
    PACKAGES_DISTRIBUTIONS = packages_distributions()
  File "lib/python3.10/site-packages/importlib_metadata/__init__.py", line 1034, in packages_distributions
    for dist in distributions():
  File "/ib/python3.10/site-packages/importlib_metadata/__init__.py", line 880, in <genexpr>
    return itertools.chain.from_iterable(
TypeError: unhashable type: 'list'

the error points to an issue in the creation of opensmile.Smile. any idea how to fix this?
thanks

@sbelharbi sbelharbi changed the title mfcc feature extrcation error mfcc feature extraction error Jul 8, 2024
@sucv
Copy link
Owner

sucv commented Jul 16, 2024

Hi,

In my experience & my pipeline, MFCC is a "weaker" feature compared than VGGish and other deep features. Consider discarding it.

Otherwise, you may replace the code snippet with the call of OpenSmile executable following here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants