feat(voice): 提升桌面端语音交互与本地任务执行支持

This commit is contained in:
Blizzard
2026-07-24 16:40:25 +08:00
parent e9a8b9b4c6
commit aba88193d8
33 changed files with 1909 additions and 102 deletions
@@ -35,6 +35,10 @@ type ServerMsg struct {
TaskID string `json:"task_id,omitempty"`
// error:出错文案
Msg string `json:"msg,omitempty"`
// actionJARVIS 让客户端执行的界面动作(P2 动作通道,见 JARVIS_BRAIN_DESIGN.md §2.2)。
// 目前仅 navigateAction="navigate" + View+可选 TaskID 聚焦某任务)。客户端按白名单执行。
Action string `json:"action,omitempty"`
View string `json:"view,omitempty"`
}
// 服务端消息类型。
@@ -46,6 +50,8 @@ const (
ServerSpeaking = "speaking" // Agent 开始出声(首段 TTS 音频将至)
ServerTTSEnd = "tts_end" // 本轮 TTS 播放完毕
ServerError = "error" // 出错
ServerAction = "action" // 界面动作指令(navigate 等,客户端白名单执行)
ServerAnnounce = "announce" // 主动播报(text 显示到对话流;随后照常走 speaking/音频/tts_end
)
// 音频格式(与火山 ASR/TTS 约定,客户端按此采集/播放)。