fix: make STT config env-overridable and fix doc issues
Code fixes: - STT model, Groq base URL, and OpenAI STT base URL are now configurable via env vars (STT_GROQ_MODEL, STT_OPENAI_MODEL, GROQ_BASE_URL, STT_OPENAI_BASE_URL) instead of hardcoded - Gateway and Discord VC now read stt.model from config.yaml (previously only CLI did this — gateway always used defaults) Doc fixes: - voice-mode.md: move Web UI troubleshooting to web.md (was duplicated) - voice-mode.md: simplify "How It Works" for end users (remove NaCl, DAVE, RTP internals) - voice-mode.md: clarify STT priority (OpenAI used first if both keys set, Groq recommended for free tier) - voice-mode.md: document new STT env overrides in config reference - web.md: remove duplicate Quick Start / Step 1-3 sections - web.md: add mobile HTTPS mic workarounds (moved from voice-mode.md) - web.md: clarify STT fallback order
This commit is contained in:
parent
79ed0effdd
commit
238a431545
5 changed files with 78 additions and 118 deletions
|
|
@ -32,13 +32,13 @@ from typing import Optional, Dict, Any, Tuple
|
|||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
# Default STT models per provider
|
||||
DEFAULT_STT_MODEL = "whisper-1"
|
||||
DEFAULT_GROQ_STT_MODEL = "whisper-large-v3-turbo"
|
||||
# Default STT models per provider (overridable via env)
|
||||
DEFAULT_STT_MODEL = os.getenv("STT_OPENAI_MODEL", "whisper-1")
|
||||
DEFAULT_GROQ_STT_MODEL = os.getenv("STT_GROQ_MODEL", "whisper-large-v3-turbo")
|
||||
|
||||
# Provider endpoints
|
||||
GROQ_BASE_URL = "https://api.groq.com/openai/v1"
|
||||
OPENAI_BASE_URL = "https://api.openai.com/v1"
|
||||
# Provider endpoints (overridable via env for proxies / self-hosted)
|
||||
GROQ_BASE_URL = os.getenv("GROQ_BASE_URL", "https://api.groq.com/openai/v1")
|
||||
OPENAI_BASE_URL = os.getenv("STT_OPENAI_BASE_URL", "https://api.openai.com/v1")
|
||||
|
||||
|
||||
def _resolve_stt_provider() -> Tuple[Optional[str], Optional[str], str]:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue