fix an encoding problem in windows

This commit is contained in:
lfchener 2021-01-08 02:47:43 +00:00
parent c1de6a1e49
commit b0ba6e7bf9
1 changed files with 1 additions and 1 deletions

View File

@ -25,7 +25,7 @@ class LJSpeechMetaData(Dataset):
csv_path = self.root / "metadata.csv" csv_path = self.root / "metadata.csv"
records = [] records = []
speaker_name = "ljspeech" speaker_name = "ljspeech"
with open(str(csv_path), 'rt') as f: with open(str(csv_path), 'rt', encoding='utf-8') as f:
for line in f: for line in f:
filename, _, normalized_text = line.strip().split("|") filename, _, normalized_text = line.strip().split("|")
filename = str(wav_dir / (filename + ".wav")) filename = str(wav_dir / (filename + ".wav"))