Project

muze

0.0
No release in over 3 years
Muze is a Ruby audio analysis and feature extraction library that provides audio loading, spectral analysis, feature extraction, rhythm analysis, and audio effects.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Runtime

>= 0.4, < 1.0
~> 0.1
 Project Readme

Muze

Muze is a Ruby audio feature extraction library that provides a full pipeline from audio loading to spectral analysis, feature extraction, rhythm analysis, effects, and lightweight visualization.

Image

Installation

Add this line to your application's Gemfile:

gem "muze"

Then execute:

bundle install

Or install directly:

gem install muze

Quick Start

require "muze"

y, sr = RAF.load("sample.wav", sr: 22_050)
mel = RAF.melspectrogram(y:, sr:)
mfcc = RAF.mfcc(y:, sr:, n_mfcc: 13)
tempo, beats = RAF.beat_track(y:, sr:)
RAF.specshow(Muze.power_to_db(mel), output: "mel.svg")

Main Features

Area APIs
Audio I/O RAF.load (wav, flac, mp3, ogg)
STFT stack RAF.stft, RAF.istft, RAF.magphase
Scale helpers RAF.power_to_db, RAF.amplitude_to_db
Filters RAF.mel, RAF.chroma
Features RAF.melspectrogram, RAF.mfcc, RAF.delta
Spectral descriptors centroid, bandwidth, rolloff, flatness, contrast, zcr, rms
Rhythm RAF.onset_strength, RAF.onset_detect, RAF.beat_track, RAF.tempogram
Effects RAF.hpss, RAF.time_stretch, RAF.pitch_shift, RAF.trim
Visualization RAF.specshow, RAF.waveshow

wav is loaded with wavify, and flac/mp3/ogg requires ffmpeg + ffprobe available on PATH.

Development

bundle install
bundle exec rspec

Benchmark and regression check:

bundle exec rake bench

This writes a JSON report to benchmarks/reports/latest.json and compares metrics against benchmarks/baseline.json. To refresh the baseline:

MUZE_BENCH_UPDATE_BASELINE=1 bundle exec rake bench

Quality regression thresholds for effects are documented in benchmarks/quality_thresholds.md.

Optional native extension:

bundle exec rake compile

Generate API docs:

bundle exec yard doc

License

Muze is available under the MIT License.