> For the complete documentation index, see [llms.txt](https://docs.ggwp.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ggwp.com/chinese-simplified/api-wen-dang-yu-yin/biao-zhun-tao-can/yu-yin-zhuang-tai-api.md).

# 语音状态 API

\[ 基础 URL: `api.ggwp.com`]

`POST` /voice/v1/status

## **描述**

Voice Status 端点接收一个列表，其中包括 **音频 ID** 通过 Voice Ingestion 端点传入，并返回每个对应音频文件的当前状态。有效状态包括：

* **新建**：音频文件已成功接收，但尚未处理
* **已完成**：音频文件已完成处理，任何检测到的事件都可通过 GGWP Dashboard 和 webhook 事件查看
* **失败：** 音频文件在多次重试后仍处理失败

通过 Voice Ingestion 提交的文件通常会在 1-2 分钟内完成处理，具体取决于流量大小，然后会自动通过 GGWP 平台的处理流水线进行路由。此过程会影响玩家声誉，使事件可通过仪表板和 webhook 事件查看，并触发任何适用的自动审核规则。此端点也可用于可选地跟踪每个文件在流水线中的进度。

## **参数**

POST 请求需要以下参数：

* **data：** 与一个有效列表对应的 JSON 字符串 **音频 ID** 用于查询状态
* **请求头**
  * **x-api-key：** 与你的组织和仪表板对应的 GGWP API 密钥。

## **示例调用**

**Bash**

```bash
curl --location --request POST 'https://api.ggwp.com/voice/v1/status' \
--header 'Content-Type: application/json' \
--header 'x-api-key: api_key' \
--data-raw '[
    "example_id1",
    "example_id2",
    "example_id3"
]'
```

**Python**

```python
import json
import requests

# 使用 API 密钥准备请求头
headers = {
    "Content-Type": "application/json",
    "x-api-key": "GGWP_API_KEY"
}

# 使用有效的 audio_ids 准备 JSON 数据
data = ["example_id1", "example_id2", "example_id3"]

# 发送 POST 请求
response = requests.post(
    'https://api.ggwp.com/voice/v1/status',
    headers=headers,
    data=json.dumps(data)
)

# 检查响应
print(response.json())
```

## **输出**

* 200 响应 - 操作成功

  ```bash
  {
      "status": {
          "example_id1": "新建",
          "example_id2": "已完成",
          "example_id3": "失败"
      }
  }
  ```
* 400
  * 无效的输入参数
* 403
  * 无效或缺失的 API 密钥
* 500
  * 服务器端错误响应
