Structure and segmentation#

librosa.segment provides functions for structural analysis and segmentation of audio.

This includes recurrence (self-similarity) and cross-similarity matrix computation, filtering and transformations of similarity matrices, and temporal segmentation by clustering.

cross_similarity

Compute cross-similarity from one data sequence to a reference sequence.

recurrence_matrix

Compute a recurrence matrix from a data matrix.

recurrence_to_lag

Convert a recurrence matrix into a lag matrix.

lag_to_recurrence

Convert a lag matrix into a recurrence matrix.

timelag_filter

Apply a filter in the time-lag domain.

path_enhance

Multi-angle path enhancement for self- and cross-similarity matrices.

agglomerative

Bottom-up temporal segmentation.

subsegment

Sub-divide a segmentation by feature clustering.