Skip to content

Commit

Permalink
Merge pull request #776 from AznamirWoW/audio_tensorboard
Browse files Browse the repository at this point in the history
added audio output for tensorboard
  • Loading branch information
blaisewf authored Oct 3, 2024
2 parents 9a8a305 + 921d11e commit 86da712
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions rvc/train/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -778,11 +778,17 @@ def train_and_evaluate(
),
"all/mel": plot_spectrogram_to_numpy(mel[0].data.cpu().numpy()),
}
audio_dict = {}
o, *_ = net_g.infer(phone, phone_lengths, pitch, pitchf, sid)
audio_dict.update({f"gen/audio_{global_step:07d}": o[0, :, : ]})

summarize(
writer=writer,
global_step=global_step,
images=image_dict,
scalars=scalar_dict,
audios=audio_dict,
audio_sample_rate=config.data.sample_rate,
)

global_step += 1
Expand Down

0 comments on commit 86da712

Please sign in to comment.