{"record":{"id":"f770a2ceb7981686","repo":"chenhg5/cc-connect","slug":"tts-text-is-required","errorCode":null,"errorMessage":"tts text is required","messagePattern":"tts text is required","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/engine.go","lineNumber":11517,"sourceCode":"\t\t\tif err != nil {\n\t\t\t\treturn \"\", fmt.Errorf(\"resolve current directory: %w\", err)\n\t\t\t}\n\t\t}\n\t\tdir = filepath.Join(base, dir)\n\t}\n\tabs, err := filepath.Abs(filepath.Clean(dir))\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\treturn abs, nil\n}\n\n// SendTTSToSession synthesizes and sends a voice message to an active session.\n// It is used by the local API/CLI so agents can call `cc-connect send --tts`.\nfunc (e *Engine) SendTTSToSession(sessionKey, text string) error {\n\ttext = strings.TrimSpace(text)\n\tif text == \"\" {\n\t\treturn fmt.Errorf(\"tts text is required\")\n\t}\n\t_, p, replyCtx, err := e.resolveOutboundSessionTarget(sessionKey, false)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn e.synthesizeAndSendTTS(p, replyCtx, text)\n}\n\n// SendAudiosToSession routes outbound audio attachments to the\n// platform's AudioSender (native voice bubble + transcoding) when\n// supported, falling back to FileSender otherwise. Used by\n// `cc-connect send --audio`. Mirrors SendToSessionWithAttachments for\n// audio-typed clips so they don't get dispatched as generic files.\nfunc (e *Engine) SendAudiosToSession(sessionKey string, audios []FileAttachment) error {\n\tif len(audios) == 0 {\n\t\treturn nil\n\t}\n\t_, p, replyCtx, err := e.resolveOutboundSessionTarget(sessionKey, true)","sourceCodeStart":11499,"sourceCodeEnd":11535,"githubUrl":"https://github.com/chenhg5/cc-connect/blob/4000b2338aa6e850c99df54f8b0ed6ed7460b401/core/engine.go#L11499-L11535","documentation":"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.","triggerScenarios":"Thrown at core/engine.go:11517 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass non-empty text with cc-connect send --tts"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4000b2338aa6e850c99df54f8b0ed6ed7460b401","analyzedAt":"2026-09-06T11:45:09.575Z","contentChangedAt":"2026-09-06T11:45:09.575Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}