Skip to content

fix: load Parakeet from Pindrop's model cache - #87

Open
farooqu wants to merge 2 commits into
watzon:mainfrom
farooqu:fix/parakeet-cache-path
Open

fix: load Parakeet from Pindrop's model cache#87
farooqu wants to merge 2 commits into
watzon:mainfrom
farooqu:fix/parakeet-cache-path

Conversation

@farooqu

@farooqu farooqu commented Jul 30, 2026

Copy link
Copy Markdown

Summary

Fix Parakeet activation so Pindrop loads the model from the same Pindrop-owned cache used for download and discovery, rather than silently starting a second FluidAudio download.

Fixes #86.

Problem

Pindrop reported parakeet-tdt-0.6b-v3 as installed, then remained in model loading until the fixed 120-second watchdog fired. Recordings afterward failed with modelNotLoaded.

The two conflicting roots were:

  • Pindrop download/discovery: ~/Library/Application Support/Pindrop/FluidInference/parakeet-coreml/
  • ParakeetEngine activation: ~/Library/Application Support/FluidAudio/Models/

TranscriptionService supplied Pindrop's Application Support root to the engine, but ParakeetEngine.loadModel(name:downloadBase:) ignored it and called FluidAudio's no-directory overload.

Runtime evidence

A clean runtime experiment removed the Parakeet directories from FluidAudio's shared cache and launched Pindrop once. FluidAudio created only parakeet-tdt-0.6b-v3; after 30 seconds it contained about 24 MB, with a decoder, an incomplete encoder, and no preprocessor, joint model, or vocabulary.

Copying the complete ~461 MB Pindrop-owned cache into that exact FluidAudio runtime location—with no code or settings change—made the released app load successfully in 12.03 seconds instead of timing out. This confirmed that activation was ignoring Pindrop's complete model and starting a duplicate download.

History and root cause

The split dates to the original integration:

  • bbdeffc established Pindrop-owned Parakeet storage.
  • e041590 added ParakeetEngine using the no-directory overload despite accepting downloadBase.
  • 4058bca made ModelManager use downloadAndLoad(to:version:) in Pindrop's tree.
  • f90cd4f normalized Parakeet folder suffixes during discovery.

FluidAudio's to: overload already existed before 0.15. FluidAudio 7f1e006 later changed the default local Repo.folderName rule to remove -coreml. Pindrop's 075afb1 adoption of FluidAudio 0.15.4 updated manager/decoder APIs but retained the engine's no-directory call.

At pinned FluidAudio b9d43724, AsrModels.downloadAndLoad(to:) takes the supplied URL's parent and DownloadUtils appends Repo.folderName. Thus the canonical local leaves are suffix-less even when the supplied URL or remote repository name contains -coreml.

Fix

  • Resolve Parakeet v2/v3 through one small shared location helper.
  • Derive the local leaf from FluidAudio's Repo.folderName.
  • Pass the resolved Pindrop-owned directory to AsrModels.downloadAndLoad(to:version:) during activation.
  • Use the same location for ModelManager download, discovery, existing-path lookup, and deletion.
  • Use AsrModels.modelsExist(at:version:) so partial artifact sets are not advertised as installed.

When Pindrop supplies downloadBase, activation no longer uses or creates the FluidAudio shared Parakeet cache.

Migration and compatibility

If the canonical suffix-less Pindrop directory is absent and the old suffixed sibling exists, Pindrop moves the legacy directory to the canonical name. This is a same-volume rename rather than a second ~461 MB copy.

If the canonical destination already exists, migration does nothing: it does not overwrite, merge, delete, or reconcile the directories. Move failures are logged and leave the legacy directory intact. FluidAudio's separate shared cache is never migrated or deleted.

Tests

Added network-free temporary-directory coverage for:

  • canonical v2 and v3 paths matching FluidAudio Repo.folderName;
  • complete versus partial Parakeet v3 artifact sets;
  • moving a legacy suffixed directory when canonical is absent;
  • leaving legacy untouched when canonical already exists.

Validation performed here:

  • git diff --check upstream/main — passed.
  • Exact pinned FluidAudio b9d43724 source inspected for its folder-name and custom-directory behavior.

just build and just test require macOS/Xcode and were not runnable in the Linux orb used to prepare this change. The fork's configured macOS workflow did not enqueue, so this PR does not claim a passing macOS run yet.

Non-goals

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.

[Bug]: Parakeet v3 times out during load and startup [Bug]: Cannot download / use Whisper Base (English) or other Models

2 participants