brain worms
This commit is contained in:
parent
b17260cddf
commit
f44895978d
14
src/utils.py
14
src/utils.py
|
@ -1363,13 +1363,13 @@ def phonemizer( text, language="en-us" ):
|
||||||
return phonemize( text, language=language, strip=True, preserve_punctuation=True, with_stress=True, backend=args.phonemizer_backend )
|
return phonemize( text, language=language, strip=True, preserve_punctuation=True, with_stress=True, backend=args.phonemizer_backend )
|
||||||
|
|
||||||
def should_phonemize():
|
def should_phonemize():
|
||||||
try:
|
should = args.tokenizer_json is not None and args.tokenizer_json[-8:] == "ipa.json"
|
||||||
from phonemizer import phonemize
|
if should:
|
||||||
except Exception as e:
|
try:
|
||||||
print(str(e))
|
from phonemizer import phonemize
|
||||||
return False
|
except Exception as e:
|
||||||
|
return False
|
||||||
return args.tokenizer_json is not None and args.tokenizer_json[-8:] == "ipa.json"
|
return should
|
||||||
|
|
||||||
def prepare_dataset( voice, use_segments=False, text_length=0, audio_length=0, 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}/'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user