From 921d11e5ec04898fe571465ac649a225c0be5e64 Mon Sep 17 00:00:00 2001 From: Alexey Shmelev Date: Thu, 3 Oct 2024 16:50:30 -0400 Subject: [PATCH] added audio output for tensorboard --- rvc/train/train.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/rvc/train/train.py b/rvc/train/train.py index a63ce7a1..ead8cf9e 100644 --- a/rvc/train/train.py +++ b/rvc/train/train.py @@ -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