{"record":{"id":"6138f7fb6d9b4647","repo":"langgenius/dify","slug":"speech-to-text-disabled-6138f7","errorCode":"speech_to_text_disabled","errorMessage":"Speech to text is disabled.","messagePattern":"Speech to text is disabled\\.","errorType":"error_code","errorClass":"SpeechToTextDisabledError","httpStatus":400,"severity":"warning","filePath":"api/controllers/console/explore/audio.py","lineNumber":81,"sourceCode":"                file=file,\n                session=db.session(),\n                end_user=None,\n            )\n\n            return response\n        except services.errors.app_model_config.AppModelConfigBrokenError:\n            logger.exception(\"App model config broken.\")\n            raise AppUnavailableError()\n        except NoAudioUploadedServiceError:\n            raise NoAudioUploadedError()\n        except AudioTooLargeServiceError as e:\n            raise AudioTooLargeError(str(e))\n        except UnsupportedAudioTypeServiceError:\n            raise UnsupportedAudioTypeError()\n        except ProviderNotSupportSpeechToTextServiceError:\n            raise ProviderNotSupportSpeechToTextError()\n        except SpeechToTextDisabledServiceError:\n            raise SpeechToTextDisabledError()\n        except ProviderTokenNotInitError as ex:\n            raise ProviderNotInitializeError(ex.description)\n        except QuotaExceededError:\n            raise ProviderQuotaExceededError()\n        except ModelCurrentlyNotSupportError:\n            raise ProviderModelCurrentlyNotSupportError()\n        except InvokeError as e:\n            raise CompletionRequestError(e.description)\n        except ValueError as e:\n            raise e\n        except Exception as e:\n            logger.exception(\"internal server error.\")\n            raise InternalServerError()\n\n\n@console_ns.route(\n    \"/installed-apps/<uuid:installed_app_id>/text-to-audio\",\n    endpoint=\"installed_app_text\",","sourceCodeStart":63,"sourceCodeEnd":99,"githubUrl":"https://github.com/langgenius/dify/blob/ef8544b173fd6cd7a8e71df2cab576e52bebbfbc/api/controllers/console/explore/audio.py#L63-L99","documentation":"HTTP 400 SpeechToTextDisabledError, raised by the STT endpoint. The effective application configuration has speech-to-text turned off (or the config is missing entirely). AudioService.transcript_asr checks the feature per app mode: for ADVANCED_CHAT/WORKFLOW it requires workflow.features_dict['speech_to_text']['enabled']; for legacy modes it requires app_model_config.speech_to_text_dict['enabled']; for AGENT apps it merges the agent soul features and requires the merged speech_to_text enabled. Any of these being absent/false raises SpeechToTextDisabledServiceError.","triggerScenarios":"POST /console/explore/installed-apps/{id}/audio-to-text on an app whose STT feature flag is disabled; a workflow app with no 'speech_to_text' block in features_dict; a legacy app whose AppModelConfig row is missing or has speech_to_text_dict.enabled = false; a published Agent whose merged soul features disable STT.","commonSituations":"App author never enabled the Speech-to-Text toggle in the app studio; workflow was republished without the STT feature; app model config was corrupted/deleted; agent soul published without STT.","solutions":["Open the app in the studio, enable the Speech-to-Text feature, and republish (for workflow/advanced-chat) or save (for legacy chat/completion).","For Agent apps, ensure the published Agent Soul has speech_to_text enabled, then republish.","If the AppModelConfig row is missing, restore or recreate the app configuration.","Confirm you are calling audio-to-text on an app that is actually meant to support voice input."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Only render the audio-upload control when the app's feature flags enable STT.\nif (app.features?.speech_to_text?.enabled) renderMicButton()\nelse hideMicButton()","typeGuard":null,"tryCatchPattern":"try { await postAudio(file) }\ncatch (e) { if (e.code === 400 && e.error_code === 'speech_to_text_disabled') disableMicButton() else throw e }","preventionTips":["Have app authors enable Speech-to-Text in the studio and republish before users rely on it.","Gate the mic UI on the app's published features.speech_to_text.enabled flag.","After republishing a workflow, confirm the speech_to_text feature survived the publish."],"tags":["audio","stt","feature-flag","app-config","http-400"],"backgroundTag":null,"analyzedSha":"ef8544b173fd6cd7a8e71df2cab576e52bebbfbc","analyzedAt":"2026-08-12T05:15:17.394Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}