refactor: MiMo TTS 使用 trace.FromContext 支持追踪

This commit is contained in:
hhs
2026-06-21 22:08:00 +08:00
parent 9c763ec12a
commit d6e9555a97

View File

@@ -11,6 +11,7 @@ import (
"strings"
"time"
"github.com/hhs/camtalk/internal/trace"
"github.com/hhs/camtalk/internal/util"
"go.uber.org/zap"
)
@@ -109,7 +110,8 @@ func (m *MiMoService) SynthesizeStream(ctx context.Context, textStream <-chan st
audio, err := m.synthesize(ctx, text, voice)
if err != nil {
m.logger.Warnw("mimo tts: synthesize failed",
log := trace.FromContext(ctx)
log.Warnw("mimo tts: synthesize failed",
"error", err,
"text_len", len(text),
"text_preview", util.Truncate(text, 100))