fix(parakeet): corrupt-cache repair + real progress for the batch TDT v3 and CTC biasing models - #247
Merged
Merged
Conversation
…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>
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
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.loadBatchnow accepts the sameonProgressseam asloadStreamSession(sharedfluidProgressHandlermapping), and rethrows through the typedParakeetBridgeErrorclassification — cancellation stays untyped so a cancelled load can never be mistaken for a corrupt cache.ParakeetFileEngine.loadTaskOnMaingains the purge-and-redownload-once repair inside the single-flight load task (mirrorsParakeetStreamingEngine): a.loadfailure with theparakeet-tdt-0.6b-v3repo 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 toonWorkerStatus— no more silent multi-hundred-MB first download on the file/meeting path.ParakeetVocabularyBiaser.ensureLoadedgets the same repair for the CTC-WS biasing model (parakeet-ctc-110m-coreml), still strictly fail-open. A cancelled transcription no longer latchesloadFailedfor the whole session. The manifest also coverstokenizer.json, which FluidAudio's own presence gate never checks (models load fine, tokenization then fails) — that failure now classifies as.loadand repairs the same way.ParakeetModelIntegritybatch + CTC manifests (mirroring FluidAudio 0.15.5'sModelNames.ASR.requiredModelsV3(.int8)/ModelNames.CTC) and an explicit-manifestverdict(requiredPaths:listing:)overload;FluidAudioModelsLocator.verdict(forRepoFolder:requiredPaths:);ParakeetProgressThrottleextracted and shared by both engines.Notes
.loadfailure 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