8 releases

0.1.7 Dec 28, 2024
0.1.6 Aug 20, 2024
0.1.5 Jul 24, 2024

#210 in Audio

Download history 4/week @ 2024-09-18 15/week @ 2024-09-25 3/week @ 2024-10-02 1/week @ 2024-11-13 3/week @ 2024-11-27 31/week @ 2024-12-04 20/week @ 2024-12-11 44/week @ 2024-12-18 204/week @ 2024-12-25 16/week @ 2025-01-01

290 downloads per month

GPL-3.0-only

150KB
2K SLoC

aus

This is a crate for audio processing and analysis in Rust, combining new functionality with aggregated functionality from other existing crates. For example, this crate provides wrappers for rustfft, allowing a FFT to be performed with a single function call. It also has a STFT/ISTFT function pair. It also has built-in window generation in the style of numpy. And there are implementations of spectral feature extraction, such as calculating spectral centroid, entropy, slope, etc.

Primary Goals

  • Abstraction of existing crates (rustfft, symphonia, hound, fft-convolver), allowing their functionality to be used with a simple function call or so.
  • FFT functionality designed not just for analysis, but also for FFT modification and resynthesis, including STFT.
  • Analysis tools that compute spectral and audio features for analysis and synthesis projects.
  • Multithreaded tools for more efficient processing. At present, there is a multithreaded analyzer that allows spectral analysis data to be computed much more quickly for an entire audio file.
  • Fast audio feature extraction in Rust, for speeding up Python libraries (e.g. https://github.com/fleximeter/aus-analyzer)

Features

  • Audio read/write using symphonia and hound. Reads multiple formats, but only writes to WAV.
  • FFT processing courtesy of rustfft. Includes real FFT, inverse real FFT, real STFT, inverse real STFT, spectrum decomposition and recomposition.
  • Spectral transformations (scrambling FFT bins and STFT frames, as well as spectral freeze). Includes a convenience wrapper for fft-convolver.
  • Granular synthesis tools
  • Tuning computation
  • Basic audio manipulation (fade in/out, panning)
  • Spectral analysis tools:
    • Alpha ratio
    • Hammarberg index
    • Harmonicity
    • Spectral centroid
    • Spectral difference
    • Spectral entropy
    • Spectral flux
    • Spectral flatness
    • Spectral kurtosis
    • Spectral roll-off-points
    • Spectral skewness
    • Spectral slope (including slope of sub-bands)
    • Spectral variance

License

This crate is dual-licensed under the MIT and GPL 3.0 (or any later version) licenses. You can choose between one of them if you use this crate.

SPDX-License-Identifier: MIT OR GPL-3.0-or-later

Dependencies

~19MB
~417K SLoC