From 70c665b9c4c3716059b1bb774f93f775771eead4 Mon Sep 17 00:00:00 2001 From: Edresson Date: Mon, 27 Jul 2020 16:59:59 -0300 Subject: [PATCH] add support fot VCTK and BRSpeech dataset --- mozilla_voice_tts/tts/datasets/preprocess.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mozilla_voice_tts/tts/datasets/preprocess.py b/mozilla_voice_tts/tts/datasets/preprocess.py index 317673e3..0509677c 100644 --- a/mozilla_voice_tts/tts/datasets/preprocess.py +++ b/mozilla_voice_tts/tts/datasets/preprocess.py @@ -229,14 +229,14 @@ def vctk(root_path, meta_files=None, wavs_path='wav48'): items = [] meta_files = glob(f"{os.path.join(root_path,'txt')}/**/*.txt", recursive=True) for meta_file in meta_files: - _, speaker_id, txt_file = os.path.relpath(meta_file, root_path).split(os.sep) + txt, speaker_id, txt_file = os.path.relpath(meta_file,root_path).split(os.sep) file_id = txt_file.split('.')[0] if isinstance(test_speakers, list): # if is list ignore this speakers ids if speaker_id in test_speakers: continue with open(meta_file) as file_text: text = file_text.readlines()[0] - wav_file = os.path.join(root_path, wavs_path, speaker_id, file_id+'.wav') + wav_file = os.path.join(root_path, wavs_path, speaker_id,file_id+'.wav') items.append([text, wav_file, speaker_id]) - + return items \ No newline at end of file