Skip to content

Commit

Permalink
fix popping noise and incorrect path in downloader
Browse files Browse the repository at this point in the history
  • Loading branch information
Flux9665 committed Dec 13, 2023
1 parent 5db335c commit 9036272
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions InferenceInterfaces/ToucanTTSInterface.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions run_model_downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

#############
Expand Down

0 comments on commit 9036272

Please sign in to comment.