Spaces:
Runtime error
Runtime error
File size: 305 Bytes
607ecc1 |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
import gin
import librosa
import numpy as np
@gin.configurable
def extract_mfcc(
audio: np.ndarray, sample_rate: float, n_fft: int, hop_length: int, n_mfcc: int
):
mfcc = librosa.feature.mfcc(
audio, sr=sample_rate, n_mfcc=n_mfcc, n_fft=n_fft, hop_length=hop_length
)
return mfcc |