Skip to content

Commit

Permalink
bug fix Pretrained.load_audio
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriel oexle committed Feb 16, 2022
1 parent 9d56d50 commit 79f8dbb
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions speechbrain/pretrained/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ def _prepare_modules(self, freeze_params):
for p in self.mods.parameters():
p.requires_grad = False

def load_audio(self, path, savedir="."):
def load_audio(self, path):
"""Load an audio file with this model"s input spec
When using a speech model, it is important to use the same type of data,
Expand All @@ -229,8 +229,6 @@ def load_audio(self, path, savedir="."):
Similarly, it is simple to downmix a stereo file to mono.
The path can be a local path, a web url, or a link to a huggingface repo.
"""
source, fl = split_path(path)
path = fetch(fl, source=source, savedir=savedir)
signal, sr = torchaudio.load(str(path), channels_first=False)
return self.audio_normalizer(signal, sr)

Expand Down

0 comments on commit 79f8dbb

Please sign in to comment.