From 0a7d6f02a78f38f0a801bf4da72915129958b510 Mon Sep 17 00:00:00 2001 From: mrq Date: Thu, 16 Mar 2023 04:54:17 +0000 Subject: [PATCH] ops --- src/utils.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/utils.py b/src/utils.py index 071b3ed..fcdb932 100755 --- a/src/utils.py +++ b/src/utils.py @@ -1351,11 +1351,12 @@ def prepare_dataset( voice, use_segments=False, text_length=0, audio_length=0, n normalized_text = normalizer(text) if normalize else None try: phonemes = phonemizer( text, language=language, preserve_punctuation=True, strip=True ) if phonemize else None + if phonemize: + text = phonemes except Exception as e: + print(e) pass - if phonemize and phonemes: - text = phonemes if len(text) > 200: message = f"Text length too long (200 < {len(text)}), skipping... {file}"