chatflow open APIs "/audio-to-text" response status is 415 #13635

Closed
opened 2026-02-21 19:13:05 -05:00 by yindo · 1 comment
Owner

Originally created by @jasonleelover on GitHub (May 6, 2025).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.3.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

1、Create a chatflow type application and enable speech to text conversion functionality

Image

2、Call API interface '/audio to text'

Image

3、 On version 1.1.2, the API was used normally, but when upgrading to version 1.3.0, it returned an "Audio type not allowed."

✔️ Expected Behavior

Output speech to text results

Actual Behavior

{
"code": "unsupported_audio_type",
"message": "Audio type not allowed.",
"status": 415
}

Originally created by @jasonleelover on GitHub (May 6, 2025). ### Self Checks - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.3.0 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce 1、Create a chatflow type application and enable speech to text conversion functionality ![Image](https://github.com/user-attachments/assets/95425bb8-8a28-43f7-8589-3e99574a2501) 2、Call API interface '/audio to text' ![Image](https://github.com/user-attachments/assets/32696c58-560b-4587-a452-07fff8b00a41) 3、 On version 1.1.2, the API was used normally, but when upgrading to version 1.3.0, it returned an "Audio type not allowed." ### ✔️ Expected Behavior Output speech to text results ### ❌ Actual Behavior { "code": "unsupported_audio_type", "message": "Audio type not allowed.", "status": 415 }
yindo added the stt & tts label 2026-02-21 19:13:05 -05:00
yindo closed this issue 2026-02-21 19:13:05 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (May 6, 2025):

The issue you're encountering with the "/audio-to-text" API endpoint returning a 415 status with the message "Audio type not allowed" in Dify version 1.3.0 is due to the Content-Type of the audio file not being set correctly. In version 1.3.0, you need to specify a single Content-Type from the supported formats when uploading audio files. Supported audio types are: audio/mp3, audio/mp4, audio/mpeg, audio/mpga, audio/m4a, audio/wav, or audio/webm.

Ensure that you set the Content-Type correctly in your request. For example, if you're uploading an MP3 file, use:

curl -X POST 'https://aicenter.xmgxrc.com/v1/audio-to-text' \
--header 'Authorization: Bearer {api_key}' \
--form 'file=@localfile;type=audio/mp3'

Make sure the audio file format matches one of the supported types and the Content-Type is specified accordingly [1].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

@dosubot[bot] commented on GitHub (May 6, 2025): <!-- Answer --> The issue you're encountering with the "/audio-to-text" API endpoint returning a 415 status with the message "Audio type not allowed" in Dify version 1.3.0 is due to the Content-Type of the audio file not being set correctly. In version 1.3.0, you need to specify a single Content-Type from the supported formats when uploading audio files. Supported audio types are: audio/mp3, audio/mp4, audio/mpeg, audio/mpga, audio/m4a, audio/wav, or audio/webm. Ensure that you set the Content-Type correctly in your request. For example, if you're uploading an MP3 file, use: ```bash curl -X POST 'https://aicenter.xmgxrc.com/v1/audio-to-text' \ --header 'Authorization: Bearer {api_key}' \ --form 'file=@localfile;type=audio/mp3' ``` Make sure the audio file format matches one of the supported types and the Content-Type is specified accordingly <sup>[[1]](https://github.com/langgenius/dify/issues/18791)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/a2749930-6280-4d9e-b895-cc5d2c0343a5?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/a2749930-6280-4d9e-b895-cc5d2c0343a5?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/a2749930-6280-4d9e-b895-cc5d2c0343a5?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/a2749930-6280-4d9e-b895-cc5d2c0343a5?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/a2749930-6280-4d9e-b895-cc5d2c0343a5?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/a2749930-6280-4d9e-b895-cc5d2c0343a5?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/a2749930-6280-4d9e-b895-cc5d2c0343a5?feedback_type=other)</sup>
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#13635