{"record":{"id":"b267ac3312592733","repo":"langgenius/dify","slug":"provider-not-support-speech-to-text-b267ac","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/trial.py","lineNumber":690,"sourceCode":"            response = AudioService.transcript_asr(\n                app_model=app_model,\n                file=file,\n                session=db.session(),\n                end_user=None,\n            )\n            RecommendedAppService.add_trial_app_record(app_id, user_id, session=db.session())\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\nclass TrialChatTextApi(TrialAppResource):","sourceCodeStart":672,"sourceCodeEnd":708,"githubUrl":"https://github.com/langgenius/dify/blob/ef8544b173fd6cd7a8e71df2cab576e52bebbfbc/api/controllers/console/explore/trial.py#L672-L708","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before - app STT bound to a provider without STT\nspeech_to_text:\n  enabled: true\n  provider: anthropic  // no STT model\n\n// after - bind to an STT-capable provider\nspeech_to_text:\n  enabled: true\n  provider: openai\n  model: whisper-1","handlingStrategy":"validation","validationCode":"const providers = await fetch('/console/api/workspaces/current/model-providers').then(r => r.json())\nconst hasSTT = (providers.data || []).some(p => p.supported_models?.speech_to_text?.length > 0 && p.credentials_validated)\nif (!hasSTT) throw new Error('configure an STT-capable provider')","typeGuard":null,"tryCatchPattern":"try {\n  const r = await fetch(audioUrl, { method: 'POST', body: fd })\n  if (r.status === 400) {\n    const body = await r.json()\n    if (body.code === 'provider_not_support_speech_to_text') promptConfigureSTT()\n  }\n} catch (e) { reportToUser(e) }","preventionTips":["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."],"tags":["dify","trial-api","console","explore","audio","speech-to-text","model-provider","capability","http-400"],"backgroundTag":null,"analyzedSha":"ef8544b173fd6cd7a8e71df2cab576e52bebbfbc","analyzedAt":"2026-08-12T05:15:17.394Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}