{"record":{"id":"6d9b8a851312acfc","repo":"langgenius/dify","slug":"provider-not-support-speech-to-text-6d9b8a","errorCode":"provider_not_support_speech_to_text","errorMessage":"Provider not support speech to text.","messagePattern":"Provider not support speech to text\\.","errorType":"error_code","errorClass":"ProviderNotSupportSpeechToTextError","httpStatus":400,"severity":"error","filePath":"api/controllers/console/explore/audio.py","lineNumber":79,"sourceCode":"            response = AudioService.transcript_asr(\n                app_model=app_model,\n                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(","sourceCodeStart":61,"sourceCodeEnd":97,"githubUrl":"https://github.com/langgenius/dify/blob/ef8544b173fd6cd7a8e71df2cab576e52bebbfbc/api/controllers/console/explore/audio.py#L61-L97","documentation":"HTTP 400 ProviderNotSupportSpeechToTextError, raised by the STT endpoint. The tenant has no default speech-to-text model configured. In _invoke_speech_to_text (services/audio_service.py:144-149), ModelManager fetches the default ModelType.SPEECH2TEXT instance; if it returns None, the service raises ProviderNotSupportSpeechToTextServiceError, which the controller maps to this HTTP error.","triggerScenarios":"POST /console/explore/installed-apps/{installed_app_id}/audio-to-text when the workspace/tenant has never set up a speech2text model under Settings -> Model Provider, or the previously configured provider was removed/deactivated.","commonSituations":"Fresh workspace with no model provider setup; admin removed the only STT provider; using a self-hosted build without a configured STT model; tenant's provider credentials expired and the model fell back to 'no default'.","solutions":["As workspace admin, open Settings -> Model Provider and add a speech2text model (e.g., OpenAI Whisper) then set it as the system default for SPEECH2TEXT.","Verify the provider is enabled and not in an error state after credential entry.","Confirm the installed app belongs to the tenant that owns the configured provider (cross-tenant installs won't see it)."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Call the model-provider config endpoint first; abort STT if no speech2text default exists.\nconst providers = await fetchProviderConfig()\nif (!providers.some(p => p.models.some(m => m.model_type === 'speech2text' && p.is_default))) {\n  showSetupBanner('Configure a speech-to-text model in Settings -> Model Provider')\n}","typeGuard":null,"tryCatchPattern":"try { await postAudio(file) }\ncatch (e) { if (e.code === 400 && e.error_code === 'provider_not_support_speech_to_text') routeToModelSetup() else throw e }","preventionTips":["Workspace admin configures a default speech2text model before exposing the audio input.","Surface a setup banner in the UI when no STT default exists rather than letting the upload fail.","Re-check provider config after any admin change to model defaults."],"tags":["audio","stt","model-provider","configuration","http-400"],"backgroundTag":null,"analyzedSha":"ef8544b173fd6cd7a8e71df2cab576e52bebbfbc","analyzedAt":"2026-08-12T05:15:17.394Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}