This commit is contained in:
mrq 2023-03-16 14:41:40 +00:00
parent 0408d44602
commit 46ff3c476a
3 changed files with 7 additions and 6 deletions

@ -1 +1 @@
Subproject commit 730f56aa8767807acfa79ef38a98f7f0d00e3f55 Subproject commit 0db8ebc543db46c8f533393f39bc1c168f4ee8eb

@ -1 +1 @@
Subproject commit e201746eeb3f5be602ae3395df8344f231a5f0d4 Subproject commit af78e3978a381e5c38aa83c6be8a9f09eb6efebf

View File

@ -1269,11 +1269,11 @@ def phonemizer( text, language="eng" ):
return ["_" if p in ignored else p for p in phones] 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}/' indir = f'./training/{voice}/'
infile = f'{indir}/whisper.json' infile = f'{indir}/whisper.json'
messages = [] messages = []
normalize = True
phonemize = args.tokenizer_json is not None and args.tokenizer_json[-8:] == "ipa.json" phonemize = args.tokenizer_json is not None and args.tokenizer_json[-8:] == "ipa.json"
if args.tts_backend == "vall-e": if args.tts_backend == "vall-e":
phonemize = True phonemize = True
@ -1301,7 +1301,7 @@ def prepare_dataset( voice, use_segments=False, text_length=0, audio_length=0, n
normalizer = None normalizer = None
if normalize: 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 # check if unsegmented text exceeds 200 characters
if not use_segment: if not use_segment:
@ -2225,7 +2225,8 @@ def unload_tts():
do_gc() do_gc()
def reload_tts(): def reload_tts():
load_tts( restart=True ) unload_tts()
load_tts()
def get_current_voice(): def get_current_voice():
global current_voice global current_voice