Accessing the "/app/text to audio" interface,Returned 200, but couldn't hear any sound #15126

Closed
opened 2026-02-21 19:20:18 -05:00 by yindo · 3 comments
Owner

Originally created by @orcharddd2024 on GitHub (Jul 4, 2025).

Self Checks

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

Provide a description of requested docs changes

The request link for the preview interface is as follows

http://localhost/files/bd476227-fef2-4716-99f1-d135d782d291/file-preview?timestamp=1751615643&nonce=ae920e83e773f2ad2c567219396f2856&sign=YUyym0JMqXKwrNGUv61NCe6h4i0MGZYJzMG2LJtTvpk=

print(response.headers.get("Content-Type"))
print(response.content[:200])
The printed content is as follows

audio/wav
b'RIFF$\xa1\x04\x00WAVEfmt \x10\x00\x00\x00\x01\x00\x01\x00\xc0]\x00\x00\x80\xbb\x00\x00\x02\x00\x10\x00data\x00\xa1\x04\x00\x02\x00\x00\x00\x01\x00\x02\x00\x00\x00\x00\x00\x04\x00\x04\x00\x00\x00\x01\x00\x02\x00\x04\x00\x02\x00\x02\x00\x04\x00\x03\x00\x02\x00\x02\x00\x01\x00\x02\x00\x03\x00\x03\x00\x01\x00\x01\x00\x02\x00\x02\x00\x01\x00\x01\x00\x02\x00\x03\x00\x01\x00\x01\x00\x01\x00\x02\x00\x01\x00\x01\x00\x01\x00\x02\x00\x01\x00\x01\x00\x02\x00\x03\x00\x01\x00\x01\x00\x02\x00\x03\x00\x01\x00\x01\x00\x02\x00\x03\x00\x01\x00\x01\x00\x02\x00\x03\x00\x01\x00\x01\x00\x02\x00\x03\x00\x01\x00\x01\x00\x02\x00\x02\x00\x01\x00\x01\x00\x02\x00\x03\x00\x01\x00\x01\x00\x02\x00\x02\x00\x01\x00\x01\x00\x02\x00\x02\x00\x01\x00\x01\x00\x02\x00\x02\x00'
2025-07-04 08:38:34.269 INFO [Thread-57 (process_request_thread)] [_internal.py:97] - 127.0.0.1 - - [04/Jul/2025 16:38:34] "POST /api/text-to-audio HTTP/1.1" 200 -`

Image

But I can see the download button on the right side of the small player. After clicking the download button, you can download the audio file, so the URL for requesting this preview interface is "/files/d80f247c-d0cd-40a3-a6e7-bb34303810aa/file preview? Timestamp=1751618314&once=4d94566d5467ae8a31a6f6586938c2&sign=MY4dPB-y4dviYpaEurGNtOwwdZK8LoJFbzGpKJH6uz8=HTTP/1.1" 200- ". So why can't you get the audio source file? Why is the printing type" audio/wav "? What about it?

Image

Accessing the "/app/text to audio" interface,Returned 200, but couldn't hear any sound. My physical hardware is fine because I tried the online DIY version and it worked

Do I have to download the audio source file? Does dify have such an interface?

Originally created by @orcharddd2024 on GitHub (Jul 4, 2025). ### Self Checks - [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 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. ### Provide a description of requested docs changes The request link for the preview interface is as follows http://localhost/files/bd476227-fef2-4716-99f1-d135d782d291/file-preview?timestamp=1751615643&nonce=ae920e83e773f2ad2c567219396f2856&sign=YUyym0JMqXKwrNGUv61NCe6h4i0MGZYJzMG2LJtTvpk= print(response.headers.get("Content-Type")) print(response.content[:200]) The printed content is as follows audio/wav b'RIFF$\xa1\x04\x00WAVEfmt \x10\x00\x00\x00\x01\x00\x01\x00\xc0]\x00\x00\x80\xbb\x00\x00\x02\x00\x10\x00data\x00\xa1\x04\x00\x02\x00\x00\x00\x01\x00\x02\x00\x00\x00\x00\x00\x04\x00\x04\x00\x00\x00\x01\x00\x02\x00\x04\x00\x02\x00\x02\x00\x04\x00\x03\x00\x02\x00\x02\x00\x01\x00\x02\x00\x03\x00\x03\x00\x01\x00\x01\x00\x02\x00\x02\x00\x01\x00\x01\x00\x02\x00\x03\x00\x01\x00\x01\x00\x01\x00\x02\x00\x01\x00\x01\x00\x01\x00\x02\x00\x01\x00\x01\x00\x02\x00\x03\x00\x01\x00\x01\x00\x02\x00\x03\x00\x01\x00\x01\x00\x02\x00\x03\x00\x01\x00\x01\x00\x02\x00\x03\x00\x01\x00\x01\x00\x02\x00\x03\x00\x01\x00\x01\x00\x02\x00\x02\x00\x01\x00\x01\x00\x02\x00\x03\x00\x01\x00\x01\x00\x02\x00\x02\x00\x01\x00\x01\x00\x02\x00\x02\x00\x01\x00\x01\x00\x02\x00\x02\x00' 2025-07-04 08:38:34.269 INFO [Thread-57 (process_request_thread)] [_internal.py:97] - 127.0.0.1 - - [04/Jul/2025 16:38:34] "POST /api/text-to-audio HTTP/1.1" 200 -` ![Image](https://github.com/user-attachments/assets/11370a88-1134-43e2-ad2d-55129472a869) But I can see the download button on the right side of the small player. After clicking the download button, you can download the audio file, so the URL for requesting this preview interface is "/files/d80f247c-d0cd-40a3-a6e7-bb34303810aa/file preview? Timestamp=1751618314&once=4d94566d5467ae8a31a6f6586938c2&sign=MY4dPB-y4dviYpaEurGNtOwwdZK8LoJFbzGpKJH6uz8=HTTP/1.1" 200- ". So why can't you get the audio source file? Why is the printing type" audio/wav "? What about it? ![Image](https://github.com/user-attachments/assets/1afb8438-e4b4-4fcf-8224-81320389df43) Accessing the "/app/text to audio" interface,Returned 200, but couldn't hear any sound. My physical hardware is fine because I tried the online DIY version and it worked Do I have to download the audio source file? Does dify have such an interface?
yindo added the stt & tts🤔 cant-reproduce labels 2026-02-21 19:20:18 -05:00
yindo closed this issue 2026-02-21 19:20:18 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jul 4, 2025):

Dify's in-browser audio playback only supports MP3 (audio/mpeg) streams. If your backend returns audio as WAV (audio/wav), the frontend player won't be able to play it inline—even though you can download and play the file locally. This is a limitation of the current implementation: the audio player and streaming logic are hardcoded for MP3 and do not support WAV for in-browser playback. If you want audio to play directly in the browser, you'll need to configure your backend to return MP3 files instead of WAV. Otherwise, downloading the file is necessary to hear the sound.
Source: NewAudioButton and AudioPlayerManager implementation

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X

@dosubot[bot] commented on GitHub (Jul 4, 2025): <!-- Answer --> Dify's in-browser audio playback only supports MP3 (audio/mpeg) streams. If your backend returns audio as WAV (audio/wav), the frontend player won't be able to play it inline—even though you can download and play the file locally. This is a limitation of the current implementation: the audio player and streaming logic are hardcoded for MP3 and do not support WAV for in-browser playback. If you want audio to play directly in the browser, you'll need to configure your backend to return MP3 files instead of WAV. Otherwise, downloading the file is necessary to hear the sound. [Source: NewAudioButton and AudioPlayerManager implementation](https://github.com/langgenius/dify/blob/6663187eca72f40f016896eaef113f2b19d14bd9/web/app/components/base/new-audio-button/index.tsx) <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/f3d3c314-59a4-48b4-b33e-80d550ce0ee3?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/f3d3c314-59a4-48b4-b33e-80d550ce0ee3?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/f3d3c314-59a4-48b4-b33e-80d550ce0ee3?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/f3d3c314-59a4-48b4-b33e-80d550ce0ee3?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/f3d3c314-59a4-48b4-b33e-80d550ce0ee3?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/f3d3c314-59a4-48b4-b33e-80d550ce0ee3?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/f3d3c314-59a4-48b4-b33e-80d550ce0ee3?feedback_type=other)</sup>&nbsp;&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/21928)
Author
Owner

@orcharddd2024 commented on GitHub (Jul 4, 2025):

Dify's in-browser audio playback only supports MP3 (audio/mpeg) streams. If your backend returns audio as WAV (audio/wav), the frontend player won't be able to play it inline—even though you can download and play the file locally. This is a limitation of the current implementation: the audio player and streaming logic are hardcoded for MP3 and do not support WAV for in-browser playback. If you want audio to play directly in the browser, you'll need to configure your backend to return MP3 files instead of WAV. Otherwise, downloading the file is necessary to hear the sound. Source: NewAudioButton and AudioPlayerManager implementation

To reply, just mention @dosu.

How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X

I'll try it on my end

@orcharddd2024 commented on GitHub (Jul 4, 2025): > Dify's in-browser audio playback only supports MP3 (audio/mpeg) streams. If your backend returns audio as WAV (audio/wav), the frontend player won't be able to play it inline—even though you can download and play the file locally. This is a limitation of the current implementation: the audio player and streaming logic are hardcoded for MP3 and do not support WAV for in-browser playback. If you want audio to play directly in the browser, you'll need to configure your backend to return MP3 files instead of WAV. Otherwise, downloading the file is necessary to hear the sound. [Source: NewAudioButton and AudioPlayerManager implementation](https://github.com/langgenius/dify/blob/6663187eca72f40f016896eaef113f2b19d14bd9/web/app/components/base/new-audio-button/index.tsx) > > _To reply, just mention [@dosu](https://go.dosu.dev/dosubot)._ > > How did I do? [Good](https://app.dosu.dev/response-feedback/f3d3c314-59a4-48b4-b33e-80d550ce0ee3?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/f3d3c314-59a4-48b4-b33e-80d550ce0ee3?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/f3d3c314-59a4-48b4-b33e-80d550ce0ee3?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/f3d3c314-59a4-48b4-b33e-80d550ce0ee3?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/f3d3c314-59a4-48b4-b33e-80d550ce0ee3?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/f3d3c314-59a4-48b4-b33e-80d550ce0ee3?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/f3d3c314-59a4-48b4-b33e-80d550ce0ee3?feedback_type=other)  [![Join Discord](https://camo.githubusercontent.com/d562c2df5e4567ea41d37f1d91a4da0839d8341037045b103b2da268998de17f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6a6f696e2d3538363546323f6c6f676f3d646973636f7264266c6f676f436f6c6f723d7768697465266c6162656c3d)](https://go.dosu.dev/discord-bot) [![Share on X](https://camo.githubusercontent.com/4649f705e2396d6f328dbc8e800a0509c9c17b3b20253b36706c393df124b93d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f582d73686172652d626c61636b)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/21928) I'll try it on my end
Author
Owner

@hjlarry commented on GitHub (Jul 4, 2025):

what is your dify version?

@hjlarry commented on GitHub (Jul 4, 2025): what is your dify version?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#15126