Skip to content

v0.8.0 - Long audio 馃帶

Latest

Choose a tag to compare

@achetronic achetronic released this 03 Jul 10:19

What's new

Parakeet can now transcribe audio of any length. Until now, anything longer than roughly 6-7 minutes crashed the model: the neural network simply cannot look at more audio than that in one go. With the new -long-audio flag, Parakeet slices long recordings into slightly overlapping windows, transcribes each one, and stitches the pieces back into a single transcript.

The hard part of stitching is deciding exactly where one window's text should end and the next one's begin. Cut in the middle of a word and that word comes out duplicated or mangled. Parakeet picks the cut point in three steps, each one stepping in when the previous cannot decide:

  1. A voice activity detector (Silero VAD) finds the longest pause in the shared region and cuts right in the middle of it, where nobody is speaking. It needs the small silero_vad.onnx model (2.3MB) in your models directory.

  2. Audio loudness: if the VAD model is not available, Parakeet cuts at the quietest moment it can find.

  3. The exact middle of the overlap, as a last resort.

On top of that, an always-on safety net compares the words on both sides of every cut and drops duplicates, keeping the version from the window that heard the most context before reaching the seam.

Tested against a 30-minute recording, now part of the repo's test data: 7 windows, 6 cuts, all of them placed on silence, not a single word duplicated or lost. Thanks to everyone who ran the release candidates on their own workloads and reported back.

The flag is off by default. Without it, audio over the limit is rejected with a clear error pointing at -long-audio, instead of crashing.

How to use it

./parakeet -long-audio
# or, tune the windows:
./parakeet -long-audio -chunk-seconds 240 -chunk-overlap-seconds 10
Flag Default Description
-long-audio false Chunk audio over the model limit instead of rejecting it
-chunk-seconds 300 Sliding-window size, in seconds
-chunk-overlap-seconds 15 Overlap between consecutive windows, in seconds
-disable-vad-based-chunking false Disable the Silero VAD layer (falls back to loudness)
-disable-mel-based-chunking false Disable the loudness layer (falls back to the midpoint)
-vad-model-path <models>/silero_vad.onnx Path to the Silero VAD ONNX model