event: tts_message_end always return in api streaming response_mode #5836

Closed
opened 2026-02-21 18:12:49 -05:00 by yindo · 4 comments
Owner

Originally created by @xmenw on GitHub (Sep 27, 2024).

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

0.8.3

Cloud or Self Hosted

Cloud

Steps to reproduce

curl --location 'https://api.dify.ai/v1/chat-messages'
--header 'Authorization: Bearer app-PqAVQAqIr7VJgxQTN3pIa9Oe'
--header 'Content-Type: application/json'
--data '{
"inputs": {},
"query": "What are the specs of the iPhone 13 Pro Max?",
"response_mode": "streaming",
"conversation_id": "",
"user": "abc-123"
}'

image

✔️ Expected Behavior

This parameter is not returned if text_to_speech is not configured and disable is enabled

Actual Behavior

image

Originally created by @xmenw on GitHub (Sep 27, 2024). ### 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 0.8.3 ### Cloud or Self Hosted Cloud ### Steps to reproduce curl --location 'https://api.dify.ai/v1/chat-messages' \ --header 'Authorization: Bearer app-PqAVQAqIr7VJgxQTN3pIa9Oe' \ --header 'Content-Type: application/json' \ --data '{ "inputs": {}, "query": "What are the specs of the iPhone 13 Pro Max?", "response_mode": "streaming", "conversation_id": "", "user": "abc-123" }' ![image](https://github.com/user-attachments/assets/7ff0e9ca-1512-4a91-af3b-7dfd137fa82b) ### ✔️ Expected Behavior This parameter is not returned if text_to_speech is not configured and disable is enabled ### ❌ Actual Behavior ![image](https://github.com/user-attachments/assets/7ff0e9ca-1512-4a91-af3b-7dfd137fa82b)
yindo added the 🐞 bug label 2026-02-21 18:12:49 -05:00
yindo closed this issue 2026-02-21 18:12:49 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Sep 27, 2024):

Hey @xmenw! I'm here to help you with any bugs, questions, or contributions you have for Dify. I can assist you while you wait for a human maintainer. Ask me anything!

The "tts_message_end" event always returns in the API streaming response_mode even when text_to_speech is not configured and disabled because it is a predefined event in the streaming response structure. This event is used to indicate the end of the audio stream, and its presence in the response does not depend on the actual configuration of text_to_speech [1].

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Sep 27, 2024): <!-- Greeting --> Hey @xmenw! I'm here to help you with any bugs, questions, or contributions you have for Dify. I can assist you while you wait for a human maintainer. Ask me anything! <!-- Answer --> The "tts_message_end" event always returns in the API streaming `response_mode` even when text_to_speech is not configured and disabled because it is a predefined event in the streaming response structure. This event is used to indicate the end of the audio stream, and its presence in the response does not depend on the actual configuration of text_to_speech <sup>[[1]](https://github.com/langgenius/dify/blob/main/web/app/components/develop/template/template.en.mdx)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

@crazywoola commented on GitHub (Sep 27, 2024):

@ic-xu Could you take a look at this.

@crazywoola commented on GitHub (Sep 27, 2024): @ic-xu Could you take a look at this.
Author
Owner

@ic-xu commented on GitHub (Sep 27, 2024):

@ic-xu你能看看这个吗?

OK, I'll just filter it.

@ic-xu commented on GitHub (Sep 27, 2024): > @ic-xu你能看看这个吗? OK, I'll just filter it.
Author
Owner

@ic-xu commented on GitHub (Sep 27, 2024):

PR. https://github.com/langgenius/dify/pull/8846

@ic-xu commented on GitHub (Sep 27, 2024): PR. https://github.com/langgenius/dify/pull/8846
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#5836