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 {