cifkao commited on
Commit
7c6487b
1 Parent(s): 1a16f09

Fix the name field

Browse files
Files changed (1) hide show
  1. jam-alt.py +1 -1
jam-alt.py CHANGED
@@ -112,7 +112,7 @@ class JamAltDataset(datasets.GeneratorBasedBuilder):
112
  if audio_paths is None:
113
  audio_paths = [None] * len(text_paths)
114
  for text_path, audio_path, meta in zip(text_paths, audio_paths, metadata):
115
- name = os.path.splitext(os.path.basename(text_path))[0]
116
  with open(text_path, encoding="utf-8") as text_f:
117
  record = {
118
  "name": name,
 
112
  if audio_paths is None:
113
  audio_paths = [None] * len(text_paths)
114
  for text_path, audio_path, meta in zip(text_paths, audio_paths, metadata):
115
+ name = os.path.splitext(meta["Filepath"])[0]
116
  with open(text_path, encoding="utf-8") as text_f:
117
  record = {
118
  "name": name,