When invoking the workflow API, can text-to-speech achieve streaming output? #16629

Closed
opened 2026-02-21 19:26:59 -05:00 by yindo · 5 comments
Owner

Originally created by @Jimmy-L99 on GitHub (Sep 1, 2025).

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • Please do not modify this template :) and fill in all the required fields.

1. Is this request related to a challenge you're experiencing? Tell me about your story.

When invoking the workflow API, can text-to-speech achieve streaming output?

2. Additional context or comments

No response

3. Can you help us with this feature?

  • I am interested in contributing to this feature.
Originally created by @Jimmy-L99 on GitHub (Sep 1, 2025). ### Self Checks - [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542). - [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, otherwise it will be closed. - [x] Please do not modify this template :) and fill in all the required fields. ### 1. Is this request related to a challenge you're experiencing? Tell me about your story. When invoking the workflow API, can text-to-speech achieve streaming output? ### 2. Additional context or comments _No response_ ### 3. Can you help us with this feature? - [ ] I am interested in contributing to this feature.
yindo added the 🌊 feat:workflow label 2026-02-21 19:26:59 -05:00
yindo closed this issue 2026-02-21 19:26:59 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Sep 1, 2025):

Dify's backend supports streaming output for text-to-speech (TTS) at the model layer, meaning audio data can be generated and streamed as bytes in real time. However, the workflow API does not currently expose or document a way to achieve TTS streaming output directly. While the API supports a response_mode parameter for streaming (typewriter-like output via SSE), this is not explicitly available for TTS nodes in workflows, and only chatflows have nodes that support streaming output by design. So, TTS streaming is not natively supported when invoking the workflow API for workflows at this time.
You can find more details about streaming limitations and API modes in this discussion and API documentation updates.

To reply, just mention @dosu.


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

@dosubot[bot] commented on GitHub (Sep 1, 2025): <!-- Answer --> Dify's backend supports streaming output for text-to-speech (TTS) at the model layer, meaning audio data can be generated and streamed as bytes in real time. However, the workflow API does not currently expose or document a way to achieve TTS streaming output directly. While the API supports a `response_mode` parameter for streaming (typewriter-like output via SSE), this is not explicitly available for TTS nodes in workflows, and only chatflows have nodes that support streaming output by design. So, TTS streaming is not natively supported when invoking the workflow API for workflows at this time. You can find more details about streaming limitations and API modes in [this discussion](https://github.com/langgenius/dify/issues/20952) and [API documentation updates](https://github.com/langgenius/dify/pull/24733). <!-- 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/85d594d3-8905-4492-8fa8-ed144bf0a27f?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/85d594d3-8905-4492-8fa8-ed144bf0a27f?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/85d594d3-8905-4492-8fa8-ed144bf0a27f?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/85d594d3-8905-4492-8fa8-ed144bf0a27f?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/85d594d3-8905-4492-8fa8-ed144bf0a27f?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/85d594d3-8905-4492-8fa8-ed144bf0a27f?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/85d594d3-8905-4492-8fa8-ed144bf0a27f?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&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/24936)
Author
Owner

@Jimmy-L99 commented on GitHub (Sep 1, 2025):

@dosu
Since Dify's backend supports streaming output of text-to-speech (TTS) at the model layer, where can this capability be utilized? If the workflow doesn't work, are there any other applications that can utilize the low-latency streaming experience?

@Jimmy-L99 commented on GitHub (Sep 1, 2025): @dosu Since Dify's backend supports streaming output of text-to-speech (TTS) at the model layer, where can this capability be utilized? If the workflow doesn't work, are there any other applications that can utilize the low-latency streaming experience?
Author
Owner

@dosubot[bot] commented on GitHub (Sep 1, 2025):

Dify's backend streaming TTS capability is only exposed through the internal plugin API endpoint (/invoke/tts), which is designed for advanced plugin integrations and not available in standard workflows, playground, or public APIs. If you need low-latency TTS streaming, you can leverage this plugin API in a custom plugin context—this is how real-time audio streaming is supported for plugin consumers, but not for general app users or workflow nodes. For most users, TTS is delivered as a single audio buffer after synthesis is complete, not as a stream. If you want streaming in chatflow, a common workaround is to implement your logic as a custom plugin using the LLM node, which does support streaming in chatflow mode citation citation.

To reply, just mention @dosu.


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

@dosubot[bot] commented on GitHub (Sep 1, 2025): <!-- Answer --> Dify's backend streaming TTS capability is only exposed through the internal plugin API endpoint (/invoke/tts), which is designed for advanced plugin integrations and not available in standard workflows, playground, or public APIs. If you need low-latency TTS streaming, you can leverage this plugin API in a custom plugin context—this is how real-time audio streaming is supported for plugin consumers, but not for general app users or workflow nodes. For most users, TTS is delivered as a single audio buffer after synthesis is complete, not as a stream. If you want streaming in chatflow, a common workaround is to implement your logic as a custom plugin using the LLM node, which does support streaming in chatflow mode [citation](https://github.com/langgenius/dify/issues/24606#issuecomment-3226564465) [citation](https://github.com/langgenius/dify/blob/2e89d29c87600055be591f18e180af1c47f16197/api/controllers/inner_api/plugin/plugin.py). <!-- 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/02b47485-4a81-47af-9774-58483824b28e?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/02b47485-4a81-47af-9774-58483824b28e?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/02b47485-4a81-47af-9774-58483824b28e?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/02b47485-4a81-47af-9774-58483824b28e?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/02b47485-4a81-47af-9774-58483824b28e?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/02b47485-4a81-47af-9774-58483824b28e?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/02b47485-4a81-47af-9774-58483824b28e?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&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/24936)
Author
Owner

@Jimmy-L99 commented on GitHub (Sep 1, 2025):

@dosu
Is there such a plugin available in the plugin marketplace?

@Jimmy-L99 commented on GitHub (Sep 1, 2025): @dosu Is there such a plugin available in the plugin marketplace?
Author
Owner

@dosubot[bot] commented on GitHub (Sep 1, 2025):

There isn't a plugin in the Dify plugin marketplace that provides streaming TTS functionality. Streaming TTS is only available through the internal plugin API for advanced integrations, not via marketplace plugins or standard workflows. If you need streaming TTS, you can implement it as a custom plugin using the LLM node in chatflow mode or by leveraging the internal plugin API endpoint for advanced use cases.

To reply, just mention @dosu.


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

@dosubot[bot] commented on GitHub (Sep 1, 2025): <!-- Answer --> There isn't a plugin in the Dify plugin marketplace that provides streaming TTS functionality. Streaming TTS is only available through the internal plugin API for advanced integrations, not via marketplace plugins or standard workflows. If you need streaming TTS, you can implement it as a custom plugin using the LLM node in chatflow mode or by leveraging the internal plugin API endpoint for advanced use cases. <!-- 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/57181698-a865-4f3a-ae3d-ebe130c11fd3?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/57181698-a865-4f3a-ae3d-ebe130c11fd3?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/57181698-a865-4f3a-ae3d-ebe130c11fd3?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/57181698-a865-4f3a-ae3d-ebe130c11fd3?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/57181698-a865-4f3a-ae3d-ebe130c11fd3?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/57181698-a865-4f3a-ae3d-ebe130c11fd3?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/57181698-a865-4f3a-ae3d-ebe130c11fd3?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&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/24936)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#16629