expected: /data/Odyssey-SER-Challenge/Audios/MSP-PODCAST_0003_0052.wav
searched by Nkululeko: ./data/odyssey-cat-2024//data/Odyssey_SER_Challenge/Audios/MSP-PODCAST_0003_0052.wav (which leads to error file not found)
if absolute_path is set to False (interpreted as relative path) but the audio_path is given, the behavior is as expected (file path ./data/odyssey-cat-2024//data/Odyssey-SER-Challenge/Audios/MSP-PODCAST_0003_0052.wav)
I'll submit the following addition to make it work as above in dataset_csv after line 61:
else: # absolute path is True
if audformat.index_type(df.index) == "segmented":
file_index = (
df.index.levels[0]
.map(lambda x: audio_path + "/" + x)
.values
)
df = df.set_index(df.index.set_levels(
file_index, level="file"))
else:
if not isinstance(df, pd.DataFrame):
df = pd.DataFrame(df)
df = df.set_index(df.index.to_series().apply(
lambda x: audio_path + "/" + x ))
Currently, for CSV file, Nkululeko search audio files in the following ways:
If
audio_path
is given andabsolute_path
is not given (default to True) then file path is root + absolute_path + file:https://github.com/felixbur/nkululeko/blob/31cba7c39f41159f22899d678fdae6ca4f593bc7/nkululeko/data/dataset_csv.py#L44-L61
It should be
audio_path
+x
without adding the root (location of parent_dir or csv).For example,
In INI file
expected:
/data/Odyssey-SER-Challenge/Audios/MSP-PODCAST_0003_0052.wav
searched by Nkululeko:./data/odyssey-cat-2024//data/Odyssey_SER_Challenge/Audios/MSP-PODCAST_0003_0052.wav
(which leads to error file not found)if absolute_path is set to False (interpreted as relative path) but the audio_path is given, the behavior is as expected (file path
./data/odyssey-cat-2024//data/Odyssey-SER-Challenge/Audios/MSP-PODCAST_0003_0052.wav
)I'll submit the following addition to make it work as above in
dataset_csv
after line 61: