Utilities

Convert

audioflux.utils.power_to_db(X[, min_db])

Convert power spectrogram to relative decibel(dB) spectrogram.

audioflux.utils.power_to_abs_db(X[, ...])

Convert power spectrogram to absolute decibel(dB) spectrogram

audioflux.utils.mag_to_abs_db(X[, ...])

Convert magnitude spectrogram to absolute decibel(dB) spectrogram

audioflux.utils.log_compress(X[, gamma])

log compression

audioflux.utils.log10_compress(X[, gamma])

log10 compression

audioflux.utils.temproal_db(X[, base])

Calculate the time domain DB

audioflux.utils.delta(X[, order])

Compute delta features

audioflux.utils.get_phase(D)

Extract phase data from a complex-valued spectrogram D.

Filter

audioflux.utils.auditory_weight_a(fre_arr)

Compute the weight-a of a set of frequencies.

audioflux.utils.auditory_weight_b(fre_arr)

Compute the weight-b of a set of frequencies.

audioflux.utils.auditory_weight_c(fre_arr)

Compute the weight-c of a set of frequencies.

audioflux.utils.auditory_weight_d(fre_arr)

Compute the weight-d of a set of frequencies.

Scale

audioflux.utils.min_max_scale(X)

min max scale

audioflux.utils.stand_scale(X[, tp])

stand scale

audioflux.utils.max_abs_scale(X)

max abs scale

audioflux.utils.robust_scale(X)

robust scale

audioflux.utils.center_scale(X)

center scale

audioflux.utils.mean_scale(X)

mean scale

audioflux.utils.arctan_scale(X)

arctan scale

Audio

audioflux.read([path, dir, is_mono, ...])

Load an audio file as a NumPy array of floats.

audioflux.write(path, data[, samplate, ...])

Write audio data from a NumPy array to the file.

audioflux.convert_mono(x)

Convert audio data from multi-channel to single-channel

audioflux.resample(x, source_samplate, ...)

Resample audio data from source_sr to target_sr

audioflux.chirp(fmin, fmax, duration[, ...])

chirp signal

audioflux.WaveReader(file_path)

Wave Reader

audioflux.WaveWriter(file_path[, samplate, ...])

Wave Writer

Utils

audioflux.utils.note_to_midi(note)

Convert note to MIDI number.

audioflux.utils.note_to_hz(note)

Convert note to the frequency (Hz).

audioflux.utils.midi_to_note(midi[, is_octave])

Convert MIDI number to note.

audioflux.utils.midi_to_hz(midi)

Convert MIDI number to the frequency (Hz).

audioflux.utils.hz_to_note(frequencies)

Convert the frequency (Hz) to note.

audioflux.utils.hz_to_midi(frequencies)

Convert the frequency (Hz) to MIDI number.

audioflux.utils.synth_f0(times, frequencies, ...)

Generate an audio array based on the frequency f0.

Sample

audioflux.utils.sample_path(name)

Get sample path