langgenius/dify · error · ProviderNotSupportSpeechToTextError
provider_not_support_speech_to_text
provider_not_support_speech_to_text
Error message
Provider not support speech to text.
What it means
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.
Source
Thrown at api/controllers/console/explore/audio.py:79
response = AudioService.transcript_asr(
app_model=app_model,
file=file,
session=db.session(),
end_user=None,
)
return 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 ValueError as e:
raise e
except Exception as e:
logger.exception("internal server error.")
raise InternalServerError()
@console_ns.route(View on GitHub (pinned to ef8544b173)
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).
Defensive patterns
Strategy: validation
Validate before calling
// Call the model-provider config endpoint first; abort STT if no speech2text default exists.
const providers = await fetchProviderConfig()
if (!providers.some(p => p.models.some(m => m.model_type === 'speech2text' && p.is_default))) {
showSetupBanner('Configure a speech-to-text model in Settings -> Model Provider')
} Try / catch
try { await postAudio(file) }
catch (e) { if (e.code === 400 && e.error_code === 'provider_not_support_speech_to_text') routeToModelSetup() else throw e } Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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'.
Related errors
- provider_not_initialize
- model_currently_not_support
- completion_request_error
- provider_not_support_speech_to_text
- speech_to_text_disabled
AI-assisted analysis of langgenius/dify@ef8544b173 (2026-08-12).
Data as JSON: /api/errors/6d9b8a851312acfc.
Report an issue: GitHub.