开发者资源

文档中心

产品指南、接入说明与 API 参考

文档中心语音识别
语音识别

识别历史

SenseTime TokenPlan 当前模型与接入说明

识别历史

查询当前账号的语音识别记录。

请求地址

GET https://token.sensetime.com/api/v1/audio/records

授权

请求必须携带 API Key:

Authorization: Bearer <API_KEY>

下面的示例使用环境变量 TOKENPLAN_API_KEY。

查询参数

pageinteger

页码。

page_sizeinteger

每页条数。

session_idstring

按会话 ID 过滤。

api_keystring

按 API Key 过滤。

请求示例

curl -sS \
  "https://token.sensetime.com/api/v1/audio/records?page=1&page_size=20" \
  -H "Authorization: Bearer $TOKENPLAN_API_KEY"

响应

成功时 HTTP 状态码为 200,Content-Type 为 application/json。

totalinteger

记录总数。

listobject[]

当前页记录。

Show child attributesHide child attributes
audiostring

录音地址。

statusstring

记录状态,例如 completed。

session_idstring

会话 ID。

session_startinteger

会话开始时间,Unix 时间戳(秒)。

api_keystring

发起该次识别的 API Key。

pointsnumber

消耗积分。

langstring

语言,例如 zh。

textobject[]

识别文本。

Show child attributesHide child attributes
textstring

文本。

startnumber

开始时间。

endnumber

结束时间。

{
  "total": 2,
  "list": [
    {
      "audio": "https://example.com/record.pcm",
      "status": "completed",
      "session_id": "...",
      "session_start": 1794970947,
      "api_key": "...",
      "points": 16.8,
      "lang": "zh",
      "text": [{ "text": "...", "start": 0, "end": 0 }]
    }
  ]
}

错误处理

失败时响应体为 { "code", "message" }。

codeHTTP含义
invalid400参数不合法
authentication_error401API Key 无效或缺失
forbidden403无权限
too_many_requests429限流或额度不足
internal500服务内部错误

相关指南