From a84dc599d692fd3faf145152b517e29166886bdf Mon Sep 17 00:00:00 2001 From: Soulter <905617992@qq.com> Date: Sun, 9 Feb 2025 22:14:10 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20/tts=20=E6=8C=87?= =?UTF-8?q?=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- astrbot/core/pipeline/result_decorate/stage.py | 3 +-- astrbot/core/star/context.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/astrbot/core/pipeline/result_decorate/stage.py b/astrbot/core/pipeline/result_decorate/stage.py index 3d4b2629b..31e284765 100644 --- a/astrbot/core/pipeline/result_decorate/stage.py +++ b/astrbot/core/pipeline/result_decorate/stage.py @@ -18,7 +18,6 @@ class ResultDecorateStage: self.reply_prefix = ctx.astrbot_config['platform_settings']['reply_prefix'] self.reply_with_mention = ctx.astrbot_config['platform_settings']['reply_with_mention'] self.reply_with_quote = ctx.astrbot_config['platform_settings']['reply_with_quote'] - self.use_tts = ctx.astrbot_config['provider_tts_settings']['enable'] self.t2i_word_threshold = ctx.astrbot_config['t2i_word_threshold'] try: self.t2i_word_threshold = int(self.t2i_word_threshold) @@ -68,7 +67,7 @@ class ResultDecorateStage: result.chain = new_chain # TTS - if self.use_tts and result.is_llm_result(): + if self.ctx.astrbot_config['provider_tts_settings']['enable'] and result.is_llm_result(): tts_provider = self.ctx.plugin_manager.context.provider_manager.curr_tts_provider_inst new_chain = [] for comp in result.chain: diff --git a/astrbot/core/star/context.py b/astrbot/core/star/context.py index 068cd1f75..18b5200fe 100644 --- a/astrbot/core/star/context.py +++ b/astrbot/core/star/context.py @@ -1,5 +1,5 @@ from asyncio import Queue -from typing import List, TypedDict, Union +from typing import List, Union from astrbot.core import sp from astrbot.core.provider.provider import Provider, TTSProvider, STTProvider