/text-to-audioConvert Text to Audio
Available for: Chatflow, Workflow, Agent, Chatbot, Legacy Agent, Text Generator apps.
Converts text to speech audio. Pass text to synthesize arbitrary text, or message_id to voice an existing message's answer.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
6 documented failures
app_unavailableApp unavailable, please check your app configurations.
app_unavailable
completion_request_errorCompletion request failed.
completion_request_error
invalid_paramTTS is not enabled
invalid_param
model_currently_not_supportDify Hosted OpenAI trial currently not support the GPT-4 model.
model_currently_not_support
provider_not_initializeNo valid model provider credentials found. Please go to Settings -> Model Provider to complete your provider credentials.
provider_not_initialize
provider_quota_exceededYour quota for Dify Hosted OpenAI has been exhausted. Please go to Settings -> Model Provider to complete your own provider credentials.
provider_quota_exceeded
One documented failure
internal_server_errorThe server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.
internal_server_error
A 400 is returned: - app_unavailable : The app is unavailable or misconfigured.
invalid_param: Text-to-speech is not enabled,textis missing, or no voice is available.provider_not_initialize: The workspace has no default text-to-speech model, or the default one has no credentials configured.provider_quota_exceeded: The model provider quota is exhausted.model_currently_not_support: The current model does not support this operation.completion_request_error: The text-to-speech request failed. A 500 is returned:internal_server_error: Internal server error.