Skip to content

Commit

Permalink
Improvements: fuxed to the tensorboard audio, and show training progr…
Browse files Browse the repository at this point in the history
…ess.
  • Loading branch information
rmcpantoja committed Dec 11, 2023
1 parent 595a7bc commit e8edb3b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
7 changes: 5 additions & 2 deletions src/python/piper_train/vits/lightning.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ def training_step_d(self, batch: Batch):
def validation_step(self, batch: Batch, batch_idx: int):
val_loss = self.training_step_g(batch) + self.training_step_d(batch)
self.log("val_loss", val_loss)

print(f"Training progress:\nEpoch: {self.current_epoch}. Steps: {self.global_step}")
# Generate audio examples
for utt_idx, test_utt in enumerate(self._test_dataset):
text = test_utt.phoneme_ids.unsqueeze(0).to(self.device)
Expand All @@ -300,7 +300,10 @@ def validation_step(self, batch: Batch, batch_idx: int):

tag = test_utt.text or str(utt_idx)
self.logger.experiment.add_audio(
tag, test_audio, sample_rate=self.hparams.sample_rate
tag,
test_audio,
self.global_step,
sample_rate=self.hparams.sample_rate
)

return val_loss
Expand Down
9 changes: 6 additions & 3 deletions src/python/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
--extra-index-url https://download.pytorch.org/whl/cu117

cython>=0.29.0,<1
piper-phonemize~=1.1.0
librosa>=0.9.2,<1
numpy>=1.19.0
numpy==1.24
onnxruntime>=1.11.0
pytorch-lightning~=1.7.0
torch>=1.11.0,<2
pytorch-lightning~=1.7.7
torch==1.13.1+cu117
torchmetrics==1.1.1

0 comments on commit e8edb3b

Please sign in to comment.