Repository navigation
Speech governance for self-hosted and enterprise deployments: admin-controlled engines + gateway-friendly speech requests #18584
elmaroufy
started this conversation in
Feature Requests & Suggestions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Problem
Organizations that self-host LibreChat for data-residency or compliance reasons (GDPR, internal policies) route all AI traffic through their own server or an AI gateway (e.g. LiteLLM). Speech is currently the one area where this cannot be guaranteed:
speech.speechTabonly sets initial defaults: a user can switch STT/TTS back to the "browser" engine in Settings, and the engine dropdown always offers it (EngineSTTDropdown.tsx,useSpeechSettingsInit.ts). With Chromium-based browsers, browser speech recognition sends audio to the browser vendor, and online browser voices send response text to it, bypassing the configured server entirely. Admins currently have to disable speech altogether.{{LIBRECHAT_OPENID_ACCESS_TOKEN}}.Proposal (opt-in, no behavior change when unset)
Disallowed engines are hidden in Settings, saved preferences are overridden, and a missing or failed config load never falls back to a disallowed engine.
2. Gateway-friendly speech requests. Build on #18265 (optional headers for speech.stt.openai / speech.tts.openai) and make sure OpenID placeholders resolve there too, for parity with endpoints and MCP:
speech:
stt:
openai:
url: https://gateway.example.com/v1/audio/transcriptions
headers:
Authorization: "Bearer {{LIBRECHAT_OPENID_ACCESS_TOKEN}}"
Why it helps LibreChat users broadly
Makes voice usable in regulated environments instead of being switched off.
Enables per-user authorization, quotas and cost attribution for speech through gateways, consistent with chat.
Reuses existing patterns (header placeholders, OPENID_REUSE_TOKENS, admin-level config); small, additive, opt-in.
Components affected
Client speech settings (engine dropdowns, initialization), speech config schema, STTService / TTSService (via #18265).
We are happy to test a build and give feedback.
All reactions