* feat(generate): sentence/paragraph gaps and SSML-lite tags in Generate and MCP
/generate and MCP generate_speech take sentence_gap_ms, paragraph_gap_ms
(0-5000) and trim_engine_silence, all off by default so existing requests
render unchanged. [slow]/[fast]/[emphasis]/[spell] are parsed instead of
reaching the engine as text. Voice controls gain matching sliders and a
trim switch.
* changelog: fragment for #4254
* feat(generate): ship paragraph gaps and SSML-lite, drop sentence gaps
* fix(generate): carry SSML scope across pauses and gaps, keep duration and spelling, split action bar
* fix(generate): carry SSML state in linear time, cap tags, stub engine in budget test
* docs: count generate_markup in the services tree
---------
Co-authored-by: debpalash <4178343+debpalash@users.noreply.github.com>
Preserve the delegated caller tier, credentials and browser-origin checks across MCP transports; prevent borrowed loopback/trusted-network authority and scrub query secrets from errors. Includes real-SDK and authorization regression coverage.
Scale whole-file transcription deadlines with recording duration across uploads, streaming dubbing, child engines and MCP waits. Keep queueing and setup inside the same deadline, and preserve physical worker and upload ownership when work is cancelled.
Cover long recordings, child-process ceilings, fallback deadlines, finite settings, queued metadata, late model loading and cancellation cleanup with regression tests. Update engine and troubleshooting documentation.
Rebuilt from a behaviour spec by an implementer who never saw the removed code (batch T2: folded squash remainder).
(cherry picked from commit d172c1d61c5ee8f4865ed3099660f83e1c696fe8)
Removes code from contributors without a CLA on file, leaving CLEAN-ROOM markers where the reimplementation goes.
(cherry picked from commit 2a94dc11225e25fb50233b9f68b488e80e7aedec)
Consolidate community engine, workflow, dictation, and setup fixes with the Electron composer, sidebar, and voice UI.
Fix review findings in engine residency, remote exports, backup cleanup, bounded compressed-audio decoding, and reference preprocessing. Preserve contributor credits in CHANGELOG.md and leave the app version unchanged.
Supersedes #2325, #2338, #2368, #2377, #2379, #2380, #2383, #2384, #2387, #2390, #2391, #2392, #2393, #2395, #2400, #2401, #2402, #2409, #2410, and #2412.
Expose actual Ogg/Opus encoding for MCP speech files and URLs, with bounded per-render caching and remote-backend verification. Keep WAV defaults and protect audio paths. Fixes#2321.
* fix(mcp): serve /mcp without redirect, follow OMNIVOICE_PORT, real integration setups
- /mcp and /mcp/ both reach the Streamable HTTP transport for every method,
ahead of the SPA StaticFiles mount (POST /mcp was 405 on Docker/source
builds, 307 without a built SPA). Regression test drives initialize ->
tools/list -> DELETE on the real main.app with a dist dir and
follow_redirects=False; the client-setup test no longer follows redirects.
- MCP tool callbacks resolve the backend URL from OMNIVOICE_BIND_HOST +
OMNIVOICE_PORT (OMNIVOICE_API_URL still overrides) instead of a hard-coded
:3900; speech_client and the dev fallback redirect follow their port env
too, with a class guard against literal :39xx URLs in backend code.
- Integrations: setup registry keyed by slug drives the Works with
VoiceStudio badge and capability chips; adds Codex CLI config.toml,
generic MCP (HTTP + stdio shim), VoiceStudio API (curl + OpenAI SDK) and
Docker/GHCR setups. Removes the fake category chips from the shared
catalog config; fixes the duplicate Details headings.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* test: pin capture path in speech envelope test; changelog refs (#2289)
A prior lifespan-running test persists a sherpa dictation.model_id pref via
the startup performance profile, routing the envelope test to the sherpa
handler. Pin the capture path it asserts.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(integrations): export <base>/mcp/ for every MCP client
The trailing-slash URL works on backends without the bare-/mcp fix too, so
Claude Code, Cursor, Codex and the generic MCP card all export it. Docs lead
with /mcp/ and note bare /mcp works on current backends.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(mcp): in-process tool callbacks; remote-safe stdio and API snippets
Review findings on #2289:
- Greptile P1: mounted MCP tools now call the backend app in-process via
httpx.ASGITransport as a loopback caller, so a concrete LAN
OMNIVOICE_BIND_HOST behind an API key / share PIN no longer 401s every
tool. Standalone runs keep the HTTP backend_self_url() path.
- Greptile P1: the stdio shim accepts OMNIVOICE_URL (https + path prefix)
and forwards OMNIVOICE_API_KEY as a Bearer token; the MCP card exports
the full base URL instead of host/port.
- Greptile P1: remote API snippets read the key from $OMNIVOICE_API_KEY
(curl Bearer header, Python os.environ) without exporting credentials.
- CodeQL (Bandit B104): wildcard detection uses ipaddress.is_unspecified
instead of a 0.0.0.0 literal.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(integrations): API keys only over https or loopback; reference them by env
CodeRabbit findings on #2289:
- Standalone MCP server and the stdio shim send OMNIVOICE_API_KEY as a
Bearer token only to https or loopback targets (same rule as
backend.speech_client); the shim refuses to start otherwise.
- Remote https exports reference the key from the user's environment in
each client's own syntax (Claude Code ${VAR}, Cursor ${env:VAR}, Codex
bearer_token_env_var, curl/Python $OMNIVOICE_API_KEY); plain-http
remotes export no key.
- test_backend_self_url imports app modules inside the tests.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(integrations): credential guidance via translated hints; HTTP card auth line
CodeRabbit findings on #2289:
- The generic Streamable HTTP card lists the env-backed Authorization
header for remote https backends.
- English comments inside copyable snippets (API credentials, Docker GPU)
move to translated hints (apiBearerHint, apiInsecureHint, dockerGpuHint,
all 21 locales); a test forbids natural-language comments in snippets.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(integrations): PowerShell docker run; scheme-aware Agents SDK key
CodeRabbit findings on #2289:
- Docker/GHCR pages add a Windows PowerShell docker run (backtick
continuations, CSPRNG key that works on PowerShell 5.1 and 7), so the
default setup works on every platform.
- The OpenAI Agents snippet only reads OMNIVOICE_API_KEY for loopback or
https backends; a remote plain-http backend gets a placeholder.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(integrations): Agents SDK key only for remote https backends
Greptile/CodeRabbit findings on #2289: the OpenAI Agents snippet now
follows the shared remoteAuth policy exactly. It requires
os.environ["OMNIVOICE_API_KEY"] for remote https backends, uses a
placeholder on loopback (no key over plain http, even locally), and for a
remote plain-http backend shows the translated 'use https' hint instead of
implying the key will be sent.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* test: drop the speech-platform capture pin now that #2294 isolates settings
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(integrations): remote https Python snippets tolerate an unkeyed backend
Greptile finding on #2289: os.environ[...] raised KeyError on a remote https
backend that runs without an API key. Read the key with a placeholder
fallback (Agents SDK and API Python snippets); still loopback- and
plain-http-safe via remoteAuth.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Review follow-up. A generation first waits in the GPU pool's queue, on its
own clock (GPU_QUEUE_TIMEOUT_S, 1800 s by default), before its execution
budget starts, so a 630 s wait could still give up before the backend
returned its queue error. The generate wait now adds the queue budget.
Transcription is unchanged: run_transcribe_guarded starts its 300 s clock
at submission, so queue time already counts against it.
Parity tests pin each tool's wait above the backend's own worst case,
from ASR_TRANSCRIBE_TIMEOUT_S, GPU_QUEUE_TIMEOUT_S and generate_timeout_s
on cpu, cuda and mps. A later backend change that outgrows the MCP wait
now fails a test. A new case covers a CPU budget larger than the GPU one.
The MCP tools gave up on a backend POST after OMNIVOICE_MCP_TIMEOUT_S,
default 120 s, while the backend's own budgets run longer: 300 s for ASR,
and 300 s or more for generation. A transcription the backend would have
finished came back as an empty client-side timeout, and the abandoned
job kept holding the worker. The docstring said the timeout followed
OMNIVOICE_GENERATE_TIMEOUT_S, but it never read it.
Unset, each tool now waits for the backend's budget plus 30 s, never less
than 120 s. transcribe follows OMNIVOICE_ASR_TRANSCRIBE_TIMEOUT_S, and
generate_speech follows the larger of the GPU and CPU generation budgets,
scaled by text length like the backend. An explicit
OMNIVOICE_MCP_TIMEOUT_S still wins. docs/mcp.md says so.
Fixes#2040
An LLM agent pays for every byte it receives, and generate_speech returned
each WAV as base64 inline - a short clip already brushed per-result limits.
This adds two knobs in the OMNIVOICE_* family, the pattern the ElevenLabs
MCP settled on (OUTPUT_MODE + a BASE_PATH security boundary):
- OMNIVOICE_MCP_OUTPUT_MODE = resources (default, the original contract) |
files | both. In files mode generate_speech returns audio_url (the render
the backend already keeps, served at /audio/<id>.wav) and, when a base
path is set, output_path - the WAV written into that directory.
- OMNIVOICE_MCP_BASE_PATH: the one directory agents may read from and
receive files in. transcribe(audio_path=) and clone_voice(ref_audio_path=)
read only inside it (relative paths resolve against it, absolute ones must
lie within it, symlinks resolved before the check); with no base path,
path arguments are refused with a reason.
- OMNIVOICE_MCP_TIMEOUT_S (default 120): the tools' backend timeout, since a
CPU host serializes generations and an agent queued behind another render
outlasted the fixed budget with an empty-message ToolError.
Also: transcribe and clone_voice share one input helper (data-URI tolerance
now covers transcribe too), the upload filename carries the sniffed
extension, and the reply is built with json.dumps instead of hand-rolled
JSON. Tests cover the mode parsing, the boundary (escape and missing-base
refusals), both input lanes, all four reply shapes, and the timeout knob.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Renames what users see. The app, the installers, the window title, the
docs and all 21 locales now say VoiceStudio, with "(previously
OmniVoice-Studio)" noted near the title of each doc surface so people
recognise it.
Deliberately NOT renamed, because renaming any of them silently breaks
an existing install — there is no legacy-path fallback anywhere in this
codebase:
- bundle identifier com.debpalash.omnivoice-studio (MSI UpgradeCode,
macOS TCC grants, managed venv, WebView localStorage, the
single-instance lock)
- data directories OmniVoice / .omnivoice and omnivoice.db
- the ~150 OMNIVOICE_* environment variables
- the X-OmniVoice-* HTTP headers (a wire protocol)
- the published Docker image paths
- the OmniVoice ENGINE, which is a model name and not this product
tests/test_identity_paths_survive_the_rename.py pins every one of those
so a future well-meaning sweep cannot orphan a user's library.
Linux .deb users install a new package name and should apt remove
omnivoice-studio; that note is in the changelog.
* feat(mcp): OMNIVOICE_MCP_ALLOWED_HOSTS env var for transport-security allowlist (#1249)
Agents running in Docker containers (or on other machines) connect via a
hostname like host.containers.internal, which the MCP SDK's DNS-rebinding
guard rejects with 421. Add OMNIVOICE_MCP_ALLOWED_HOSTS (comma-separated
host patterns) that extends both allowed_hosts and allowed_origins in
create_mcp_server(). Default empty → no behavior change.
Test: assert the env var extends the allowlist + origins. Docs: mcp.md
notes the env var for Docker/LAN agents.
* fix(changelog): move MCP_ALLOWED_HOSTS entry after Highlights per quiet style
* fix(mcp): add https:// origins for HTTPS reverse proxy clients (greptile P1)
* docs(mcp): add security note for remote agent connections (coderabbit)
AI agents driving OmniVoice via MCP could use and list voices but couldn't
create one. Add a clone_voice MCP tool that takes a base64-encoded reference
audio sample (consistent with transcribe's audio_base64 pattern), decodes it,
and POSTs it as a multipart ref_audio to POST /profiles (kind=clone). Returns
the new profile_id so the agent can immediately use it with generate_speech.
Update test_mcp_mount.py to include clone_voice in the asserted tool surface.
CHANGELOG entry.
* feat(mcp): MCP server v1 — mount on /mcp, per-agent voice binding, stdio shim (Wave 2.2)
The FastMCP server (previously dead code, never mounted) is now mounted on
the main FastAPI app at /mcp via Streamable HTTP, with its session manager
composed into the app lifespan through an AsyncExitStack (best-effort: a
missing mcp package or OMNIVOICE_MCP_DISABLE=1 never breaks startup).
streamable_http_path set to '/' so the sub-mount lands at /mcp, not
/mcp/mcp. Adds the 'mcp' dependency (1.27.x).
Per-agent voice binding (Spec 2 headline): each MCP client sends an
X-OmniVoice-Client-Id header; generate_speech resolves the voice as
explicit arg > the client's binding > global default > app default. New
mcp_client_bindings table (alembic 0004 + _BASE_SCHEMA, additive/idempotent),
services/mcp_bindings.py (CRUD + resolve_voice + best-effort last_seen),
and a loopback-gated REST router (/api/mcp/bindings) the Settings panel
drives.
New transcribe tool (base64 audio in, 200 MB cap). Stdio shim
(backend/mcp_shim, httpx-only, ported from voicebox MIT) proxies stdio
clients to the mounted endpoint and forwards OMNIVOICE_CLIENT_ID as the
binding header. Settings → Sharing gains an MCP bindings panel. Docs:
docs/mcp.md (both connection modes + binding REST) and docs/mcp.json
updated to the shim form.
Tests: bindings service + resolution precedence + migration up/down (pure,
run locally); REST CRUD + mount-not-404 + disable-flag (main-importing,
validated in CI). MCP build + mount + initialize handshake verified
out-of-band (no torch).
Spec: docs/competitive-analysis.md Spec 2 / parity program Wave 2.2.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* test(mcp): assert /mcp mount via app.routes, not a lifespan client
The two main-importing mount tests ran the app lifespan, which now starts
the FastMCP session manager and binds asyncio queues to the test loop —
contaminating later lifespan-running tests ('bound to a different event
loop'). The mount happens at import time, so inspecting app.routes for the
/mcp Mount is the correct loop-free assertion. Same fix shape as the
Wave 0.2 consent tests.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* test(mcp): stop reload-main poisoning across the MCP test files
Root cause of the CI failure: the bindings REST fixture set
OMNIVOICE_MCP_DISABLE=1 and reloaded main but never restored it, so a
later 'from main import app' in test_mcp_mount saw /mcp un-mounted
({'/audio','/voice_audio'}). Reloading main mutates the shared module for
every subsequent test.
- REST fixture: drop the disable flag (the mount is harmless without a
lifespan), yield the client, and restore main (+ core.config/db) to the
default data dir in teardown so the global module is clean again.
- test_main_mounts_mcp_route: reload main with the disable flag cleared so
the assertion is independent of any earlier reload.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>