You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
607 B

#!/usr/bin/env python3
import subprocess
subprocess.run(['mkdir', '-p', "speakers_by_model"])
with open("./models.txt", "r") as f:
lines = f.readlines()
for line in lines:
tokens = line.split(" ")
model = tokens[2]
print(f"Model {model}")
model_fn = model.replace('/','_')
with open(f"./speakers_by_model/{model_fn}.txt", "w") as of:
completed = subprocess.run(['tts', '--model_name', model, '--list_speaker_idxs', 'true'])
of.write(str(completed.stdout)+"\n")
of.write(str(completed.stderr)+"\n")
of.flush()