From 9cad4352887db95a3456c0120262be76247023d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eren=20G=C3=B6lge?= Date: Tue, 9 Feb 2021 15:11:26 +0000 Subject: [PATCH] css10 dataset preprocessor --- TTS/tts/datasets/preprocess.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/TTS/tts/datasets/preprocess.py b/TTS/tts/datasets/preprocess.py index 56fc75f5..7815d87d 100644 --- a/TTS/tts/datasets/preprocess.py +++ b/TTS/tts/datasets/preprocess.py @@ -166,6 +166,20 @@ def ljspeech(root_path, meta_file): return items +def css10(root_path, meta_file): + """Normalizes the CSS10 dataset file to TTS format""" + txt_file = os.path.join(root_path, meta_file) + items = [] + speaker_name = "ljspeech" + with open(txt_file, 'r') as ttf: + for line in ttf: + cols = line.split('|') + wav_file = os.path.join(root_path, cols[0]) + text = cols[1] + items.append([text, wav_file, speaker_name]) + return items + + def nancy(root_path, meta_file): """Normalizes the Nancy meta data file to TTS format""" txt_file = os.path.join(root_path, meta_file)