HKUDS/DeepTutor · error · VoiceProviderError
No endpoint URL configured for STT.
Error message
No endpoint URL configured for STT.
What it means
OpenAICompatSTTAdapter.transcribe requires config.base_url before it can build the {base}/audio/transcriptions URL; an empty/None base_url raises VoiceProviderError immediately. Configuration guard for the speech-to-text path.
Source
Thrown at deeptutor/services/voice/adapters/openai_compat.py:304
class OpenAICompatSTTAdapter(BaseSTTAdapter):
"""POST ``{base}/audio/transcriptions``.
Multipart ``file`` upload by default; OpenRouter uses a base64-JSON body
(``request_style == "base64_json"``) sharing the same path.
"""
async def transcribe(
self,
audio: bytes,
config: STTConfig,
*,
filename: str = "audio.webm",
content_type: str = "application/octet-stream",
) -> str:
if not config.base_url:
raise VoiceProviderError("No endpoint URL configured for STT.")
if not audio:
raise VoiceProviderError("No audio data to transcribe.")
url = join_audio_path(config.base_url, "audio/transcriptions")
auth = build_auth_headers(config.auth_style, config.api_key)
try:
async with httpx.AsyncClient(timeout=config.request_timeout) as client:
if config.request_style == STT_BASE64_JSON:
resp = await self._post_base64(client, url, auth, audio, filename, config)
else:
resp = await self._post_multipart(
client, url, auth, audio, filename, content_type, config
)
except httpx.HTTPError as exc:
raise VoiceProviderError(f"STT request error: {exc}") from exc
_raise_for_provider(resp, "Transcription")
return self._parse_text(resp)
View on GitHub (pinned to 3e82f13042)
Solutions
- Set base_url on the STTConfig / voice settings (e.g. https://api.openai.com/v1)
- Check data/user/settings/*.json and env overrides for an empty STT endpoint
- Validate voice provider config at startup
Example fix
// before cfg = STTConfig(api_key=key) // after cfg = STTConfig(base_url="https://api.openai.com/v1", api_key=key)
Defensive patterns
Strategy: validation
Validate before calling
if not (stt_config.base_url or "").strip():
raise ValueError("STT base_url must be configured") Try / catch
try:
text = await stt.transcribe(audio, stt_config)
except VoiceProviderError as exc:
if "No endpoint URL configured for STT" in str(exc):
alert_admin_missing_stt_endpoint() # config error, no retry Prevention
- Require base_url in STT settings schema
- Validate voice config on startup
When it happens
Trigger: Calling transcribe(audio, config) with STTConfig.base_url empty — e.g. STT provider settings only contain an API key, or the env override cleared the endpoint.
Common situations: Assuming a default OpenAI endpoint exists without configuring it, settings JSON missing the stt.base_url field after an upgrade, or copy-pasting a key-only config from another tool.
Related errors
- No endpoint URL configured for TTS.
- No endpoint URL configured for this provider.
- Unsupported STT adapter: {name!r}
- No endpoint URL configured for this provider.
- {action} failed with HTTP {status_code}: {detail}
AI-assisted analysis of HKUDS/DeepTutor@3e82f13042 (2026-08-27).
Data as JSON: /api/errors/e592b5c55c63c53e.
Report an issue: GitHub.