[PR #74] [MERGED] fix tts not work well #295

Closed
opened 2026-02-16 01:15:26 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langgenius/dify-plugin-daemon/pull/74
Author: @hjlarry
Created: 3/7/2025
Status: Merged
Merged: 3/7/2025
Merged by: @Yeuoly

Base: mainHead: p9


📝 Commits (1)

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 internal/core/plugin_daemon/model_service.go (+1 -1)

📄 Description

fix https://github.com/langgenius/dify/issues/15025

I add this code to plugin sdk here for debug:

            for i, chunk in enumerate(b):
                with open(f'tts_debug_chunk_{i}.bin', 'wb') as f:
                    f.write(chunk)
                yield {"result": binascii.hexlify(chunk).decode()}

also add this code to api server here for debug:

            for i, result in enumerate(response):
                hex_str = result.result
                decoded = binascii.unhexlify(hex_str)
                with open(f'received_chunk_{i}.bin', 'wb') as f:
                    f.write(decoded)
                yield decoded

always get tts_debug_chunk_70.bin files and only received_chunk_50.bin files
after change the response_buffer_size it works


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langgenius/dify-plugin-daemon/pull/74 **Author:** [@hjlarry](https://github.com/hjlarry) **Created:** 3/7/2025 **Status:** ✅ Merged **Merged:** 3/7/2025 **Merged by:** [@Yeuoly](https://github.com/Yeuoly) **Base:** `main` ← **Head:** `p9` --- ### 📝 Commits (1) - [`348f68a`](https://github.com/langgenius/dify-plugin-daemon/commit/348f68a50759b6500016b9ea920fb9056e7088f6) fix tts not work well ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `internal/core/plugin_daemon/model_service.go` (+1 -1) </details> ### 📄 Description fix https://github.com/langgenius/dify/issues/15025 I add this code to plugin sdk [here](https://github.com/langgenius/dify-plugin-sdks/blob/b936b1be9f91d1ae6725604ad8938b80cf42c635/python/dify_plugin/core/plugin_executor.py#L217) for debug: ``` for i, chunk in enumerate(b): with open(f'tts_debug_chunk_{i}.bin', 'wb') as f: f.write(chunk) yield {"result": binascii.hexlify(chunk).decode()} ``` also add this code to api server [here](https://github.com/langgenius/dify/blob/4aaf07d62af180439a4871a2191e45b610929881/api/core/plugin/manager/model.py#L403) for debug: ``` for i, result in enumerate(response): hex_str = result.result decoded = binascii.unhexlify(hex_str) with open(f'received_chunk_{i}.bin', 'wb') as f: f.write(decoded) yield decoded ``` always get `tts_debug_chunk_70.bin` files and only `received_chunk_50.bin` files after change the `response_buffer_size` it works --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 01:15:26 -05:00
yindo closed this issue 2026-02-16 01:15:26 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-plugin-daemon#295