diff --git a/InferenceInterfaces/ToucanTTSInterface.py b/InferenceInterfaces/ToucanTTSInterface.py index 12499b8e..bbea17d3 100644 --- a/InferenceInterfaces/ToucanTTSInterface.py +++ b/InferenceInterfaces/ToucanTTSInterface.py @@ -177,6 +177,8 @@ def forward(self, energy_variance_scale=energy_variance_scale, pause_duration_scaling_factor=pause_duration_scaling_factor) # codec_frames=self.codec_wrapper.model.quantizer(codec_frames.unsqueeze(0))[0].squeeze() # re-quantization + mel = mel[:, durations[0]:] + durations[0] = 0 wave, _, _ = self.vocoder(mel.unsqueeze(0)) wave = wave.squeeze().cpu().numpy() diff --git a/run_model_downloader.py b/run_model_downloader.py index ccf82dfd..59aa7e76 100644 --- a/run_model_downloader.py +++ b/run_model_downloader.py @@ -25,10 +25,10 @@ def download_models(): ############# print("Downloading ASVSpoof ToucanTTS Model") - os.makedirs(os.path.join(MODELS_DIR, "ASVSpoof"), exist_ok=True) + os.makedirs(os.path.join(MODELS_DIR, "ToucanTTS_ASVSpoof"), exist_ok=True) filename, headers = urllib.request.urlretrieve( url="https://github.com/DigitalPhonetics/IMS-Toucan/releases/download/v2.asvspoof/toucantts.pt", - filename=os.path.abspath(os.path.join(MODELS_DIR, "ASVSpoof", "best.pt")), + filename=os.path.abspath(os.path.join(MODELS_DIR, "ToucanTTS_ASVSpoof", "best.pt")), reporthook=report) #############