From 34d498510ed29211b07848942adc6b8ffa1170d6 Mon Sep 17 00:00:00 2001 From: hhs <386998068@qq.com> Date: Sun, 21 Jun 2026 22:04:50 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20STT=20=E6=95=8F=E6=84=9F=E6=96=87?= =?UTF-8?q?=E6=9C=AC=E9=99=8D=E7=BA=A7=E4=B8=BA=20Debug=20=E5=B9=B6?= =?UTF-8?q?=E6=88=AA=E6=96=AD=E4=BF=9D=E6=8A=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/internal/eino/nodes_stt.go | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/backend/internal/eino/nodes_stt.go b/backend/internal/eino/nodes_stt.go index 0f63a05..ca915da 100644 --- a/backend/internal/eino/nodes_stt.go +++ b/backend/internal/eino/nodes_stt.go @@ -10,6 +10,7 @@ import ( "github.com/hhs/camtalk/internal/ai/stt" "github.com/hhs/camtalk/internal/logger" "github.com/hhs/camtalk/internal/models" + "github.com/hhs/camtalk/internal/util" ) // NewSTTLambda 创建 STT Lambda 节点。 @@ -39,8 +40,10 @@ func NewSTTLambda(sttService stt.Service) *compose.Lambda { // 文本输入模式:跳过 STT if input.Text != "" { - log.Infow("使用文本输入,跳过 STT", - "request_id", requestID, "text", input.Text) + log.Debugw("text input mode, skipping stt", + "request_id", requestID, + "text_len", len(input.Text), + "text_preview", util.Truncate(input.Text, 50)) // 发送 stt_result 保持前端消息流一致性 if sender != nil { @@ -101,7 +104,10 @@ func NewSTTLambda(sttService stt.Service) *compose.Lambda { text = "(未识别到语音)" } - log.Infow("语音识别完成", "request_id", requestID, "text", text) + log.Debugw("stt recognition completed", + "request_id", requestID, + "text_len", len(text), + "text_preview", util.Truncate(text, 50)) // 发送 stt_result if sender != nil {