Spaces:
Sleeping
Sleeping
File size: 251 Bytes
848403b |
1 2 3 4 5 6 7 8 9 |
import librosa
import numpy as np
def resample_audio(raw_wave: np.ndarray, orig_sr: int, target_sr: int) -> np.ndarray:
if orig_sr == target_sr:
return raw_wave
return librosa.resample(raw_wave, orig_sr=orig_sr, target_sr=target_sr)
|