whisper_language (transcription/local.rs)

parley · src-tauri/src/transcription/local.rs · rust · Apache-2.0
voice, Voice / Speech

On-device transcription using whisper.cpp, handling utterance segmentation and decoding.

// Source: https://github.com/pathorsAI/parley | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
//! On-device transcription with whisper.cpp — the "local" provider.
//!
//! whisper.cpp is not a streaming recognizer: it transcribes a finished clip.
//! So the live stream is cut into utterances first, by a small energy-based
//! endpointer ([`Endpointer`]): an utterance opens on speech (with a short
//! pre-roll so word onsets are not clipped), closes after a stretch of trailing
//! silence, and is force-closed at [`VadConfig::max_utterance`] so a monologue
//! still reaches the screen. Each closed utterance is decoded on a blocking
//! worker and emitted as one committed segment. Wh

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key