Files
voicebox/backend/routes/settings.py
T
James PineandClaude Opus 4.7 87c582ad54 feat(capture): dictation, personalities, 0.5.0
Ships the Capture release end to end. Global-hotkey dictation with
synthetic paste into the focused app on macOS and Windows, an on-screen
pill across recording / transcribing / refining, customizable push-to-
talk and toggle chords, and an accessibility-permission prompt scoped to
Settings → Captures with inline re-check feedback.

Voice profiles gain optional personalities that power compose / rewrite /
respond actions via a local Qwen3 LLM — shared with refinement, so there
is one local LLM in the app, not two.

Refinement hardened with deterministic Whisper-loop collapse before the
LLM sees the transcript, per-capture flag snapshots for re-runs, and a
ten-transcript evaluation harness across every bundled refinement size.

Version bump 0.4.5 → 0.5.0.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
2026-04-22 18:49:16 -07:00

37 lines
1.3 KiB
Python

"""User settings endpoints — capture/refine and generation defaults."""
from fastapi import APIRouter, Depends
from sqlalchemy.orm import Session
from .. import models
from ..database import get_db
from ..services import settings as settings_service
router = APIRouter(prefix="/settings", tags=["settings"])
@router.get("/captures", response_model=models.CaptureSettingsResponse)
async def get_capture_settings_endpoint(db: Session = Depends(get_db)):
return settings_service.get_capture_settings(db)
@router.put("/captures", response_model=models.CaptureSettingsResponse)
async def update_capture_settings_endpoint(
patch: models.CaptureSettingsUpdate,
db: Session = Depends(get_db),
):
return settings_service.update_capture_settings(db, patch.model_dump(exclude_none=True))
@router.get("/generation", response_model=models.GenerationSettingsResponse)
async def get_generation_settings_endpoint(db: Session = Depends(get_db)):
return settings_service.get_generation_settings(db)
@router.put("/generation", response_model=models.GenerationSettingsResponse)
async def update_generation_settings_endpoint(
patch: models.GenerationSettingsUpdate,
db: Session = Depends(get_db),
):
return settings_service.update_generation_settings(db, patch.model_dump(exclude_none=True))