Skip to content

fix(parakeet): corrupt-cache repair + real progress for the batch TDT v3 and CTC biasing models - #247

Merged
initcore0 merged 1 commit into
mainfrom
claude/hopeful-wilbur-618d2c
Aug 4, 2026
Merged

fix(parakeet): corrupt-cache repair + real progress for the batch TDT v3 and CTC biasing models#247
initcore0 merged 1 commit into
mainfrom
claude/hopeful-wilbur-618d2c

Conversation

@initcore0

Copy link
Copy Markdown
Owner

Summary

PR #246 fixed the Parakeet streaming model's corrupt-cache trap (FluidAudio's presence-only download gate skips redownload over a torn cache forever) and threaded real download progress through — but only for the streaming variants. This closes the same two gaps on the batch path:

  • ParakeetBridge.loadBatch now accepts the same onProgress seam as loadStreamSession (shared fluidProgressHandler mapping), and rethrows through the typed ParakeetBridgeError classification — cancellation stays untyped so a cancelled load can never be mistaken for a corrupt cache.
  • ParakeetFileEngine.loadTaskOnMain gains the purge-and-redownload-once repair inside the single-flight load task (mirrors ParakeetStreamingEngine): a .load failure with the parakeet-tdt-0.6b-v3 repo folder present purges it and retries once; download errors and cancellation never purge. Real download percentages and a verified-completeness-based initial status ("Downloading…" vs "Preparing…") flow to onWorkerStatus — no more silent multi-hundred-MB first download on the file/meeting path.
  • ParakeetVocabularyBiaser.ensureLoaded gets the same repair for the CTC-WS biasing model (parakeet-ctc-110m-coreml), still strictly fail-open. A cancelled transcription no longer latches loadFailed for the whole session. The manifest also covers tokenizer.json, which FluidAudio's own presence gate never checks (models load fine, tokenization then fails) — that failure now classifies as .load and repairs the same way.
  • Core (tested): ParakeetModelIntegrity batch + CTC manifests (mirroring FluidAudio 0.15.5's ModelNames.ASR.requiredModelsV3(.int8) / ModelNames.CTC) and an explicit-manifest verdict(requiredPaths:listing:) overload; FluidAudioModelsLocator.verdict(forRepoFolder:requiredPaths:); ParakeetProgressThrottle extracted and shared by both engines.

Notes

  • The batch .load failure copy ("use Redownload Model in Settings → Models") is shared with the streaming path, but that button only purges the selected streaming variant's repo — the batch repo has no explicit UI repair (the automatic one in this PR is the repair). Left as a small follow-up.

Testing

  • swift test — 2706 tests, 0 failures (6 new manifest tests: batch complete/torn/missing, CTC complete/tokenizer-less, repo-folder pins).
  • ./build.sh — full default (WhisperKit+Parakeet) build succeeds.

🤖 Generated with Claude Code

…ch TDT v3 and CTC biasing models

PR #246 closed the torn-cache trap (FluidAudio's presence-only download gate
skips redownload over a torn cache forever) for the STREAMING variants only.
The batch path had both gaps:

- ParakeetBridge.loadBatch now threads FluidAudio's ProgressHandler through
  (same ParakeetLoadPhase seam as loadStreamSession) and rethrows as the typed
  ParakeetBridgeError, cancellation passing through untyped.
- ParakeetFileEngine.loadTaskOnMain gets the purge-and-redownload-once repair
  inside the single-flight load task: a .load failure with the
  parakeet-tdt-0.6b-v3 repo folder present purges it and retries once.
  Download errors and cancellation never purge. Real download percentages +
  verified-completeness-based initial status flow to onWorkerStatus.
- ParakeetVocabularyBiaser.ensureLoaded gets the same repair for the CTC-WS
  model (parakeet-ctc-110m-coreml), still fail-open; a cancelled transcription
  no longer latches loadFailed. The manifest also requires tokenizer.json,
  which FluidAudio's own gate never checks (models load, tokenization fails).
- ParakeetModelIntegrity: batch + CTC repo manifests and an explicit-manifest
  verdict overload (core, tested); FluidAudioModelsLocator repo-folder verdict
  helper; ParakeetProgressThrottle shared by both engines.

Co-Authored-By: Claude <noreply@anthropic.com>
@initcore0
initcore0 merged commit 2f67811 into main Aug 4, 2026
11 checks passed
@initcore0
initcore0 deleted the claude/hopeful-wilbur-618d2c branch August 4, 2026 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant