Skip to content

Commit 9036272

Browse files
committed
fix popping noise and incorrect path in downloader
1 parent 5db335c commit 9036272

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

InferenceInterfaces/ToucanTTSInterface.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,8 @@ def forward(self,
177177
energy_variance_scale=energy_variance_scale,
178178
pause_duration_scaling_factor=pause_duration_scaling_factor)
179179
# codec_frames=self.codec_wrapper.model.quantizer(codec_frames.unsqueeze(0))[0].squeeze() # re-quantization
180+
mel = mel[:, durations[0]:]
181+
durations[0] = 0
180182

181183
wave, _, _ = self.vocoder(mel.unsqueeze(0))
182184
wave = wave.squeeze().cpu().numpy()

run_model_downloader.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ def download_models():
2525

2626
#############
2727
print("Downloading ASVSpoof ToucanTTS Model")
28-
os.makedirs(os.path.join(MODELS_DIR, "ASVSpoof"), exist_ok=True)
28+
os.makedirs(os.path.join(MODELS_DIR, "ToucanTTS_ASVSpoof"), exist_ok=True)
2929
filename, headers = urllib.request.urlretrieve(
3030
url="https://github.com/DigitalPhonetics/IMS-Toucan/releases/download/v2.asvspoof/toucantts.pt",
31-
filename=os.path.abspath(os.path.join(MODELS_DIR, "ASVSpoof", "best.pt")),
31+
filename=os.path.abspath(os.path.join(MODELS_DIR, "ToucanTTS_ASVSpoof", "best.pt")),
3232
reporthook=report)
3333

3434
#############

0 commit comments

Comments
 (0)