fix: 修复 TTS JSON 请求格式,兼容 Windows daemon
Some checks failed
Release / build (push) Failing after 23s

This commit is contained in:
2026-04-26 03:54:29 +08:00
parent 94328d4f28
commit 724981b50a
2 changed files with 9 additions and 2 deletions

View File

@@ -2,6 +2,13 @@
## 版本记录
### v0.2.1
- 修复 TTS JSON 请求格式,兼容 Windows daemon
- 发送格式改为 `{"text": "内容"}`
---
### v0.2.0
- 新增 TTS 语音朗读功能

View File

@@ -437,8 +437,8 @@ tts:
#### 实现要点
1. TCP 连接:使用 Go 标准库 `net` 包
2. JSON 序列化:发送请求格式 `{text, voice, format}`
3. 异步播放:使用 `go func()` 异步调用 afplay
2. JSON 请求:发送格式 `{"text": "内容"}`
3. 异步朗读:使用 `go func()` 异步调用
4. 静默失败:网络异常只记录警告日志,不阻塞用户
#### 踩坑记录