From 46ff3c476a7e2eab4769908add7227402d11cf56 Mon Sep 17 00:00:00 2001 From: mrq Date: Thu, 16 Mar 2023 14:41:40 +0000 Subject: [PATCH] fixes v2 --- modules/dlas | 2 +- modules/tortoise-tts | 2 +- src/utils.py | 9 +++++---- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/modules/dlas b/modules/dlas index 730f56a..0db8ebc 160000 --- a/modules/dlas +++ b/modules/dlas @@ -1 +1 @@ -Subproject commit 730f56aa8767807acfa79ef38a98f7f0d00e3f55 +Subproject commit 0db8ebc543db46c8f533393f39bc1c168f4ee8eb diff --git a/modules/tortoise-tts b/modules/tortoise-tts index e201746..af78e39 160000 --- a/modules/tortoise-tts +++ b/modules/tortoise-tts @@ -1 +1 @@ -Subproject commit e201746eeb3f5be602ae3395df8344f231a5f0d4 +Subproject commit af78e3978a381e5c38aa83c6be8a9f09eb6efebf diff --git a/src/utils.py b/src/utils.py index ac19fb9..789b4a3 100755 --- a/src/utils.py +++ b/src/utils.py @@ -1269,11 +1269,11 @@ def phonemizer( text, language="eng" ): return ["_" if p in ignored else p for p in phones] """ -def prepare_dataset( voice, use_segments=False, text_length=0, audio_length=0, normalize=True, progress=gr.Progress() ): +def prepare_dataset( voice, use_segments=False, text_length=0, audio_length=0, progress=gr.Progress() ): indir = f'./training/{voice}/' infile = f'{indir}/whisper.json' messages = [] - + normalize = True phonemize = args.tokenizer_json is not None and args.tokenizer_json[-8:] == "ipa.json" if args.tts_backend == "vall-e": phonemize = True @@ -1301,7 +1301,7 @@ def prepare_dataset( voice, use_segments=False, text_length=0, audio_length=0, n normalizer = None if normalize: - normalizer = EnglishTextNormalizer() if language.lower()[:2] == "en" else BasicTextNormalizer() + normalizer = EnglishTextNormalizer() if language and language == "english" else BasicTextNormalizer() # check if unsegmented text exceeds 200 characters if not use_segment: @@ -2225,7 +2225,8 @@ def unload_tts(): do_gc() def reload_tts(): - load_tts( restart=True ) + unload_tts() + load_tts() def get_current_voice(): global current_voice