Skip to content

Commit

Permalink
Absolute value needs to be taken before max, this results in warning …
Browse files Browse the repository at this point in the history
…messages due to amplitude issues
  • Loading branch information
mitchelldehaven committed Apr 23, 2024
1 parent e6af4c6 commit de98f64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/python/piper_train/vits/lightning.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ def on_validation_end(self) -> None:
test_audio = self(text, text_lengths, scales, sid=sid).detach()

# Scale to make louder in [-1, 1]
test_audio = test_audio * (1.0 / max(0.01, abs(test_audio.max())))
test_audio = test_audio * (1.0 / max(0.01, abs(test_audio).max()))

tag = test_utt.text or str(utt_idx)
self.logger.experiment.add_audio(
Expand Down

0 comments on commit de98f64

Please sign in to comment.