Spaces:
Sleeping
Sleeping
| 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) | |