Add Parakeet TDT v2 for English-only transcription - #1723
Open
kedev wants to merge 7 commits into
Open
Conversation
Author
|
@r3dbars - Fixed merge conflicts. Let me know if you have any other feedback. Thank you! 🙏 |
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.
Summary
This PR adds support for Parakeet TDT v2 as an additional transcription model option alongside Parakeet v3 and the existing Whisper models.
Thank you so much for the time & effort you put into this project! I use this daily and it’s been a big help with keeping on top of my workload. I’ve been trying to find a project like this for months and was stoked to come across one of your posts linking to it. The quality and attention to detail you’ve added with the UX and features is fantastic.
Let me know if you have any feedback, happy to fold it in.
Why
My main motivation is to fix an issue I’ve run into with v3, which is when someone speaks English with a strong accent, the model will occasionally interpret the speech as another language and start transcribing in that language. Since v2 only supports English, it avoids that issue and keeps the transcription in English even when accents are heavy.
Another benefit of adding v2 is that it performs better in benchmarks (lower error rate) than v3 on English transcriptions. Since all of my meetings are in English, that is very much appreciated, even if the difference is small.
So in summary:
Product Impact
dictation,meetings,agent artifacts(plus model-selection UI/docs).meeting reliability/dictation reliability.What changed
parakeet_v2_localto saved artifacts while preserving v3'sparakeet_localand existing footer text.How I checked it
Verified feature commit:
2c6e2bc1, Apple Silicon, Xcode 26.6 with Metal Toolchain 17F109.python3 scripts/dev/agent-context.py --base 792d82e1andbash scripts/dev/agent-preflight.sh: checked owners and the complete changed-path matrix union.bash build-deps.sh --force,bash build.sh --no-open,bash run-tests.sh,bash run-integration-smoke.sh,python3 scripts/dev/check-build-source-lists.py,bash run-e2e-smoke.sh, shell syntax checks for both integration entrypoints, andswift test --package-path Tools/TranscriptedQA.TRANSCRIPTED_RUNTIME_BUDGET=1 bash build.sh --no-open: exit 0; 88.5 MiB app, 937 ms interactive launch. No live dictation samples, so runtime latency/RTF remains unmeasured. Ambient on-demand model-ready events are not a controlled load-time benchmark.774d8fe9; fast/integration reruns pass.2c6e2bc1: no must-fix; no outstanding code-review blockers.Final app-created artifact validation: 94 checks pass, zero fail, with seven expected warnings for absent dictations and optional capture-quality metadata on six synthetic imports. Live microphone-dependent dictation/meeting/overlap and hardware paste-back tests were intentionally skipped: the test Mac has no microphone, and permission recognition was unresolved. Full-app network denial was not separately tested; network-denied inference was tested in the exact-dependency harness. Synthetic inference is execution proof, not accent-quality or Bluetooth/Zoom hardware proof. Existing upstream compiler warnings are not represented as warning-free builds.
Risk Review
.agent-review/visuals/; no committed workpad.Notes
Sanitized Settings screenshot
The shared-engine lifecycle changes are needed to prevent native load overlap and preserve active-job model identity when switching variants; this is not a general Speech refactor. Meetings still use the existing adapter/router and Core remains a library boundary.
Additional Notes
Written and prepared with GPT-6 Astra in Codex. Reviewed with Fable 5.1
Diff size
Measured with
git diff --numstat 792d82e1 HEADafter the requested cleanup; counts describe the complete contribution, not just the last commit. These are changed text lines, including comments and whitespace, not executable-LOC estimates.Classification: all changed Markdown files are documentation, including test READMEs. Main code includes nine app source files plus the QA validator implementation. Test code includes fixtures, test suites and both test-runner scripts. One additional sanitized Settings JPEG (62,712 bytes) has no text-line count: 31 changed files overall.
Main-code files changed
Sources/Support/TranscriptionModelPreferences.swift— adds v2 as a persisted choice, English-only labels, variant-specific cache requirements and a distinct artifact identifier; keeps v3 as default and existing identifiers compatible.Sources/Support/ExistingInstallModelPrefetchPolicy.swift— extends existing-install prefetch eligibility to the selected Parakeet variant, so v2 receives the existing background-download behavior.Sources/Support/ModelCacheInventory.swift— recognizes complete v2/v3 caches, protects supported v2 directories from stale-cache deletion, and migrates legacy folders without merging, overwriting or following linked endpoints.Sources/Speech/ParakeetEngine.swift— tracks requested versus loaded variant, exposes variant-specific readiness/local-file checks, and finishes deferred teardown after active transcription drains.Sources/Speech/ParakeetModelInitDiagnostics.swift— adds selection/prefetch admission rules, a cancellation-safe teardown gate, native-task draining and variant/generation tokens; validates bundled files for the requested variant.Sources/Speech/ParakeetModelLifecycle.swift— downloads/loads the selected FluidAudio version, rejects stale asynchronous results, preserves active inference and waits for canceled loads/cleanup before allocating a successor.Sources/Speech/TranscriptionModelWarmupOwnership.swift— maps both Parakeet variants to the same runtime, reusing foreground ownership so overlapping work cannot unload each other's model.Sources/Speech/STTRouter.swift— routes readiness, warmup and inference by concrete model; establishes recording identity before async warmup, preserves active leases and forwards the matching published download state.Sources/UI/Settings/TranscriptedSettingsView.swift— updates the existing Model help text to explain v2 versus v3 and shared-runtime overlap behavior; no new settings screen.Tools/TranscriptedQA/Sources/TranscriptedQA/Validators/TranscriptValidator.swift— accepts the newparakeet_v2_localartifact identifier while retaining strict rejection of unknown engines.Key changes and user impact
Agent handoff
COORD_DONE: GREEN | no PR yet | optional v2 with safe shared model ownership | no GitHub cleanup | human draft review; live checks intentionally skipped | full QA 15/15, four native model imports, active-import switch, independent diff review | lanes used: Codex=full independent reviewer plus cache/artifact reviewer; Claude=skipped, covered by Codex; Local=skipped, no triage needed; Windows=skipped, macOS-only scope | human reviews and opens draft PR