mirror of https://github.com/coqui-ai/TTS.git
test(freevc): fix output length check
This commit is contained in:
parent
546f43cb25
commit
9ef2c7ed62
|
@ -31,7 +31,7 @@ class TestFreeVC(unittest.TestCase):
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _create_inputs_inference():
|
def _create_inputs_inference():
|
||||||
source_wav = torch.rand(16000)
|
source_wav = torch.rand(15999)
|
||||||
target_wav = torch.rand(16000)
|
target_wav = torch.rand(16000)
|
||||||
return source_wav, target_wav
|
return source_wav, target_wav
|
||||||
|
|
||||||
|
@ -96,8 +96,8 @@ class TestFreeVC(unittest.TestCase):
|
||||||
source_wav, target_wav = self._create_inputs_inference()
|
source_wav, target_wav = self._create_inputs_inference()
|
||||||
output_wav = model.voice_conversion(source_wav, target_wav)
|
output_wav = model.voice_conversion(source_wav, target_wav)
|
||||||
assert (
|
assert (
|
||||||
output_wav.shape[0] + config.audio.hop_length == source_wav.shape[0]
|
output_wav.shape[0] == source_wav.shape[0] - source_wav.shape[0] % config.audio.hop_length
|
||||||
), f"{output_wav.shape} != {source_wav.shape}"
|
), f"{output_wav.shape} != {source_wav.shape}, {config.audio.hop_length}"
|
||||||
|
|
||||||
def test_train_step(self): ...
|
def test_train_step(self): ...
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue