feat(transcription): ParakeetEngine via sherpa-rs transducer (Track-B step 2)#10
Open
farce1 wants to merge 1 commit into
Open
feat(transcription): ParakeetEngine via sherpa-rs transducer (Track-B step 2)#10farce1 wants to merge 1 commit into
farce1 wants to merge 1 commit into
Conversation
… AsrEngine Track-B step 2. Implements NVIDIA Parakeet-TDT-v3 via sherpa-rs' TransducerRecognizer (nemo_transducer, greedy_search, 16kHz/80-dim) behind the AsrEngine trait — reusing the existing sherpa-rs / ONNX Runtime. No transcribe-rs, no second ONNX Runtime, no new dependency (the dual-ORT risk is avoided). A string-dispatched load_engine(engine, model_dir) factory selects the engine via WorkerConfig.asr_engine (default 'whisper' — behavior unchanged). Parakeet model-dir resolution, engine-selection setting/UI, and model download follow in later steps.
This was referenced Jun 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What — Track-B step 2 (stacked on #9)
Implements NVIDIA Parakeet-TDT-v3 behind the
AsrEnginetrait from #9 — and, after verifying the sherpa-rs API, does it with zero new dependencies.Why sherpa-rs, not transcribe-rs
You asked for transcribe-rs; researching it surfaced a real cost: transcribe-rs pulls
ort(ONNX Runtime 1.22), which collides with oursherpa-rs-sys's bundled ONNX Runtime (~1.17) — and we must keep sherpa (VAD + diarization). That meant a second ONNX Runtime +ortload-dynamic + dylib bundling. You opted to verify the sherpa path first — and it works:sherpa-rs 0.6.8shipstransducer::TransducerRecognizer(wrapsSherpaOnnxOfflineRecognizer), which loads NeMo Parakeet-TDT directly. So Parakeet rides our existing sherpa-rs / single ONNX Runtime. No transcribe-rs, no dual-ORT, no packaging changes.Changes
engine.rs:ParakeetEnginewrappingTransducerRecognizer(model_type="nemo_transducer",decoding_method="greedy_search", 16 kHz / feature_dim 80, CPU), implementingAsrEngine→AsrOutput { text, language: "" }.engine.rs:load_engine(engine: &str, model_dir) -> Box<dyn AsrEngine>— string dispatch mirroring the existingmeetings.asr_enginevalue; default"whisper".worker.rs/mod.rs: worker builds the engine via the factory fromWorkerConfig.asr_engine(set to"whisper"for now → behavior unchanged).Verification
cargo check+clippy -D warningspass — confirms Parakeet compiles against sherpa-rs (the key de-risking) with no dead-code. Fullcargo test: only the pre-existingmodel_archive_consts_tests(REPLACE_WITH_placeholders) fail.encoder/decoder/joiner.int8.onnx+tokens.txtfromcsukuangfj/sherpa-onnx-nemo-parakeet-tdt-0.6b-v3-int8) + a real recording. Same untestable-in-CI nature as the existing Whisper FFI path.Model (next step)
Use the sherpa-onnx export
sherpa-onnx-nemo-parakeet-tdt-0.6b-v3-int8(NOT Handy's transcribe-rs tarball — different layout). Next steps: per-engine model-dir resolution inmodel.rs, the download (parallel to the Whisper download), the engine-selection setting (default Parakeet-v3, Whisper-turbo fallback) + picker UI.Merge notes
Stacked on #9 (base =
feat/asr-engine-trait); retarget tomainonce #9 merges. Overlapsworker.rs/mod.rswith #4/#6/#8.CI red on the usual maintainer-only blockers (vendor binary +
REPLACE_WITH_), not this PR. Attribution: Parakeet-TDT-0.6B-v3 is CC-BY-4.0 (credit NVIDIA in the app's licenses screen).