lhoestq HF Staff commited on
Commit
acad3a1
·
verified ·
1 Parent(s): 9f2ed61

Update superb.py

Browse files
Files changed (1) hide show
  1. superb.py +2 -3
superb.py CHANGED
@@ -435,14 +435,13 @@ class Superb(datasets.GeneratorBasedBuilder):
435
  label = "_unknown_"
436
  yield key, {"file": audio_file, "audio": audio_file, "label": label}
437
  elif self.config.name == "ic":
438
- root_path = os.path.join(archive_path, "fluent_speech_commands_dataset")
439
- csv_path = os.path.join(root_path, "data", f"{split}_data.csv")
440
  with open(csv_path, encoding="utf-8") as csv_file:
441
  csv_reader = csv.reader(csv_file, delimiter=",", skipinitialspace=True)
442
  next(csv_reader)
443
  for row in csv_reader:
444
  key, file_path, speaker_id, text, action, object_, location = row
445
- audio_path = os.path.join(root_path, file_path)
446
  yield key, {
447
  "file": audio_path,
448
  "audio": audio_path,
 
435
  label = "_unknown_"
436
  yield key, {"file": audio_file, "audio": audio_file, "label": label}
437
  elif self.config.name == "ic":
438
+ csv_path = os.path.join(archive_path, "data", f"{split}_data.csv")
 
439
  with open(csv_path, encoding="utf-8") as csv_file:
440
  csv_reader = csv.reader(csv_file, delimiter=",", skipinitialspace=True)
441
  next(csv_reader)
442
  for row in csv_reader:
443
  key, file_path, speaker_id, text, action, object_, location = row
444
+ audio_path = os.path.join(archive_path, file_path)
445
  yield key, {
446
  "file": audio_path,
447
  "audio": audio_path,