Skip to content

Commit 96e2a47

Browse files
authored
Merge pull request #45 from Captain-1314/main
更新Notify协议
2 parents be892d9 + cdf0ea4 commit 96e2a47

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

docs/xrobot/platform/websocket.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,28 @@ WebSocket 支持 **🎵 音频数据帧**(二进制方式)以及 **文本帧
402402
```
403403

404404
##### 5. Notify 消息
405+
设备需要在 hello 消息的 features 字段中声明对 notify 事件的支持:
406+
```json
407+
{
408+
"type": "hello",
409+
"version": 1,
410+
"features": {
411+
"mcp": true,
412+
"notify": {
413+
"config_updated": true
414+
}
415+
},
416+
"transport": "websocket",
417+
"audio_params": {
418+
"format": "opus",
419+
"sample_rate": 16000,
420+
"channels": 1,
421+
"frame_duration": 60,
422+
"play_buffer_duration": 1000
423+
}
424+
}
425+
```
426+
然后智能体配置更新后,服务端会向设备端发送配置更新的通知
405427
```json
406428
{
407429
"type": "notify",

0 commit comments

Comments
 (0)