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 with error_code `provider_not_support_speech_to_text`, raised by ProviderNotSupportSpeechToTextError when AudioService raises ProviderNotSupportSpeechToTextServiceError. The configured model provider does not offer a speech-to-text model, so transcription cannot run. This is a capability mismatch, not a credential or quota problem.
Source
Thrown at api/controllers/console/explore/trial.py:690
response = AudioService.transcript_asr(
app_model=app_model,
file=file,
session=db.session(),
end_user=None,
)
RecommendedAppService.add_trial_app_record(app_id, user_id, session=db.session())
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()
class TrialChatTextApi(TrialAppResource):View on GitHub (pinned to ef8544b173)
Solutions
- Configure a provider that supports speech-to-text (e.g. OpenAI Whisper) in Settings -> Model Provider and select it as the STT model.
- In the app studio, point the speech-to-text setting at a model/provider that has the STT capability.
- If no STT-capable provider is available, disable the audio input in the app rather than exposing a broken control.
Example fix
// before - app STT bound to a provider without STT speech_to_text: enabled: true provider: anthropic // no STT model // after - bind to an STT-capable provider speech_to_text: enabled: true provider: openai model: whisper-1
Defensive patterns
Strategy: validation
Validate before calling
const providers = await fetch('/console/api/workspaces/current/model-providers').then(r => r.json())
const hasSTT = (providers.data || []).some(p => p.supported_models?.speech_to_text?.length > 0 && p.credentials_validated)
if (!hasSTT) throw new Error('configure an STT-capable provider') Try / catch
try {
const r = await fetch(audioUrl, { method: 'POST', body: fd })
if (r.status === 400) {
const body = await r.json()
if (body.code === 'provider_not_support_speech_to_text') promptConfigureSTT()
}
} catch (e) { reportToUser(e) } Prevention
- Configure an STT-capable provider (e.g. OpenAI Whisper) before enabling audio.
- Bind the app's STT setting to a provider that actually exposes an STT model.
- Hide the mic control if no STT provider is configured.
When it happens
Trigger: POST TrialChatAudioApi where the tenant's active provider (or the hosted trial provider) has no STT model configured/available. Credentials are valid but the provider simply lacks a speech-to-text capability.
Common situations: Tenant configured an LLM-only provider (e.g. an Anthropic-only setup) and tried audio; the provider plugin was installed without its STT model registered; using a provider whose STT was deprecated.
Related errors
AI-assisted analysis of langgenius/dify@ef8544b173 (2026-08-12).
Data as JSON: /api/errors/b267ac3312592733.
Report an issue: GitHub.