Compare commits

...

1 Commits

Author SHA1 Message Date
laurent
a4e9676e46 Allow for using local voices in the pytorch examples. 2025-07-31 12:42:35 +02:00
2 changed files with 8 additions and 2 deletions

View File

@ -68,7 +68,10 @@ 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)
voice_path = tts_model.get_voice_path(args.voice)
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.
# Also, if you are generating a dialog, you should have two voices in the list.

View File

@ -183,7 +183,10 @@ def main():
checkpoint_info, n_q=32, temp=0.6, device=args.device
)
voice_path = tts_model.get_voice_path(args.voice)
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.
# Also, if you are generating a dialog, you should have two voices in the list.