Utilities

Array operations

frame(y[, frame_length, hop_length]) Slice a time series into overlapping frames.
pad_center(data, size[, axis]) Wrapper for np.pad to automatically center an array prior to padding.
fix_length(data, size[, axis]) Fix the length an array data to exactly size.
fix_frames(frames[, x_min, x_max, pad]) Fix a list of frames to lie within [x_min, x_max]
index_to_slice(idx[, idx_min, idx_max, …]) Generate a slice array from an index array.
softmask(X, X_ref[, power, split_zeros]) Robustly compute a softmask operation.
sync(data, idx[, aggregate, pad, axis]) Synchronous aggregation of a multi-dimensional array between boundaries
softmask(X, X_ref[, power, split_zeros]) Robustly compute a softmask operation.
axis_sort(S[, axis, index, value]) Sort an array along its rows or columns.
normalize(S[, norm, axis, threshold, fill]) Normalize an array along a chosen axis.
roll_sparse(x, shift[, axis]) Sparse matrix roll
sparsify_rows(x[, quantile]) Return a row-sparse matrix approximating the input x.
buf_to_float(x[, n_bytes, dtype]) Convert an integer buffer to floating point values.
tiny(x) Compute the tiny-value corresponding to an input’s data type.

Matching

match_intervals(intervals_from, intervals_to) Match one set of time intervals to another.
match_events(events_from, events_to[, left, …]) Match one set of events to another.

Miscellaneous

localmax(x[, axis]) Find local maxima in an array x.
peak_pick(x, pre_max, post_max, pre_avg, …) Uses a flexible heuristic to pick peaks in a signal.

Input validation

valid_audio(y[, mono]) Validate whether a variable contains valid, mono audio data.
valid_int(x[, cast]) Ensure that an input value is integer-typed.
valid_intervals(intervals) Ensure that an array is a valid representation of time intervals:

File operations

example_audio_file() Get the path to an included audio example file.
find_files(directory[, ext, recurse, …]) Get a sorted list of (audio) files in a directory or directory sub-tree.