查询语音下发内存队列
since 4.0.19
GET /v1/stream/voice/queue
只读内存调度快照。与 查询语音下发任务 分工:/task 读 库表历史;/queue 读 内存队(executing / pending)。
- 鉴权:先
POST /login,头X-Auth-Token。当前无独立语音权限,与POST /v1/stream/voice/upload一样只要求已登录。 - 只读;轮询建议 ≥ 200ms;快照 best-effort。
pendingItems为堆的拷贝后再按(priority DESC, reqTm ASC)排序,不破坏原堆。- 列表最多 200 条,超出只返回队头并设
truncated: true。
功能未启用(无 voice 配置)时接口不可用。
请求
GET https://wx.gratour.info:7200/v1/stream/voice/queue
Content-Type: application/json
X-Auth-Token: HrWwReOAQ9WdLnJQ1JYivA
无请求参数。
应答
{
"errCode": 0,
"data": [{
"maxConcurrentVoice": 10,
"executing": 1,
"pending": 2,
"truncated": false,
"executingItems": [
{ "taskId": "...", "simNo": "...", "priority": 0, "voice": "01265242-cc33-4c90-9b27-af7de0be079a", "tm": 1775450843525, "reqTm": 1775450843601 }
],
"pendingItems": []
}]
}
应答实体属性
| 属性 | 类型 | 说明 |
|---|---|---|
| maxConcurrentVoice | int | 最大并发下发数 |
| executing | int | 执行中任务数 |
| pending | int | 排队任务数 |
| truncated | boolean | 列表被 200 条上限截断 |
| executingItems | array | 执行中 |
| pendingItems | array | 排队(已排序) |
元素字段:taskId、simNo、priority、voice(string,音频编号)、tm、reqTm(tm / reqTm 为 epoch millis)。