Skip to content

[Feature] Add Parakeet V3 engine + fix concurrent downloads #4

@NOGIT007

Description

@NOGIT007

Goal

Add NVIDIA Parakeet V3 engine support alongside Whisper by replacing whisper-rs with transcribe-rs, trimming the Whisper model list to 4 best models, fixing concurrent download crashes, and adding tar.gz extraction for directory-based ONNX models.

Tasks

# Task Status
1 Replace whisper-rs with transcribe-rs + add tar/flate2 deps
2 Update model registry: trim Whisper, add Parakeet V3, new fields
3 Add download tracking + tar.gz extraction for directory models
4 Rewrite TranscriptionManager for multi-engine dispatch
5 Update load_model and transcribe callers for new signatures
6 Update frontend: Parakeet engine group + extraction UI

Task Details

Task 1: Replace whisper-rs with transcribe-rs + add tar/flate2 deps

Files:

File Lines Change
src-tauri/Cargo.toml 27 Replace whisper-rs with transcribe-rs, add tar + flate2

Verification: cd src-tauri && cargo check

Task 2: Update model registry: trim Whisper, add Parakeet V3, new fields

Files:

File Lines Change
src-tauri/src/managers/model.rs 6-15 Remove Moonshine/SenseVoice from EngineType
src-tauri/src/managers/model.rs 20-30 Add download_url, is_directory to ModelInfo, remove repo_id
src-tauri/src/managers/model.rs 57-119 Remove tiny/base, add Parakeet V3 entry, update Whisper URLs
src-tauri/src/managers/model.rs 238-270 Remove get_download_url(), unused helper methods
src-tauri/src/managers/model.rs 272-300 Update list_models_grouped() to include Parakeet

Models after change:

  • whisper-small (466MB), whisper-medium (1.5GB), whisper-large-v3-turbo (1.1GB), whisper-large-v3 (1.6GB)
  • parakeet-v3 (478MB, int8 ONNX, 25 EU languages)

Verification: cd src-tauri && cargo check

Task 3: Add download tracking + tar.gz extraction for directory models

Files:

File Lines Change
src-tauri/src/commands/model.rs 1-10 Add DownloadTrackerState(Arc<Mutex<HashSet<String>>>)
src-tauri/src/commands/model.rs 63-107 Add concurrent guard + is_directory handling
src-tauri/src/commands/model.rs 110-173 Add is_directory param, extraction after download
src-tauri/src/commands/model.rs new Add extract_tar_gz() function (flate2 + tar)
src-tauri/src/lib.rs 22 Register DownloadTrackerState

Verification: cd src-tauri && cargo check

Task 4: Rewrite TranscriptionManager for multi-engine dispatch

Files:

File Lines Change
src-tauri/src/managers/transcription.rs 1-183 Full rewrite: replace whisper-rs with transcribe-rs LoadedEngine enum

Key changes:

  • LoadedEngine enum: Whisper(WhisperEngine) | Parakeet(ParakeetEngine)
  • load_model() gains engine_type: EngineType parameter
  • transcribe() changes from &self to &mut self
  • Whisper uses transcribe_samples with WhisperInferenceParams
  • Parakeet uses transcribe_samples with ParakeetInferenceParams { timestamp_granularity: Segment }

Verification: cd src-tauri && cargo check

Task 5: Update load_model and transcribe callers for new signatures

Files:

File Lines Change
src-tauri/src/commands/settings.rs 88-106 Get engine_type from ModelManager, pass to load_model()
src-tauri/src/state.rs 264-267 Change let ts to let mut ts for &mut self on transcribe()

Verification: cd src-tauri && cargo check (full clean compile)

Task 6: Update frontend: Parakeet engine group + extraction UI

Files:

File Lines Change
src/lib/types.ts 5 Trim EngineType to "whisper" | "parakeet"
src/settings/ModelTab.svelte 28-29 Add extractingModels state, expand parakeet by default
src/settings/ModelTab.svelte 32-72 Add extraction event listeners
src/settings/ModelTab.svelte 275-289 Show "Extracting..." state in model rows
src/settings/ModelTab.svelte 334 Update recommendation text

Verification: bun run build

Research Summary

Files Analyzed

File Lines Purpose
src-tauri/Cargo.toml 27 Current whisper-rs dependency
src-tauri/src/managers/model.rs 1-358 Model registry, download URLs, engine types
src-tauri/src/managers/transcription.rs 1-183 Whisper-only transcription via whisper-rs
src-tauri/src/commands/model.rs 1-174 Download command, progress events
src-tauri/src/commands/settings.rs 14-107 load_selected_model() calls tm.load_model()
src-tauri/src/state.rs 225-284 stop_and_transcribe() calls ts.transcribe()
src-tauri/src/lib.rs 1-141 App setup, state registration
src/settings/ModelTab.svelte 1-337 Model browser UI with engine groups
src/lib/types.ts 1-61 TypeScript type definitions

Key Code References

  • TranscriptionManager::load_model() at src-tauri/src/managers/transcription.rs:32 — needs engine_type param
  • TranscriptionManager::transcribe() at src-tauri/src/managers/transcription.rs:73 — needs &mut self
  • load_selected_model() at src-tauri/src/commands/settings.rs:14 — caller of load_model
  • stop_and_transcribe() at src-tauri/src/state.rs:225 — caller of transcribe
  • download_model() at src-tauri/src/commands/model.rs:63 — needs tracker + extraction
  • build_registry() at src-tauri/src/managers/model.rs:57 — model list to update
  • Reference: Handy's transcribe-rs usage at /private/tmp/Handy/src-tauri/src/managers/transcription.rs

Risks & Edge Cases

  • Risk: transcribe-rs 0.2.5 bundles whisper-rs 0.13.2 (Speech uses 0.15) — Mitigation: transcribe-rs wraps all whisper-rs calls internally; Speech no longer calls whisper-rs directly
  • Risk: ONNX Runtime increases binary size by ~40-80MB — Mitigation: acceptable for Parakeet quality gain
  • Risk: blob.handy.computer CDN may rate-limit or go down — Mitigation: swap URL to GCP Storage bucket before release
  • Risk: Parakeet model extraction takes a few seconds — Mitigation: "Extracting..." UI state with pulse animation
  • Risk: Users with whisper-tiny/base selected get fallback on upgrade — Mitigation: existing fallback logic in settings.rs finds first downloaded model

Branch: feature/parakeet-v3
Tasks: View with ctrl+t

Created with /plan-issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions