This commit is contained in:
James Betker 2022-05-22 05:50:26 -06:00
parent 42a3bc9cfd
commit e0be49f02f

View File

@ -36,11 +36,11 @@ if __name__ == '__main__':
preset=args.preset, use_deterministic_seed=args.seed, return_deterministic_state=True) preset=args.preset, use_deterministic_seed=args.seed, return_deterministic_state=True)
if isinstance(gen, list): if isinstance(gen, list):
for j, g in enumerate(gen): for j, g in enumerate(gen):
torchaudio.save(os.path.join(args.output_path, f'{voice}_{k}_{j}.wav'), g.squeeze(0).cpu(), 24000) torchaudio.save(os.path.join(args.output_path, f'{selected_voice}_{k}_{j}.wav'), g.squeeze(0).cpu(), 24000)
else: else:
torchaudio.save(os.path.join(args.output_path, f'{voice}_{k}.wav'), gen.squeeze(0).cpu(), 24000) torchaudio.save(os.path.join(args.output_path, f'{selected_voice}_{k}.wav'), gen.squeeze(0).cpu(), 24000)
if args.produce_debug_state: if args.produce_debug_state:
os.makedirs('debug_states', exist_ok=True) os.makedirs('debug_states', exist_ok=True)
torch.save(dbg_state, f'debug_states/do_tts_debug_{voice}.pth') torch.save(dbg_state, f'debug_states/do_tts_debug_{selected_voice}.pth')