Skip to content

修复fish audio配置项#9344

Open
qiyueling2716 wants to merge 5 commits into
AstrBotDevs:masterfrom
qiyueling2716:master
Open

修复fish audio配置项#9344
qiyueling2716 wants to merge 5 commits into
AstrBotDevs:masterfrom
qiyueling2716:master

Conversation

@qiyueling2716

@qiyueling2716 qiyueling2716 commented Jul 21, 2026

Copy link
Copy Markdown

修复了fish audio不能选模型的问题,并且优化webui展示

Modifications / 改动点

  1. astrbot/core/config/default.py
  2. astrbot/core/provider/sources/fishaudio_tts_api_source.py
  3. dashboard/src/i18n/locales/zh-CN/features/config-metadata.json
  4. dashboard/src/i18n/locales/en-US/features/config-metadata.json
  5. dashboard/src/i18n/locales/ru-RU/features/config-metadata.json
  • This is NOT a breaking change. / 这不是一个破坏性变更。

Screenshots or Test Results / 运行截图或测试结果

Screenshot_20260721_213434_mark via Screenshot_20260721_213444_mark via Screenshot_20260721_213454_mark via Screenshot_20260721_213506_mark via Screenshot_20260721_213510_mark via

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.txt and pyproject.toml.
    / 我确保没有引入新依赖库,或者引入了新依赖库的同时将其添加到 requirements.txtpyproject.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:

  • Add configurable FishAudio TTS model ID field to the core config and dashboard metadata.

Bug Fixes:

  • Resolve issue where FishAudio TTS could not select or use a specific model due to missing and mismatched config keys.

Enhancements:

  • Ensure FishAudio TTS requests explicitly include the configured model to align with API requirements.

Documentation:

  • Improve multilingual configuration hints and metadata for FishAudio TTS model selection in the dashboard.

@dosubot dosubot Bot added size:S This PR changes 10-29 lines, ignoring generated files. area:provider The bug / feature is about AI Provider, Models, LLM Agent, LLM Agent Runner. area:webui The bug / feature is about webui(dashboard) of astrbot. labels Jul 21, 2026

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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(),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

如果用户在 WebUI 中将 fishaudio-tts-model 留空,self.get_model() 将返回空字符串 ""。这会导致向 Fish Audio API 发送 "model": "" 的请求,从而引发 API 错误(例如 400 或 422 错误),因为空字符串不是有效的模型 ID。为了支持“留空则使用默认模型”的设计,建议在 self.get_model() 为空时,默认使用 Fish Audio 的标准默认模型 "stable-v1"

Suggested change
model=self.get_model(),
model=self.get_model() or "stable-v1",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:provider The bug / feature is about AI Provider, Models, LLM Agent, LLM Agent Runner. area:webui The bug / feature is about webui(dashboard) of astrbot. size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant