felixbur / nkululeko

Machine learning speaker characteristics
MIT License
31 stars 5 forks source link

Fix error on emozi, ravdess, and crema-d #54

Closed bagustris closed 1 year ago

bagustris commented 1 year ago

This PR includes a fix for the following,

(.env) bagus@m049:nkululeko$ python3 -m nkululeko.nkululeko --config data/emozionalmente/nkulu_os_xgb.ini
DEBUG nkululeko: running results from config data/emozionalmente/nkulu_os_xgb.ini, nkululeko version 0.59.1
DEBUG experiment: value for type not found, using default: audformat
DEBUG dataset: data: loading from ./data/emozionalmente/build
DEBUG dataset: data: loading tables: ['emotion.categories.test.gold_standard', 'emotion.categories.train.gold_standard', 'emotion.categories.dev.gold_standard']
DEBUG dataset: value for files_tables not found, using default: ['files']
DEBUG dataset: value for label not found, using default: emotion
DEBUG dataset: value for target_tables not found, using default: ['emotion']
DEBUG dataset: Loaded database data with 6902 samples: got targets: False, got speakers: True, got sexes: True, got age: True
Traceback (most recent call last):
  File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/bagus/github/nkululeko/nkululeko/nkululeko.py", line 58, in <module>
    main(cwd) # use this if you want to state the config file path on command line
  File "/home/bagus/github/nkululeko/nkululeko/nkululeko.py", line 39, in main
    expr.load_datasets()
  File "/home/bagus/github/nkululeko/nkululeko/experiment.py", line 76, in load_datasets
    data.prepare()
  File "/home/bagus/github/nkululeko/nkululeko/dataset.py", line 128, in prepare
    self.df = self.util.make_segmented_index(self.df)
  File "/home/bagus/github/nkululeko/nkululeko/util.py", line 114, in make_segmented_index
    df.index = audformat.utils.to_segmented_index(df.index, allow_nat=False)
  File "/home/bagus/github/nkululeko/.env/lib/python3.8/site-packages/audformat/core/utils.py", line 1621, in to_segmented_index
    durs = audeer.run_tasks(
  File "/home/bagus/github/nkululeko/.env/lib/python3.8/site-packages/audeer/core/utils.py", line 576, in run_tasks
    results[index] = task_func(*param[0], **param[1])
  File "/home/bagus/github/nkululeko/.env/lib/python3.8/site-packages/audformat/core/utils.py", line 1607, in job
    raise FileNotFoundError(
FileNotFoundError: [Errno 2] No such file or directory: './data/emozionalmente/build/1614951631538.wav'
(.env) bagus@m049:nkululeko$ ls ./data/emozionalmente/build/1614951631538.wav
ls: cannot access './data/emozionalmente/build/1614951631538.wav': No such file or directory

I modified create.py to solve the error (missing "audio" dir for wav paths). It also completes readme, INI file, and fix CSV-based dataset to read absolute path. Test commands are added to test these three datasets to the test_runs.sh accordingly.

bagustris commented 1 year ago

Adding IEMOCAP, MSP-IMPROV, MSP-Podcast, and CMU-MOSEI dataset.