Skip to content

feat: transcribe audio/video files with progress, history, and srt/vtt export#33

Merged
ElbertePlinio merged 1 commit into
mainfrom
feat/file-transcription-ui
Jul 9, 2026
Merged

feat: transcribe audio/video files with progress, history, and srt/vtt export#33
ElbertePlinio merged 1 commit into
mainfrom
feat/file-transcription-ui

Conversation

@ElbertePlinio

Copy link
Copy Markdown
Member

Closes #30 — PR 2 of 2 (commands + UI; core landed in #32).

What changed

  • src-tauri/src/file_job.rs (new): file transcription session — worker thread pipeline (convert → transcribe → optional cleanup → history), pickscribe://file progress events, single-job guard, cancel token, and a panic-safe Drop guard that always removes the per-job temp dir and frees the job slot (recovers a poisoned mutex).
  • Commands: transcribe_media_file, cancel_file_transcription, pick_media_file (native open dialog, Rust-side via tauri-plugin-dialog), export_history_entry (TXT/SRT/VTT via save dialog). ffmpeg added to run_doctor.
  • UI: window drag-drop with ember overlay, dashboard "drop or browse" affordance, confirm panel with "Clean up with AI" default off, live progress + cancel (indeterminate until whisper's first tick), done/error/cancelled cards, History file badges + per-entry TXT/SRT/VTT export chips (SRT/VTT need segments). Modal follows the app convention: Esc/backdrop dismiss for non-running states, focus lands in the dialog.
  • HistoryDb::metrics now excludes file-sourced rows so file transcriptions don't inflate dictation sessions/minutes-saved.
  • Silent media emits "no speech detected" instead of saving an empty entry; a failed opt-in cleanup surfaces as "cleanup skipped: …" on the done card instead of silently falling back.

Privacy invariants

Transcription is fully local (spawned ffmpeg + whisper-cli). The cleanup LLM call happens only when the user flips the per-file toggle (default off); local-only mode keeps its existing gating. File jobs never paste, touch the clipboard, or play sounds.

Tested

  • cargo test --workspace --locked --all-targets: 79 passed (new: metrics exclusion regression, export content/filename, extension validation, file-job payloads).
  • bun run check: 0 errors. bun run test:coverage: 19 tests, coverage ratchet green.
  • ffmpeg conversion flags verified live against WAV/MP3/MP4 samples; whisper JSON/progress format verified against the installed whisper-cli.
  • Reviewed by a 3-model panel + anti-overengineering gate; all findings fixed or dismissed with rationale.

Not tested yet

  • Interactive drag-drop/native-dialog smoke in a real desktop session (needs a live Wayland run; logic extracted to pure TS and unit-tested, wiring type-checked against the Rust contract).

Known deferrals

  • Cancel during the optional cleanup step takes effect only after the LLM call returns (temp files still cleaned).
  • Multi-file drop takes the first media file silently.
  • Word-level timestamps (issue notes segment-level for v1).

@ElbertePlinio

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: a59cf2b9d9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ElbertePlinio ElbertePlinio merged commit 111f752 into main Jul 9, 2026
1 check passed
@ElbertePlinio ElbertePlinio deleted the feat/file-transcription-ui branch July 9, 2026 22:21
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.

Transcribe a file: drop audio/video, get transcript + SRT/VTT export

1 participant