Librosax

Spectral representations

stft(waveform, n_fft[, hop_length, ...])

Compute the Short-Time Fourier Transform (STFT) of a waveform.

istft(stft_matrix[, hop_length, win_length, ...])

Compute the Inverse Short-Time Fourier Transform (ISTFT).

Magnitude scaling

amplitude_to_db(S, *[, ref, amin, top_db, axes])

Convert an amplitude spectrogram to decibel (dB) units.

power_to_db(S, *[, ref, amin, top_db, axes])

Convert a power spectrogram to decibel (dB) units.

Signal generation and mixing

tone(frequency, *[, sr, length, duration, phi])

Construct a pure tone (cosine) signal at a given frequency.

autocorrelate(y, *[, max_size, axis])

Bounded-lag auto-correlation.

to_mono(*signals[, pad, norm])

Downmix one or more signals to a single mono channel.

to_stereo(*, left, right[, downmix, pad, norm])

Combine two signals into a stereo signal.

to_multi(*signals[, downmix, pad, norm])

Combine several signals into one multi-channel signal.

fix_length(data, *, size[, axis])

Fix the length of an array along an axis by trimming or zero-padding.

Frequency utilities

fft_frequencies(*[, sr, n_fft])

Alternative interface for jnp.fft.rfftfreq

Submodules

feature

Feature extraction

layers

Neural network layers