Skip to main content

Crate spafe

Crate spafe 

Source
Expand description

Native Rust implementation of the core spafe audio feature extraction APIs.

The crate keeps the Python package’s module vocabulary while exposing idiomatic Rust option structs and Result-based errors.

Enable the portable-simd Cargo feature on nightly Rust to use std::simd in the crate’s hot numeric kernels.

Modules§

cochleagram
Cochleagram generation with ERB half-cosine filters, envelopes, downsampling, and compression.
fbanks
Filter-bank builders for Mel, inverse Mel, linear, Bark, and gammatone scales.
features
Spectrogram and cepstral feature extractors.
frequencies
Fundamental and dominant frequency estimation helpers.
prelude
Convenient glob-style re-exports for common crate APIs.
spfeats
Spectral descriptor helpers and aggregate descriptor output.
utils
Converters, preprocessing, cepstral, spectral, exception, and visualization utilities.

Structs§

CqccOptions
Additional options for constant-Q cepstral coefficient extraction.
FeatureOptions
Options shared by cepstral feature extractors and spectrogram builders.
FilterBankOptions
Options shared by Mel, linear, Bark, and gammatone filter-bank builders.
SlidingWindow
Frame-blocking configuration used before spectral feature extraction.
SpectrogramOutput
Spectrogram output containing filtered energies and the underlying FFT magnitudes.

Enums§

BarkConversionApproach
Formula used to convert between Hertz and Bark.
ErbConversionApproach
Formula used to convert between Hertz and ERB.
MelConversionApproach
Formula used to convert between Hertz and Mel.
Normalization
Cepstral normalization mode.
Scale
Filter-bank scaling strategy.
SpafeError
Errors returned by invalid feature, filter-bank, and preprocessing parameters.
WindowType
Window function applied during frame blocking.

Type Aliases§

Matrix
Two-dimensional f64 matrix used for frames, filter banks, spectrograms, and features.
Result
Crate-local result type returned by fallible spafe operations.
Vector
One-dimensional f64 vector used for frequency lists, pitch tracks, and energies.