Skip to content

Commit

Permalink
Fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
neonbjb committed May 22, 2022
1 parent e118785 commit 7f9f1db
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tortoise/do_tts.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@
preset=args.preset, use_deterministic_seed=args.seed, return_deterministic_state=True)
if isinstance(gen, list):
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:
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:
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')

0 comments on commit 7f9f1db

Please sign in to comment.