mirror of https://github.com/coqui-ai/TTS.git
fix(xtts): more helpful error message when vocab.json not found
This commit is contained in:
parent
e81f8d079c
commit
627bbe4150
|
@ -779,6 +779,12 @@ class Xtts(BaseTTS):
|
|||
|
||||
if os.path.exists(vocab_path):
|
||||
self.tokenizer = VoiceBpeTokenizer(vocab_file=vocab_path)
|
||||
else:
|
||||
msg = (
|
||||
f"`vocab.json` file not found in `{checkpoint_dir}`. Move the file there or "
|
||||
"specify alternative path in `model_args.tokenizer_file` in `config.json`"
|
||||
)
|
||||
raise FileNotFoundError(msg)
|
||||
|
||||
self.init_models()
|
||||
|
||||
|
|
Loading…
Reference in New Issue