From 9b58a044e9aa60834ef02f4a69a80b1762a18707 Mon Sep 17 00:00:00 2001 From: arensc Date: Fri, 8 Mar 2024 12:00:58 -0500 Subject: [PATCH] Ok good to go, gotta swap out with the base project --- tts/StyleTTS2Train/test_harness.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tts/StyleTTS2Train/test_harness.py b/tts/StyleTTS2Train/test_harness.py index ac995bd..a33a0bf 100644 --- a/tts/StyleTTS2Train/test_harness.py +++ b/tts/StyleTTS2Train/test_harness.py @@ -4,6 +4,7 @@ from collections import defaultdict from style_tts2 import StyleTTS2 import torch import torchaudio + class CharacterData: def __init__(self,full_path,char_name,file_name,ref_text) -> None: self.char_name = char_name @@ -26,7 +27,6 @@ class TestHarness: self.test_text = ["This is!","Hello world testing!""This is a slightly... longer test.""This is a longer test, of style TTS Two!", "This should be a lengthy sentence."] self.test_characters = self.get_characters() - def log_values(self,loss_gen_all, d_loss, loss_ce, loss_dur, loss_lm, loss_norm_rec, loss_F0_rec, loss_sty, loss_diff, d_loss_slm, loss_gen_lm, iters, epoch, step, log_interval, running_loss,train_list_len,batch_size): @@ -63,12 +63,10 @@ class TestHarness: count = 0 for char_name in char_name_ls.keys(): char_sample = char_name_ls[char_name] - for sample in char_sample: s_ref = Path(sample.full_path) s_ref = model.compute_style(s_ref) for i,text in enumerate(self.test_text): - # we shouldn't set the embedding scale high on some text / input audio lengths it will break the audio mono_wav = model.STinference(text=text, ref_text=sample.ref_text, ref_s=s_ref, @@ -115,8 +113,6 @@ class TestHarness: if __name__ == "__main__": harness = TestHarness() - #harness.sample_ood_voice(file="testing.wav",sample_rate=24000,character="Raiden",caption="What I just Said") - #harness.sample_list_of_characters(file_path="./output/") harness.test("Models/LibriTTS/epochs_2nd_00020.pth") \ No newline at end of file