mirror of
https://github.com/jamiepine/voicebox.git
synced 2026-09-16 21:30:39 -07:00
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]>
37 lines
1.3 KiB
Python
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))
|