Allow for using local voices in the pytorch examples.
This commit is contained in:
parent
ab8e8c59b7
commit
a4e9676e46
|
|
@ -68,6 +68,9 @@ def main():
|
|||
|
||||
# If you want to make a dialog, you can pass more than one turn [text_speaker_1, text_speaker_2, text_2_speaker_1, ...]
|
||||
entries = tts_model.prepare_script([text], padding_between=1)
|
||||
if args.voice.endswith(".safetensors"):
|
||||
voice_path = args.voice
|
||||
else:
|
||||
voice_path = tts_model.get_voice_path(args.voice)
|
||||
# CFG coef goes here because the model was trained with CFG distillation,
|
||||
# so it's not _actually_ doing CFG at inference time.
|
||||
|
|
|
|||
|
|
@ -183,6 +183,9 @@ def main():
|
|||
checkpoint_info, n_q=32, temp=0.6, device=args.device
|
||||
)
|
||||
|
||||
if args.voice.endswith(".safetensors"):
|
||||
voice_path = args.voice
|
||||
else:
|
||||
voice_path = tts_model.get_voice_path(args.voice)
|
||||
# CFG coef goes here because the model was trained with CFG distillation,
|
||||
# so it's not _actually_ doing CFG at inference time.
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user