DSP

Spectral representations

stft(y[, n_fft, hop_length, win_length, …]) Short-time Fourier transform (STFT)
istft(stft_matrix[, hop_length, win_length, …]) Inverse short-time Fourier transform (ISTFT).

Magnitude scaling

amplitude_to_db(S[, ref, amin, top_db]) Convert an amplitude spectrogram to dB-scaled spectrogram.
db_to_amplitude(S_db[, ref]) Convert a dB-scaled spectrogram to an amplitude spectrogram.
power_to_db(S[, ref, amin, top_db]) Convert a power spectrogram (amplitude squared) to decibel (dB) units
db_to_power(S_db[, ref]) Convert a dB-scale spectrogram to a power spectrogram.

Time and frequency conversion

frames_to_samples(frames[, hop_length, n_fft]) Converts frame indices to audio sample indices.
frames_to_time(frames[, sr, hop_length, n_fft]) Converts frame counts to time (seconds).
samples_to_frames(samples[, hop_length, n_fft]) Converts sample indices into STFT frames.
samples_to_time(samples[, sr]) Convert sample indices to time (in seconds).
time_to_frames(times[, sr, hop_length, n_fft]) Converts time stamps into STFT frames.
time_to_samples(times[, sr]) Convert timestamps (in seconds) to sample indices.
hz_to_mel(frequencies[, htk]) Convert Hz to Mels
mel_to_hz(mels[, htk]) Convert mel bin numbers to frequencies
fft_frequencies([sr, n_fft]) Alternative implementation of np.fft.fftfreq
mel_frequencies([n_mels, fmin, fmax, htk]) Compute an array of acoustic frequencies tuned to the mel scale.