feat: add aliyun bailian qwen3-tts-vc voice clone tts provider#9060
feat: add aliyun bailian qwen3-tts-vc voice clone tts provider#9060makuralymi wants to merge 6 commits into
Conversation
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The new DashScope voice clone provider mutates global
dashscope.api_keyanddashscope.base_http_api_urlon each call, which can cause subtle issues when multiple DashScope-based providers are used concurrently; consider scoping configuration to the call (e.g., passingapi_key/base URL via arguments only) or otherwise avoiding global state. - Several
hintfields indefault.pyrely on implicit string literal concatenation ("..." "..."without separators), which produces a single string without spaces or newlines between segments; consider adding explicit spacing/newlines or using a single literal to keep the UI text readable. - In
get_audio, the synthesized audio is always written with a.wavextension regardless of the actual format returned by DashScope; if the API may return other formats (e.g., MP3), consider deriving the file extension from the response metadata or URL.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The new DashScope voice clone provider mutates global `dashscope.api_key` and `dashscope.base_http_api_url` on each call, which can cause subtle issues when multiple DashScope-based providers are used concurrently; consider scoping configuration to the call (e.g., passing `api_key`/base URL via arguments only) or otherwise avoiding global state.
- Several `hint` fields in `default.py` rely on implicit string literal concatenation (`"..." "..."` without separators), which produces a single string without spaces or newlines between segments; consider adding explicit spacing/newlines or using a single literal to keep the UI text readable.
- In `get_audio`, the synthesized audio is always written with a `.wav` extension regardless of the actual format returned by DashScope; if the API may return other formats (e.g., MP3), consider deriving the file extension from the response metadata or URL.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
There was a problem hiding this comment.
Code Review
This pull request introduces a new Text-to-Speech (TTS) provider for Alibaba Cloud Bailian Voice Cloning (Qwen3-TTS-VC), adding configuration metadata, localization support, and the core implementation. The review feedback highlights critical concurrency issues, specifically that modifying global DashScope configuration variables is not thread-safe and can cause race conditions with other providers. The reviewer recommends passing the API key and base URL dynamically via arguments instead. Additionally, the feedback suggests adding robust error handling by checking API response status codes and HTTP download status codes to prevent corrupted audio files.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Modifications / 改动点
Screenshots or Test Results / 运行截图或测试结果
Checklist / 检查清单
😊 If there are new features added in the PR, I have discussed it with the authors through issues/emails, etc.
/ 如果 PR 中有新加入的功能,已经通过 Issue / 邮件等方式和作者讨论过。
👀 My changes have been well-tested, and "Verification Steps" and "Screenshots" have been provided above.
/ 我的更改经过了良好的测试,并已在上方提供了“验证步骤”和“运行截图”。
🤓 I have ensured that no new dependencies are introduced, OR if new dependencies are introduced, they have been added to the appropriate locations in
requirements.txtandpyproject.toml./ 我确保没有引入新依赖库,或者引入了新依赖库的同时将其添加到
requirements.txt和pyproject.toml文件相应位置。😮 My changes do not introduce malicious code.
/ 我的更改没有引入恶意代码。
Summary by Sourcery
Add a new DashScope-based Aliyun Bailian Qwen3 voice-clone TTS provider and wire it into the provider manager and configuration metadata.
New Features:
Enhancements: