From 1c1949d348ddf57b6eff0ee34b140fb3acd8d1d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eren=20G=C3=B6lge?= Date: Tue, 2 Mar 2021 12:17:33 +0100 Subject: [PATCH] utf-8 encoding for certain preprocessors --- TTS/tts/datasets/preprocess.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TTS/tts/datasets/preprocess.py b/TTS/tts/datasets/preprocess.py index eac121b8..a82a5db2 100644 --- a/TTS/tts/datasets/preprocess.py +++ b/TTS/tts/datasets/preprocess.py @@ -159,7 +159,7 @@ def ljspeech(root_path, meta_file): txt_file = os.path.join(root_path, meta_file) items = [] speaker_name = "ljspeech" - with open(txt_file, 'r') as ttf: + with open(txt_file, 'r', encoding="utf-8") as ttf: for line in ttf: cols = line.split('|') wav_file = os.path.join(root_path, 'wavs', cols[0] + '.wav') @@ -174,7 +174,7 @@ def ruslan(root_path, meta_file): txt_file = os.path.join(root_path, meta_file) items = [] speaker_name = "ljspeech" - with open(txt_file, 'r') as ttf: + with open(txt_file, 'r', encoding="utf-8") as ttf: for line in ttf: cols = line.split('|') wav_file = os.path.join(root_path, 'RUSLAN', cols[0] + '.wav')