Skip to content

Add transcription model selection and lifecycle management - #21

Merged
vokac-nri merged 4 commits into
mainfrom
codex/transcription-model-manager
Jul 16, 2026
Merged

Add transcription model selection and lifecycle management#21
vokac-nri merged 4 commits into
mainfrom
codex/transcription-model-manager

Conversation

@vokac-nri

Copy link
Copy Markdown
Collaborator

Summary

This PR turns the transcription settings from two loosely coupled text fields into an explicit transcription model manager. Users can discover and select installed local models or an external server, see the current runtime state, and control local model memory/process lifecycle without starting a meeting.

The feature branch has been brought fully up to date with main at 708f7df, including the dashboard/export work, shared Nemotron storage and provisioning changes, Windows process-tree cleanup, installer upgrade fix, and Wails/dependency updates.

User experience

Model selection

Settings → Transcription now presents a model selector containing:

  • Automatic (recommended): prefer installed Nemotron on a supported NVIDIA GPU and fall back to installed CPU Whisper.
  • Nemotron 3.5 ASR Streaming: explicitly require the installed GPU model.
  • Installed Whisper models: discover every .bin model under resources/whisper/models and expose each as a separate choice.
  • External server: reveal a URL field for a whisper.cpp-compatible /inference endpoint.

Unavailable choices remain visible with a concrete reason, and a previously selected Whisper file that has since been removed is represented as a missing selection rather than silently changing the saved configuration.

Runtime lifecycle

For local models, users can:

  • Start a stopped or failed model while Parley is idle.
  • Stop a loading or ready model to release the process and model memory.
  • Restart a loading, ready, or failed model.

Changing models or using lifecycle controls is blocked while a meeting is active. Starting a meeting automatically loads a selected local model if it was previously stopped, so releasing memory between meetings does not make the next meeting fail unexpectedly.

External servers expose a Test action that verifies URL validity and HTTP reachability. Parley intentionally does not attempt to start, stop, or restart remote processes.

Status visibility

The settings panel and application footer now distinguish:

  • loading
  • ready
  • stopped
  • externally configured
  • error

Status messages show the configured/actual model and useful startup failure details. Runtime changes are emitted to the frontend so model state updates without reopening Settings.

Selection and fallback semantics

  • Automatic retains Parley's original GPU-first behavior and may fall back from Nemotron to Whisper.
  • Explicit Nemotron never silently falls back to CPU; GPU, installation, or startup failures are reported.
  • Explicit Whisper uses exactly the selected installed model and reports if it is missing.
  • External skips local preload and requires a valid HTTP(S) URL.

This distinction lets users choose between resilience and strict control rather than having every selection silently resolve to a different backend.

Persistence and compatibility

  • Adds settings.stt_engine with auto, nemotron, whisper, and external values.
  • Migrates existing databases safely:
    • a legacy non-empty remote URL becomes external;
    • otherwise the existing GPU-first behavior becomes auto.
  • Persists transcription configuration independently so model lifecycle changes do not overwrite unrelated settings.
  • Continues supporting existing whisper_model and stt_base_url values.

Integration with current main

The branch was merged with current main and conflicts were resolved in README documentation and generated settings bindings. The combined implementation also received a semantic integration fix: Nemotron inventory now recognizes the shared LocalAppData installation and .source-root redirects introduced by the newer provisioning flow, in addition to legacy beside-the-executable installations.

The existing Windows kill-on-close process supervision remains in the local STT server, so Stop, Restart, model changes, application shutdown, and installer upgrades clean up child process trees rather than leaving Python/CUDA descendants behind.

Backend/API changes

New Wails service methods:

  • ListTranscriptionModels
  • ConfigureTranscription
  • StartTranscriptionModel
  • StopTranscriptionModel
  • RestartTranscriptionModel
  • TestExternalTranscription

RuntimeInfo now includes the selected model ID, local/external kind, lifecycle status, and a human-readable status message.

Validation

  • Merged origin/main with conflicts resolved and no remaining conflict markers.
  • Regenerated 281-package TypeScript bindings with Wails v3.0.0-alpha2.117.
  • go test -count=1 ./...
  • go vet ./...
  • Production-tagged Windows executable build
  • npx tsc --noEmit
  • npm run build with Vite 8.1.5
  • git diff --check

Coverage includes legacy settings migration, explicit-selection fallback behavior, external reachability, local Stop/Start reuse, active-meeting lifecycle guards, runtime reporting, and recognition of the shared Nemotron installation.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces an explicit transcription model manager (local Nemotron/Whisper discovery + external server option) and adds lifecycle controls (start/stop/restart) with richer runtime status reporting, aligning the Settings UI and runtime behavior with the new model-selection semantics.

Changes:

  • Add backend model inventory, persisted selection (stt_engine), lifecycle APIs, and expanded runtime status (stopped/loading/ready/configured/error).
  • Update frontend Settings UI to select/test/manage transcription models and display live runtime state.
  • Update README and regenerate Wails TypeScript bindings for the new APIs and models.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
README.md Updates documentation to reflect model selection UI and lifecycle semantics.
meeting_service.go Implements model selection, validation, lifecycle management, and expanded runtime info.
meeting_service_test.go Adds tests covering explicit selection semantics, lifecycle controls, and external reachability.
internal/store/store.go Adds stt_engine, migration logic, and SaveTranscriptionSettings for atomic transcription persistence.
internal/store/store_test.go Extends settings persistence tests and adds a legacy migration test.
frontend/src/components/SettingsDialog.tsx Replaces legacy fields with model selector, test, lifecycle actions, and runtime-status panel.
frontend/src/App.tsx Enhances footer status display and passes meeting/runtime state into SettingsDialog.
frontend/bindings/** Regenerated bindings to expose new types and MeetingService methods.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread frontend/src/components/SettingsDialog.tsx Outdated
Comment thread meeting_service.go
Comment on lines +312 to 319
if settings.SttEngine == "external" {
remote := strings.TrimSpace(settings.SttBaseURL)
if remote == "" {
return m.fail("The external transcription URL is empty. Choose a local model or configure the server URL in Settings.", errors.New("external transcription URL is empty"))
}
log.Printf("[stt] using remote transcription server: %s", remote)
sttURL = strings.TrimRight(remote, "/")
} else {
Comment thread meeting_service.go Outdated
Comment thread meeting_service.go
Comment on lines +307 to +309
// Transcription endpoint: the explicitly configured remote server or a
// supervised local engine. Automatic local selection retains the original
// Nemotron-first, Whisper-fallback behavior.
vokac-nri and others added 2 commits July 16, 2026 13:43
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@vokac-nri
vokac-nri merged commit 7e865d0 into main Jul 16, 2026
3 of 4 checks passed
Copilot stopped work on behalf of vokac-nri due to an error July 16, 2026 17:44
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.

2 participants