hieupt commited on
Commit
e7063e9
·
verified ·
1 Parent(s): 102da07

Update data/utils.py

Browse files
Files changed (1) hide show
  1. data/utils.py +1 -1
data/utils.py CHANGED
@@ -61,7 +61,7 @@ def resample(audio, orig_sr, new_sr, mode="numpy"):
61
  if isinstance(audio, torch.Tensor):
62
  audio = audio.detach().cpu().numpy()
63
 
64
- out = librosa.resample(audio, orig_sr, new_sr, res_type='kaiser_fast')
65
 
66
  if mode == "pytorch":
67
  out = torch.tensor(out)
 
61
  if isinstance(audio, torch.Tensor):
62
  audio = audio.detach().cpu().numpy()
63
 
64
+ out = librosa.resample(audio, orig_sr=orig_sr, target_sr=new_sr, res_type='kaiser_fast')
65
 
66
  if mode == "pytorch":
67
  out = torch.tensor(out)