From 0d31f169136d1574f859add97d097ab61a5db718 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=88=E5=87=8C?= <155465805+qiyueling2716@users.noreply.github.com> Date: Tue, 21 Jul 2026 21:39:10 +0800 Subject: [PATCH 1/5] fix --- astrbot/core/config/default.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/astrbot/core/config/default.py b/astrbot/core/config/default.py index 52e7036320..51f6707f91 100644 --- a/astrbot/core/config/default.py +++ b/astrbot/core/config/default.py @@ -1725,6 +1725,7 @@ "enable": False, "api_key": "", "api_base": "https://api.fish.audio/v1", + "fishaudio-tts-model": "", "fishaudio-tts-character": "可莉", "fishaudio-tts-reference-id": "", "timeout": "20", @@ -2678,6 +2679,11 @@ "type": "string", "hint": "fishaudio TTS 的参考模型ID(可选)。如果填入此字段,将直接使用模型ID而不通过角色名称查询。例如:626bb6d3f3364c9cbc3aa6a67300a664。更多模型请访问:https://fish.audio/zh-CN/discovery,进入模型详情界面后可复制模型ID", }, + "fishaudio-tts-model": { + "description": "TTS 模型", + "type": "string", + "hint": "FishAudio TTS 引擎模型 ID,如 s1、s2-pro。留空则使用 API 默认模型。详见 https://fish.audio", + }, "whisper_hint": { "description": "本地部署 Whisper 模型须知", "type": "string", From 0b598c2a319058e4aa78445a296180622cf9da6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=88=E5=87=8C?= <155465805+qiyueling2716@users.noreply.github.com> Date: Tue, 21 Jul 2026 21:40:07 +0800 Subject: [PATCH 2/5] fix --- astrbot/core/provider/sources/fishaudio_tts_api_source.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/astrbot/core/provider/sources/fishaudio_tts_api_source.py b/astrbot/core/provider/sources/fishaudio_tts_api_source.py index 35945b7b6f..f85d4fbb29 100644 --- a/astrbot/core/provider/sources/fishaudio_tts_api_source.py +++ b/astrbot/core/provider/sources/fishaudio_tts_api_source.py @@ -36,6 +36,8 @@ class ServeTTSRequest(BaseModel): normalize: bool = True # 平衡模式将延迟减少到300毫秒,但可能会降低稳定性 latency: Literal["normal", "balanced"] = "normal" + # TTS 模型,如 s1、s2-pro 等。FishAudio API 要求请求中携带该字段 + model: str = "" @register_provider_adapter( @@ -67,7 +69,7 @@ def __init__( self.headers = { "Authorization": f"Bearer {self.chosen_api_key}", } - self.set_model(provider_config.get("model", "")) + self.set_model(provider_config.get("fishaudio-tts-model", "")) async def _get_reference_id_by_character(self, character: str) -> str | None: """获取角色的reference_id @@ -139,6 +141,7 @@ async def _generate_request(self, text: str) -> ServeTTSRequest: text=text, format="wav", reference_id=reference_id, + model=self.get_model(), ) async def get_audio(self, text: str) -> str: From 7cbe65e7ba456438624e5ef62312c2e97c2f616f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=88=E5=87=8C?= <155465805+qiyueling2716@users.noreply.github.com> Date: Tue, 21 Jul 2026 21:41:35 +0800 Subject: [PATCH 3/5] fix en-us i18n --- .../src/i18n/locales/en-US/features/config-metadata.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dashboard/src/i18n/locales/en-US/features/config-metadata.json b/dashboard/src/i18n/locales/en-US/features/config-metadata.json index 979be4fed4..cbb10e9ab3 100644 --- a/dashboard/src/i18n/locales/en-US/features/config-metadata.json +++ b/dashboard/src/i18n/locales/en-US/features/config-metadata.json @@ -1662,6 +1662,10 @@ "description": "reference_id", "hint": "Fishaudio TTS reference model ID (optional). If set, the model ID is used directly instead of looking up by role name. Example: 626bb6d3f3364c9cbc3aa6a67300a664. More models: https://fish.audio/zh-CN/discovery; open a model detail page to copy the model ID." }, + "fishaudio-tts-model": { + "description": "TTS Model", + "hint": "FishAudio TTS engine model ID, e.g. s1, s2-pro. Leave empty to use the API default model. See https://fish.audio" + }, "whisper_hint": { "description": "Notes for local Whisper deployment", "hint": "Before enabling, install the openai-whisper library (NVIDIA users download ~2GB mainly for torch and cuda; CPU users download ~1GB), and install ffmpeg. Otherwise STT will not work." From e968b38141a1a354da15af8ea2ece10d52d8da62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=88=E5=87=8C?= <155465805+qiyueling2716@users.noreply.github.com> Date: Tue, 21 Jul 2026 21:42:58 +0800 Subject: [PATCH 4/5] fix ru i18n --- .../src/i18n/locales/ru-RU/features/config-metadata.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dashboard/src/i18n/locales/ru-RU/features/config-metadata.json b/dashboard/src/i18n/locales/ru-RU/features/config-metadata.json index be0731079a..1786707758 100644 --- a/dashboard/src/i18n/locales/ru-RU/features/config-metadata.json +++ b/dashboard/src/i18n/locales/ru-RU/features/config-metadata.json @@ -1659,6 +1659,10 @@ "description": "Coze API Key", "hint": "ID модели Fishaudio; используется вместо имени роли." }, + "fishaudio-tts-model": { + "description": "Модель TTS", + "hint": "ID модели движка FishAudio TTS, например s1, s2-pro. Оставьте пустым для модели по умолчанию. См. https://fish.audio" + }, "whisper_hint": { "description": "Заметки по локальному развертыванию Whisper", "hint": "Перед включением установите openai-whisper и ffmpeg." From 6e8574930d7284d3aad90cd460ec0598097c9689 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=88=E5=87=8C?= <155465805+qiyueling2716@users.noreply.github.com> Date: Tue, 21 Jul 2026 21:44:06 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E8=A1=A5=E5=85=85=E4=B8=AD=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/i18n/locales/zh-CN/features/config-metadata.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dashboard/src/i18n/locales/zh-CN/features/config-metadata.json b/dashboard/src/i18n/locales/zh-CN/features/config-metadata.json index 5036a51606..038eaa1df2 100644 --- a/dashboard/src/i18n/locales/zh-CN/features/config-metadata.json +++ b/dashboard/src/i18n/locales/zh-CN/features/config-metadata.json @@ -1664,6 +1664,10 @@ "description": "reference_id", "hint": "fishaudio TTS 的参考模型ID(可选)。如果填入此字段,将直接使用模型ID而不通过角色名称查询。例如:626bb6d3f3364c9cbc3aa6a67300a664。更多模型请访问:https://fish.audio/zh-CN/discovery,进入模型详情界面后可复制模型ID" }, + "fishaudio-tts-model": { + "description": "TTS 模型", + "hint": "FishAudio TTS 引擎模型 ID,如 s1、s2-pro。留空则使用 API 默认模型。详见 https://fish.audio" + }, "whisper_hint": { "description": "本地部署 Whisper 模型须知", "hint": "启用前请 pip 安装 openai-whisper 库(N卡用户大约下载 2GB,主要是 torch 和 cuda,CPU 用户大约下载 1 GB),并且安装 ffmpeg。否则将无法正常转文字。"