Caution

You're reading the documentation for a development version. For the latest released version, please have a look at 0.10.2.

librosa.effects.split

librosa.effects.split(y, *, top_db=60, ref=<function amax>, frame_length=2048, hop_length=512, aggregate=<function amax>)[source]

Split an audio signal into non-silent intervals.

Parameters:
ynp.ndarray, shape=(…, n)

An audio signal. Multi-channel is supported.

top_dbnumber > 0

The threshold (in decibels) below reference to consider as silence

refnumber or callable

The reference amplitude. By default, it uses np.max and compares to the peak amplitude in the signal.

frame_lengthint > 0

The number of samples per analysis frame

hop_lengthint > 0

The number of samples between analysis frames

aggregatecallable [default: np.max]

Function to aggregate across channels (if y.ndim > 1)

Returns:
intervalsnp.ndarray, shape=(m, 2)

intervals[i] == (start_i, end_i) are the start and end time (in samples) of non-silent interval i.