#!/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()