Enable approved private Athena TTS route in Hermes WebUI startup

This commit is contained in:
Mikei386 committed 2026-10-17 21:28:20 +02:00
1 parent 16915a04f0
commit d3251c624e
3 files changed
+98 -14

No files matched your search

@@ -1,9 +1,9 @@
# Hermes speech integration — 17 October 2026
User requested complete TTS, STT and Live Talk where supported. This report
separates agent tools from browser controls. Native Athena TTS on the browser's
Listen button is still pending a routing/integration decision; do not mark the
whole voice setup complete based on browser speech synthesis.
separates agent tools from browser controls. Local Athena TTS is now active on the Listen button and the user confirmed
hearing the local voice. Voice consistency is NOT resolved: OmniVoice currently
generates without a reference and randomizes the seed for each request.
## Verified components
@@ -32,8 +32,8 @@ whole voice setup complete based on browser speech synthesis.
## Persisted WebUI settings and microphone acceptance
`raw_audio_mode=false`, `tts_enabled=true`, `tts_engine=browser`,
`tts_voice=Anna`, `voice_mode_button=true`, `language=de`.
`raw_audio_mode=false`, `tts_enabled=true`, `tts_engine=openai`,
`tts_voice=Anna` (only relevant to the previous browser engine), `voice_mode_button=true`, `language=de`.
Regular auto-read remains off; hands-free mode has its own response playback.
The regular UI save initially showed raw audio off but a later server read had
@@ -52,8 +52,8 @@ OpenAI TTS targets; HTTP is accepted only for literal localhost and HTTPS
must resolve to globally routable addresses. The WebUI's own HTTPS origin
therefore does not solve a private provider URL. The existing Athena and OI
hostnames resolve privately inside this container; no public audio route was
created. No SSRF bypass, fake DNS/loopback mapping, relay or new extension
was installed.
created. No fake DNS/loopback mapping, relay or new extension was installed. The user
subsequently explicitly approved the narrow LAN policy exception below.
The built-in hands-free mode uses browser SpeechRecognition, pause detection,
send and reply playback. It does not use Parakeet for that mode and is not
@@ -62,9 +62,8 @@ path. Browser microphone access requires HTTPS and user permission.
Current upstream gallery has no ready TTS extension for this LAN integration.
A supported custom TTS extension API exists but writing/integrating a new one
would be our own adaptation. User has been asked to choose between a real
public authenticated HTTPS audio endpoint and evaluating a targeted local
WebUI change. No such change has been made yet.
would be our own adaptation. The user explicitly approved the targeted local WebUI change; this is our
operator adaptation, not an official upstream fix.
## Persistence and restore
@@ -80,3 +79,61 @@ Sources:
- https://github.com/nesquena/hermes-webui/blob/master/static/boot.js
- https://github.com/nesquena/hermes-webui/blob/master/docs/EXTENSIONS.md
- https://github.com/hermes-webui/hermes-webui-extensions/blob/main/extensions/README.md
## Approved local TTS activation
The existing persistent `integrations/hermes-unraid/webui/start-with-gateway.sh`
now applies a source-hash-pinned insertion before the upstream initializer.
The initializer rsyncs `/apptoo` to `/app`, so the patch targets
`/apptoo/api/routes.py`, not the overwritten runtime copy. The first activation
was corrected for this ordering and the unoccupied container restarted again.
The final runtime and template both match patched SHA256
`5e51d1e2791804b825bdd3c8f000faaea3989d34cdbcd6c406800573eb8e5710`.
Original SHA256:
`9f32e7ca096a491a36c1e774752af18c2d02ca402af4dad1886a5048deae10dc`.
Only `HERMES_WEBUI_TRUSTED_TTS_BASE_URL=http://192.168.1.212:8120/v1`
is permitted as the extra literal RFC1918 HTTP destination. Credentials,
queries, fragments, other IPs/ports/paths and metadata addresses remain rejected.
Authentication, no-redirect handling, HTTPS pinning and the response validation
code are unchanged. Eleven isolated checks passed, including unchanged ASTs of
those handlers. Bash syntax validation passed. No own image or extra mount.
An unknown future upstream source is NOT patched: startup warns and retains
upstream policy, so local TTS then needs revalidation after an image update.
The existing provider key was internally copied to the WebUI-supported
`VOICE_TOOLS_OPENAI_KEY` in its private persistent `.env`; no key was printed
or committed. `api.config.save_settings` persisted the OpenAI server engine.
Regular UI confirms the engine selection; the user confirmed actual local
voice playback. Both WebUI and gateway reported healthy/idle after restart;
Docker restart policy remains `unless-stopped`.
A real request using the WebUI normalizer/opener/response buffer, existing
credentials and its unchanged 30-second timeout returned HTTP 200,
`audio/mpeg`, 49,965 bytes in 1.23 seconds. Full Mac FFmpeg decoding passed;
FFprobe duration 3.12 seconds. This is the warm short-request transport timing,
not a cold-start latency guarantee. Audio stays outside Git.
### Remaining voice consistency issue
User reports a different voice per sentence. Source confirms
`endpoint.py:speech` invokes OmniVoice without a reference; `voxcpm_test.py:start`
uses a randomized seed when OmniVoice seed is omitted. `voice=default` does
not identify a saved speaker. A stable reference must be configured for a
consistent speaker; a constant seed alone is not a reliable speaker identity.
Awaiting the user's choice of reference before implementing that separate fix.
Do not mark complete voice acceptance yet.
A diagnostic import also reported an existing incomplete Hermes source-update
Node dependency (`libatomic.so.1` missing); it continued with previous dependencies.
TTS succeeded despite that warning. No unrelated dependency installation done.
### Restore/update requirements
Keep the deployment wrapper and its read-only container bind in the existing
Unraid XML, encrypted Hermes home (config, `.env`, settings, voices), and Webtop
workspace. On recreation the same upstream source must match the hash; updates
require reviewing/retesting the insertion. To remove the adaptation, remove
its startup block and recreate from the pristine upstream image (a simple
restart retains modified image-layer files). This remains an optional Docker
UI integration; no claim of a native fresh-Debian full restore test is made.