feat: MiMo TTS 错误日志截断敏感文本
This commit is contained in:
@@ -11,6 +11,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/hhs/camtalk/internal/util"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -108,7 +109,10 @@ func (m *MiMoService) SynthesizeStream(ctx context.Context, textStream <-chan st
|
|||||||
|
|
||||||
audio, err := m.synthesize(ctx, text, voice)
|
audio, err := m.synthesize(ctx, text, voice)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
m.logger.Warnw("mimo tts: synthesize failed", "error", err, "text", text)
|
m.logger.Warnw("mimo tts: synthesize failed",
|
||||||
|
"error", err,
|
||||||
|
"text_len", len(text),
|
||||||
|
"text_preview", util.Truncate(text, 100))
|
||||||
// 静默跳过,不中断整个流
|
// 静默跳过,不中断整个流
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user