2022-06-20 11:05:10 +08:00
|
|
|
|
## 消息格式
|
|
|
|
|
|
|
|
|
|
通讯地址: [`ws://127.0.0.1:10002`](ws://127.0.0.1:10002)
|
|
|
|
|
|
2023-06-17 00:14:12 +08:00
|
|
|
|
注:ue作为客户端
|
|
|
|
|
|
2022-06-20 11:05:10 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### 发送情绪值
|
|
|
|
|
|
2022-12-18 13:29:47 +08:00
|
|
|
|
```json
|
2022-06-20 11:05:10 +08:00
|
|
|
|
{
|
|
|
|
|
"Topic": "Unreal",
|
|
|
|
|
"Data": {
|
|
|
|
|
"Key": "mood",
|
|
|
|
|
"Value": 1.0
|
|
|
|
|
}
|
|
|
|
|
}
|
2022-12-18 13:29:47 +08:00
|
|
|
|
```
|
2022-06-20 11:05:10 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 参数 | 描述 | 类型 | 范围 |
|
|
|
|
|
| ---------- | ------ | ----- | ------- |
|
|
|
|
|
| Data.Value | 情绪值 | float | [-1, 1] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### 发送音频
|
|
|
|
|
|
2022-12-18 13:29:47 +08:00
|
|
|
|
```json
|
2022-06-20 11:05:10 +08:00
|
|
|
|
{
|
|
|
|
|
"Topic": "Unreal",
|
|
|
|
|
"Data": {
|
|
|
|
|
"Key": "audio",
|
2023-06-17 00:14:12 +08:00
|
|
|
|
"Value": "C:\samples\sample-1.wav",
|
|
|
|
|
"Lips":[{"Lip": "sil", "Time": 180}, {"Lip": "FF", "Time": 144}],
|
2022-06-20 11:05:10 +08:00
|
|
|
|
"Time": 10,
|
|
|
|
|
"Type": "interact"
|
|
|
|
|
}
|
|
|
|
|
}
|
2022-12-18 13:29:47 +08:00
|
|
|
|
```
|
2022-06-20 11:05:10 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 参数 | 描述 | 类型 | 范围 |
|
|
|
|
|
| ---------- | ---------------- | ----- | --------------- |
|
|
|
|
|
| Data.Value | 音频文件绝对路径 | str | |
|
|
|
|
|
| Data.Time | 音频时长 (秒) | float | |
|
|
|
|
|
| Data.Type | 发言类型 | str | interact/script |
|
2023-06-17 00:14:12 +08:00
|
|
|
|
| Data.Lips | 视音素 | array | |
|
2022-06-20 11:05:10 +08:00
|
|
|
|
|
2023-04-13 09:44:36 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### 发送回复文字
|
|
|
|
|
|
|
|
|
|
```json
|
|
|
|
|
{
|
|
|
|
|
"Topic": "Unreal",
|
|
|
|
|
"Data": {
|
|
|
|
|
"Key": "text",
|
|
|
|
|
"Value": "很高兴见到你"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 参数 | 描述 | 类型 | 范围 |
|
|
|
|
|
| ---------- | ---------------- | ----- | --------------- |
|
|
|
|
|
| Data.text | 文本 | str | |
|