drumscript.audio_processor.feature_extractor.extract_features¶
- extract_features(audio_path: ndarray, sr: int) dict[str, Any][source]¶
Extracts a dictionary of features from a single audio segment. Features are returned as mean values over the segment’s duration.
- Parameters:
audio_path (np.ndarray) – The audio data array.
sr (int) – The sampling rate.
- Returns:
Dictionary of features (spectral_centroid, rms, mfccs, etc.).
- Return type:
Dict[str, Any]