* feat(engines): real synthesis "Self-test" + copy-paste setup snippet for opt-in engines Builds on #905's Engines-settings fixes (verified still green: license dialog mounts, matrix reloads on select, cpu_fallback routing toast, cpu-native → cpu_only). Two enhancements, no #905 behavior touched. Real "Self-test" for in-process TTS engines ------------------------------------------- The existing /engines/{id}/health probe only imports the package and reports "deps OK" for in-process engines — it never proves the engine can emit audio. New POST /engines/{id}/selftest runs a *tiny real synthesis* from a fixed short ASCII phrase and reports ok + duration + sample-rate + sample count, proving the engine actually produces audio. Guardrails keep it cross-platform-identical and CPU-cheap: TTS + available + in-process only, bounded wall-clock timeout (OMNIVOICE_SELFTEST_TIMEOUT_S, default 90s) that returns ok=false/timed_out instead of hanging the panel, a process-wide lock so a click-storm can't stack model loads, loopback-gated, and only ever on user click (never on load). The Compat Matrix gains a "Self-test" button (with cooldown) that renders "0.82s @ 24 kHz in 820 ms". HF tokens in a synth error are redacted like the health route. Verified end-to-end: kittentts synthesized 89,200 samples @ 24 kHz. Copy-paste setup snippet for path-gated opt-in engines ------------------------------------------------------ IndexTTS / MOSS-v1.5 / dots.tts / Confucius4 gate on an OMNIVOICE_*_DIR env var. list_backends() now emits a single-sourced `setup_snippet` (the exact `export VAR=/path/...` line) surfaced with a Copy button inside the matrix's "Why unavailable?" disclosure, so users don't reconstruct it from the docs. Also tightened the incomplete SelectEngineResponse TS type to include the routing echo (routing_status/effective_device/routing_reason) the post-select toast already reads at runtime. Tests: backend selftest success/subprocess-reject/unavailable/unknown/loopback/ exception-capture/timeout/HF-redaction + setup_snippet shape; frontend self-test render, timeout marker, subprocess+ASR gating, setup-snippet render. New route added to the API route snapshot. Full vitest (808) + backend engine/routing/asr/ route-inventory/no-CJK green; lint 0 errors; format + typecheck:ci clean. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix(test): allow setup_snippet key in list_backends shape assertion The engine self-test PR added setup_snippet to each backend entry but only updated the route-shape test; test_list_backends_shape strict-asserts the key set. Add setup_snippet there too. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: mergetest <test@local> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
233 lines
6.2 KiB
Plaintext
233 lines
6.2 KiB
Plaintext
# OmniVoice backend API route snapshot — regenerate with scripts/dump_api_routes.py
|
|
# Guards against accidental endpoint removal/rename (tests/test_api_route_inventory.py).
|
|
DELETE /api/mcp/bindings/{client_id}
|
|
DELETE /api/settings/hf-token
|
|
DELETE /batch/jobs/{job_id}
|
|
DELETE /dub/history
|
|
DELETE /dub/history/{history_id}
|
|
DELETE /engines/translation/{engine_id}
|
|
DELETE /gallery/voices/{voice_id}
|
|
DELETE /glossary/{project_id}
|
|
DELETE /glossary/{project_id}/{term_id}
|
|
DELETE /history
|
|
DELETE /history/{history_id}
|
|
DELETE /marketplace/{filename}
|
|
DELETE /models/{repo_id:path}
|
|
DELETE /profiles/{profile_id}
|
|
DELETE /profiles/{profile_id}/consent
|
|
DELETE /projects/{project_id}
|
|
DELETE /pronunciation/{entry_id}
|
|
GET /api/mcp/bindings
|
|
GET /api/settings/changelog
|
|
GET /api/settings/db-backup
|
|
GET /api/settings/dictation-refinement
|
|
GET /api/settings/hf-mirror
|
|
GET /api/settings/hf-token/state
|
|
GET /api/settings/license/{engine_id}
|
|
GET /api/settings/llm-endpoint
|
|
GET /api/settings/llm-providers
|
|
GET /api/settings/llm-providers/{provider_id}/models
|
|
GET /api/settings/llm-skills
|
|
GET /api/settings/perf/torch-compile-disabled
|
|
GET /api/settings/storage
|
|
GET /api/settings/storage/models-dir
|
|
GET /archetypes
|
|
GET /archetypes/categories
|
|
GET /archetypes/{archetype_id}
|
|
GET /archetypes/{archetype_id}/preview
|
|
GET /audiobook/jobs
|
|
GET /batch/download/{job_id}/{lang}
|
|
GET /batch/jobs
|
|
GET /batch/jobs/{job_id}
|
|
GET /community/items
|
|
GET /community/manifest
|
|
GET /community/sources
|
|
GET /community/submit-url
|
|
GET /dictation/models
|
|
GET /dictation/prefs
|
|
GET /docs
|
|
GET /dub/audio/{job_id}
|
|
GET /dub/download-audio/{job_id}
|
|
GET /dub/download-audio/{job_id}/{filename}
|
|
GET /dub/download-mp3/{job_id}
|
|
GET /dub/download-mp3/{job_id}/{filename}
|
|
GET /dub/download/{job_id}
|
|
GET /dub/download/{job_id}/{filename}
|
|
GET /dub/export-segments/{job_id}
|
|
GET /dub/export-stems/{job_id}
|
|
GET /dub/history
|
|
GET /dub/media/{job_id}
|
|
GET /dub/onsets/{job_id}
|
|
GET /dub/preview-video/{job_id}
|
|
GET /dub/preview/{job_id}/{segment_index}
|
|
GET /dub/srt/{job_id}
|
|
GET /dub/srt/{job_id}/{filename}
|
|
GET /dub/thumb/{job_id}
|
|
GET /dub/tracks/{job_id}
|
|
GET /dub/transcribe-stream/{job_id}
|
|
GET /dub/vtt/{job_id}
|
|
GET /dub/vtt/{job_id}/{filename}
|
|
GET /engines
|
|
GET /engines/asr
|
|
GET /engines/effects/presets
|
|
GET /engines/llm
|
|
GET /engines/sonitranslate/status
|
|
GET /engines/translation
|
|
GET /engines/tts
|
|
GET /engines/{engine_id}/health
|
|
GET /export/history
|
|
GET /gallery/categories
|
|
GET /gallery/voices
|
|
GET /gallery/voices/{voice_id}
|
|
GET /gallery/voices/{voice_id}/preview
|
|
GET /glossary/{project_id}
|
|
GET /health
|
|
GET /history
|
|
GET /jobs
|
|
GET /jobs/{job_id}
|
|
GET /jobs/{job_id}/events
|
|
GET /longform/jobs
|
|
GET /marketplace/browse
|
|
GET /model/loaded
|
|
GET /model/status
|
|
GET /models
|
|
GET /openapi.json
|
|
GET /personalities
|
|
GET /preview/{filename}
|
|
GET /profiles
|
|
GET /profiles/{profile_id}
|
|
GET /profiles/{profile_id}/audio
|
|
GET /profiles/{profile_id}/usage
|
|
GET /projects
|
|
GET /projects/{project_id}
|
|
GET /pronunciation
|
|
GET /pronunciation/export
|
|
GET /setup/download-stream
|
|
GET /setup/preflight
|
|
GET /setup/recommendations
|
|
GET /setup/status
|
|
GET /sysinfo
|
|
GET /system/asr-backends
|
|
GET /system/diagnose
|
|
GET /system/errors/recent
|
|
GET /system/hf-token/state
|
|
GET /system/info
|
|
GET /system/logs
|
|
GET /system/logs/stream
|
|
GET /system/logs/tauri
|
|
GET /system/network/state
|
|
GET /system/notifications
|
|
GET /system/quarantine-status
|
|
GET /system/tailscale/status
|
|
GET /tasks/stream/{task_id}
|
|
GET /tools/effects
|
|
GET /tools/plugins
|
|
GET /v1/audio/voices
|
|
GET /watermark/status
|
|
PATCH /gallery/voices/{voice_id}
|
|
PATCH /projects/{project_id}
|
|
POST /api/settings/hf-token
|
|
POST /api/settings/license
|
|
POST /api/settings/llm-providers/active
|
|
POST /api/settings/llm-providers/{provider_id}/test
|
|
POST /archetypes/{archetype_id}/use
|
|
POST /audiobook
|
|
POST /audiobook/cover
|
|
POST /audiobook/import
|
|
POST /audiobook/plan
|
|
POST /audiobook/preview
|
|
POST /audiobook/resume/{job_id}
|
|
POST /batch/enqueue
|
|
POST /batch/jobs/{job_id}/cancel
|
|
POST /clean-audio
|
|
POST /community/items/{item_id}/use
|
|
POST /design/describe
|
|
POST /dictation/prefs
|
|
POST /dub/abort/{job_id}
|
|
POST /dub/cleanup-segments/{job_id}
|
|
POST /dub/generate/{job_id}
|
|
POST /dub/import-srt/{job_id}
|
|
POST /dub/ingest-url
|
|
POST /dub/preview-segment/{job_id}
|
|
POST /dub/qc/{job_id}
|
|
POST /dub/transcribe/{job_id}
|
|
POST /dub/translate
|
|
POST /dub/upload
|
|
POST /engines/select
|
|
POST /engines/sonitranslate/dub
|
|
POST /engines/sonitranslate/install
|
|
POST /engines/sonitranslate/start
|
|
POST /engines/sonitranslate/stop
|
|
POST /engines/translation/{engine_id}/install
|
|
POST /engines/{engine_id}/selftest
|
|
POST /export
|
|
POST /export/record
|
|
POST /export/reveal
|
|
POST /gallery/download
|
|
POST /gallery/search/youtube
|
|
POST /gallery/upload
|
|
POST /gallery/voices/batch-delete
|
|
POST /gallery/voices/{voice_id}/save-as-profile
|
|
POST /gallery/voices/{voice_id}/to-profile
|
|
POST /generate
|
|
POST /glossary/{project_id}
|
|
POST /glossary/{project_id}/auto-extract
|
|
POST /longform/render
|
|
POST /marketplace/export/{profile_id}
|
|
POST /marketplace/import
|
|
POST /marketplace/install/{filename}
|
|
POST /marketplace/publish/{profile_id}
|
|
POST /model/unload/{model_id}
|
|
POST /models/install
|
|
POST /models/install/cancel
|
|
POST /personas/export/{profile_id}
|
|
POST /personas/import
|
|
POST /personas/inspect
|
|
POST /preview/upload
|
|
POST /profiles
|
|
POST /profiles/{profile_id}/consent
|
|
POST /profiles/{profile_id}/lock
|
|
POST /profiles/{profile_id}/unlock
|
|
POST /projects
|
|
POST /pronunciation
|
|
POST /pronunciation/import
|
|
POST /pronunciation/test
|
|
POST /setup/warmup
|
|
POST /stories/encode
|
|
POST /system/crash/ack
|
|
POST /system/diagnostic-bundle
|
|
POST /system/flush-memory
|
|
POST /system/logs/clear
|
|
POST /system/logs/tauri/clear
|
|
POST /system/network/disable
|
|
POST /system/network/enable
|
|
POST /system/set-env
|
|
POST /system/tailscale/disable
|
|
POST /system/tailscale/enable
|
|
POST /tasks/cancel/{task_id}
|
|
POST /tools/direction
|
|
POST /tools/incremental
|
|
POST /tools/probe
|
|
POST /tools/rate-fit
|
|
POST /tools/video-context/{job_id}
|
|
POST /transcribe
|
|
POST /v1/audio/speech
|
|
POST /v1/audio/transcriptions
|
|
POST /watermark/detect
|
|
POST /watermark/settings
|
|
PUT /api/mcp/bindings
|
|
PUT /api/settings/dictation-refinement
|
|
PUT /api/settings/hf-mirror
|
|
PUT /api/settings/llm-endpoint
|
|
PUT /api/settings/llm-providers/{provider_id}
|
|
PUT /api/settings/llm-skills/{skill_id}
|
|
PUT /api/settings/perf/torch-compile-disabled
|
|
PUT /api/settings/storage/models-dir
|
|
PUT /glossary/{project_id}/{term_id}
|
|
PUT /profiles/{profile_id}
|
|
PUT /projects/{project_id}
|
|
PUT /pronunciation/{entry_id}
|
|
WS /ws/events
|
|
WS /ws/transcribe
|
|
WS /ws/tts
|