langgenius/dify · error · SpeechToTextDisabledError
speech_to_text_disabled
speech_to_text_disabled
Error message
Speech to text is disabled.
What it means
Raised by _transcribe_audio_to_text when AudioService raises SpeechToTextDisabledServiceError — the speech-to-text feature is disabled in the system/tenant configuration. Translated to SpeechToTextDisabledError (400, error_code 'speech_to_text_disabled').
Source
Thrown at api/controllers/console/app/audio.py:163
agent_soul=agent_soul,
file=file,
session=session,
end_user=None,
)
return dump_response(AudioTranscriptResponse, response)
except services.errors.app_model_config.AppModelConfigBrokenError:
logger.exception("App model config broken.")
raise AppUnavailableError()
except NoAudioUploadedServiceError:
raise NoAudioUploadedError()
except AudioTooLargeServiceError as e:
raise AudioTooLargeError(str(e))
except UnsupportedAudioTypeServiceError:
raise UnsupportedAudioTypeError()
except ProviderNotSupportSpeechToTextServiceError:
raise ProviderNotSupportSpeechToTextError()
except SpeechToTextDisabledServiceError:
raise SpeechToTextDisabledError()
except ProviderTokenNotInitError as ex:
raise ProviderNotInitializeError(ex.description)
except QuotaExceededError:
raise ProviderQuotaExceededError()
except ModelCurrentlyNotSupportError:
raise ProviderModelCurrentlyNotSupportError()
except InvokeError as e:
raise CompletionRequestError(e.description)
except HTTPException:
raise
except ValueError:
raise
except Exception as e:
logger.exception("Failed to transcribe audio to text")
raise InternalServerError() from e
@console_ns.route("/apps/<uuid:app_id>/audio-to-text")View on GitHub (pinned to ef8544b173)
Solutions
- Enable speech-to-text in the system/tenant configuration (set the relevant SPEECH_TO_TEXT config flag).
- Restart the API service after changing the config.
- Confirm the feature is enabled in the admin console before users hit the endpoint.
- Hide the audio upload UI when STT is disabled.
Example fix
# before: .env SPEECH_TO_TEXT_ENABLED=false # after SPEECH_TO_TEXT_ENABLED=true
Defensive patterns
Strategy: try-catch
Try / catch
try { await axios.post(`/apps/${id}/audio-to-text`, form); }
catch (e) { if (e.code === 'speech_to_text_disabled') { /* hide audio UI; surface to admin */ } } Prevention
- Enable SPEECH_TO_TEXT in system/tenant config before exposing the UI.
- Restart the API service after toggling the flag.
- Hide the audio upload control when the feature is off.
When it happens
Trigger: Calling the audio-to-text endpoint when the STT feature flag is off at the system or tenant level, regardless of provider configuration.
Common situations: Self-hosted deployment where SPEECH_TO_TEXT is disabled by default; admin disabled the feature; tenant settings override turned STT off.
Related errors
- provider_not_support_speech_to_text
- app_unavailable
- no_audio_uploaded
- unsupported_audio_type
- provider_quota_exceeded
AI-assisted analysis of langgenius/dify@ef8544b173 (2026-08-12).
Data as JSON: /api/errors/89c11fb3d73bc24f.
Report an issue: GitHub.