From 7228c4b13f4994dba8edbd3cd5a97b1f5ca94f87 Mon Sep 17 00:00:00 2001 From: Soulter <905617992@qq.com> Date: Mon, 27 Jan 2025 18:45:34 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20TTS=20=E9=83=A8?= =?UTF-8?q?=E5=88=86=E5=8F=98=E9=87=8F=E5=90=8D=E9=94=99=E8=AF=AF=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=E8=AF=B7=E6=B1=82=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- astrbot/core/config/default.py | 3 ++- astrbot/core/pipeline/result_decorate/stage.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/astrbot/core/config/default.py b/astrbot/core/config/default.py index 6a5820640..097099124 100644 --- a/astrbot/core/config/default.py +++ b/astrbot/core/config/default.py @@ -639,7 +639,8 @@ CONFIG_METADATA_2 = { "description": "机器人唤醒前缀", "type": "list", "items": {"type": "string"}, - "hint": "在不 @ 机器人的情况下,可以通过外加消息前缀来唤醒机器人。", + "obvious_hint": True, + "hint": "在不 @ 机器人的情况下,可以通过外加消息前缀来唤醒机器人。更改此配置将影响整个 Bot 的功能唤醒,包括所有指令。如果您不保留 `/`,则内置指令(help等)将需要通过您的唤醒前缀来触发。", }, "t2i": { "description": "文本转图像", diff --git a/astrbot/core/pipeline/result_decorate/stage.py b/astrbot/core/pipeline/result_decorate/stage.py index c2f856c32..ed173c7f3 100644 --- a/astrbot/core/pipeline/result_decorate/stage.py +++ b/astrbot/core/pipeline/result_decorate/stage.py @@ -68,8 +68,8 @@ class ResultDecorateStage: for comp in result.chain: if isinstance(comp, Plain) and len(comp.text) > 1: try: - logger.info("TTS 请求: " + plain_str) - audio_path = await tts_provider.get_audio(plain_str) + logger.info("TTS 请求: " + comp.text) + audio_path = await tts_provider.get_audio(comp.text) logger.info("TTS 结果: " + audio_path) if audio_path: new_chain.append(Record(file=audio_path, url=audio_path))