Skip to content
This repository has been archived by the owner on Nov 11, 2023. It is now read-only.

Commit

Permalink
Debug
Browse files Browse the repository at this point in the history
  • Loading branch information
ylzz1997 committed Sep 17, 2023
1 parent cb2a0ca commit 4e402d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion inference/infer_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ def infer(self, speaker, tran, raw_path,
):
if isinstance(raw_path, str) or isinstance(raw_path, io.BytesIO):
wav, sr = torchaudio.load(raw_path)
if not hasattr(self,"audio_resample_transform") or self.audio16k_resample_transform.orig_freq != sr:
if not hasattr(self,"audio_resample_transform") or self.audio_resample_transform.orig_freq != sr:
self.audio_resample_transform = torchaudio.transforms.Resample(sr,self.target_sample)
wav = self.audio_resample_transform(wav).numpy()[0]
else:
Expand Down

0 comments on commit 4e402d8

Please sign in to comment.