chenhg5/cc-connect · error
tts text is required
Error message
tts text is required
What it means
Validation failure in Engine.SendTTSToSession: after TrimSpace the tts text argument is empty, so there is nothing to synthesize; the local API/CLI `cc-connect send --tts` call was invoked without a text payload.
Source
Thrown at core/engine.go:11517
if err != nil {
return "", fmt.Errorf("resolve current directory: %w", err)
}
}
dir = filepath.Join(base, dir)
}
abs, err := filepath.Abs(filepath.Clean(dir))
if err != nil {
return "", err
}
return abs, nil
}
// SendTTSToSession synthesizes and sends a voice message to an active session.
// It is used by the local API/CLI so agents can call `cc-connect send --tts`.
func (e *Engine) SendTTSToSession(sessionKey, text string) error {
text = strings.TrimSpace(text)
if text == "" {
return fmt.Errorf("tts text is required")
}
_, p, replyCtx, err := e.resolveOutboundSessionTarget(sessionKey, false)
if err != nil {
return err
}
return e.synthesizeAndSendTTS(p, replyCtx, text)
}
// SendAudiosToSession routes outbound audio attachments to the
// platform's AudioSender (native voice bubble + transcoding) when
// supported, falling back to FileSender otherwise. Used by
// `cc-connect send --audio`. Mirrors SendToSessionWithAttachments for
// audio-typed clips so they don't get dispatched as generic files.
func (e *Engine) SendAudiosToSession(sessionKey string, audios []FileAttachment) error {
if len(audios) == 0 {
return nil
}
_, p, replyCtx, err := e.resolveOutboundSessionTarget(sessionKey, true)View on GitHub (pinned to 4000b2338a)
Solutions
- Pass non-empty text with cc-connect send --tts
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at core/engine.go:11517 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of chenhg5/cc-connect@4000b2338a (2026-09-06).
Data as JSON: /api/errors/f770a2ceb7981686.
Report an issue: GitHub.