modify: auth插件拆分,将token签发部分交给网关
This commit is contained in:
@@ -498,9 +498,14 @@ async def alarm_report(
|
||||
Result=AlarmReportResult(Code=0, Desc="Doubao 分析判定为 False,忽略告警")
|
||||
)
|
||||
|
||||
from .global_var import ip_sound_column_volume
|
||||
|
||||
# 2. ip 音柱 TTS 播放(可通过配置开关关闭),失败时仅记录日志,不影响主流程
|
||||
from .global_var import ip_sound_column_volume, ip_sound_column_tts
|
||||
|
||||
tts_text = ip_sound_column_tts.get(
|
||||
full_data.get("Summary", ""),
|
||||
f"告警: {full_data.get('Summary', '')}"
|
||||
)
|
||||
|
||||
tts_payload = {
|
||||
"command": "play_local_tts",
|
||||
"volume": ip_sound_column_volume,
|
||||
@@ -511,8 +516,9 @@ async def alarm_report(
|
||||
"tts_pitch": 50,
|
||||
"tts_speed": 50,
|
||||
"tts_voice_name": "xiaoyan",
|
||||
"tts_text": f"告警: {full_data.get('Summary', '')}",
|
||||
"tts_text": tts_text,
|
||||
}
|
||||
|
||||
tts_result = await ip_sound_column_tts_play(request.app.state.zenoh_session, tts_payload)
|
||||
if tts_result.get("result") != 0:
|
||||
logger.warning(f"[AlarmReport] ip_sound_column TTS 播放失败: {tts_result}")
|
||||
|
||||
Reference in New Issue
Block a user