BlyxDocumentation
Browse chapters
Documentation / Workflow recipes

Linnet · Bridge short pauses in a speech-activity trace

Summarize speech-activity intervals from a precomputed frame-level envelope.

Bridge short pauses in a speech-activity trace

A brief pause inside an utterance can split a segment. Accept a caller-selected gap and preserve the original time axis. With ten milliseconds per frame, a one-frame gap stays inside a segment. A two-frame gap starts another segment.

Run the framework with your own input

Install Blyx 0.2.1 and a Rust toolchain with a host linker, then run the versioned project. Each positional argument is a number or a comma-separated numerical vector. The CLI accepts up to 16 entries per vector. The imported module accepts longer inputs.

git clone --depth 1 --branch v0.1.1 https://github.com/Rahulchaube1/blyx-linnet.git
cd blyx-linnet
blyxc native-run project.blyx -- "0,3,0,3,0,0,3" 1 1 10

API and return values

Returns [first active millisecond, exclusive active end, segment count, retained active-or-bridged milliseconds]. A silent trace returns [-1,-1,0,0]. Invalid input returns an empty vector.

ArgumentAccepted input
levelsVector of: nonnegative finite number
thresholdnonnegative finite number
gapnonnegative exact integer
frame_mspositive finite number

Use the libraries independently

The framework vendors the same library source published in these two repositories. Each module has its own package page, input contract and regression suite.

Try the program

Output Ready
Expected output
10
70
2
40
Open in the full playground →

Practice

Change levels = [0, 0], gap = 2.0. Predict the result, then run the program.

Hint

Returns [first active millisecond, exclusive active end, segment count, retained active-or-bridged milliseconds]. A silent trace returns [-1,-1,0,0].

Worked solution

The result vector is [-1, -1, 0, 0]. Compare its fields with the return layout in the API section.

Find

    let levels = [0, 3, 0, 3, 0, 0, 3];

Replace with

    let levels = [0, 0];

Find

    let gap = 1.0;

Replace with

    let gap = 2.0;

Output after the change

-1
-1
0
0