feat: voice input, model picker, and multi-form fill#507
Merged
Conversation
Reworks the Fill Form screen: - Mic recorder (Record / Pause / Stop & Transcribe) that posts audio to the local /forms/transcribe endpoint and seeds the input box. Electron grants the `media` permission; audio only ever goes to the local service. - Extraction-model dropdown populated from /forms/models. - Select one or more templates via keyboard-accessible tiles and fill them in a single submit, with per-form outcome reporting. - Drops the manual "Template ID" and "Template Directory" inputs; adds a "Change PDF" control and drop-zone swap. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- POST /forms/transcribe forwards uploaded audio to the local Whisper sidecar (WHISPER_HOST) and returns the transcript; audio is streamed through and never persisted. Maps connection failures to 503. - GET /forms/models lists the Ollama models the local instance reports, always surfacing the configured default even if not yet pulled. - FormFill gains an optional `model` override, excluded before building the FormSubmission row (it is a runtime hint, not a column). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- LLM accepts an optional `model`, threaded through Controller and FileManipulator, falling back to OLLAMA_MODEL then qwen2.5:1.5b. - Replaces the hardcoded `mistral` default across llm.py, the Makefile pull-model target (now OLLAMA_MODEL-configurable), and test_model.py. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Adds the whisper ASR service (faster-whisper small.en) plus WHISPER_HOST and OLLAMA_MODEL wiring; app now depends on it starting. - Persists the SQLite DB in a fireform_db volume so created templates survive container rebuilds. - Adds API tests for the transcribe (incl. service-down 503) and models endpoints and the per-fill model override; gitignores local CLAUDE.md. Co-Authored-By: Claude Opus 4.7 <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
Three user-facing features for the Fill Form workflow, plus supporting infra. Built on top of current
main.🎙️ Voice input (speech-to-text)
whisperDocker sidecar —faster-whisperengine,small.enmodel, bundles ffmpeg, multi-arch (runs natively on Apple Silicon).POST /forms/transcribestreams mic audio to the local Whisper service and returns text. Audio is never persisted — nothing leaves the machine. Connection failures map to 503.mediapermission.🤖 Model picker
GET /forms/modelslists the local Ollama models, always surfacing the configured default even if not yet pulled.modeloverride onFormFill(runtime hint, not persisted to the DB).mistraldefault withqwen2.5:1.5bacrossllm.py, the Makefilepull-modeltarget (nowOLLAMA_MODEL-configurable), andtest_model.py.📋 Multi-form fill
🛠️ Infra
fireform_dbvolume so created templates survive container rebuilds.WHISPER_HOST/OLLAMA_MODELwiring; app now depends on the whisper service starting.Testing
make test→ 19/19 pass, including 5 new tests covering/transcribe(incl. service-down 503),/models(incl. Ollama-down fallback), and the per-fill model override.Notes
🤖 Generated with Claude Code