Skip to content

Commit

Permalink
fix(formatters): set missing root_path attribute (#3182)
Browse files Browse the repository at this point in the history
Fixes #2778
  • Loading branch information
eginhard authored Nov 9, 2023
1 parent a8e9163 commit 3b1e703
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions TTS/tts/datasets/formatters.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ def css10(root_path, meta_file, **kwargs): # pylint: disable=unused-argument
cols = line.split("|")
wav_file = os.path.join(root_path, cols[0])
text = cols[1]
items.append({"text": text, "audio_file": wav_file, "speaker_name": speaker_name})
items.append({"text": text, "audio_file": wav_file, "speaker_name": speaker_name, "root_path": root_path})
return items


Expand All @@ -294,7 +294,7 @@ def nancy(root_path, meta_file, **kwargs): # pylint: disable=unused-argument
utt_id = line.split()[1]
text = line[line.find('"') + 1 : line.rfind('"') - 1]
wav_file = os.path.join(root_path, "wavn", utt_id + ".wav")
items.append({"text": text, "audio_file": wav_file, "speaker_name": speaker_name})
items.append({"text": text, "audio_file": wav_file, "speaker_name": speaker_name, "root_path": root_path})
return items


Expand Down

0 comments on commit 3b1e703

Please sign in to comment.