修复fish audio配置项#9344
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces support for specifying a custom TTS model in the FishAudio TTS engine by adding the fishaudio-tts-model configuration option and updating the API request payload. Feedback was provided regarding a potential API error when the model field is left empty; it is recommended to default to a valid model identifier like "stable-v1" instead of sending an empty string.
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.
| text=text, | ||
| format="wav", | ||
| reference_id=reference_id, | ||
| model=self.get_model(), |
There was a problem hiding this comment.
如果用户在 WebUI 中将 fishaudio-tts-model 留空,self.get_model() 将返回空字符串 ""。这会导致向 Fish Audio API 发送 "model": "" 的请求,从而引发 API 错误(例如 400 或 422 错误),因为空字符串不是有效的模型 ID。为了支持“留空则使用默认模型”的设计,建议在 self.get_model() 为空时,默认使用 Fish Audio 的标准默认模型 "stable-v1"。
| model=self.get_model(), | |
| model=self.get_model() or "stable-v1", |
修复了fish audio不能选模型的问题,并且优化webui展示
Modifications / 改动点
astrbot/core/config/default.pyastrbot/core/provider/sources/fishaudio_tts_api_source.pydashboard/src/i18n/locales/zh-CN/features/config-metadata.jsondashboard/src/i18n/locales/en-US/features/config-metadata.jsondashboard/src/i18n/locales/ru-RU/features/config-metadata.jsonScreenshots 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
Fix FishAudio TTS configuration so the engine model can be selected and correctly passed to the API, and update dashboard metadata accordingly.
New Features:
Bug Fixes:
Enhancements:
Documentation: