获取语音识别历史
curl --request GET \
--url https://api.senseaudio.cn/v1/audio/records \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.senseaudio.cn/v1/audio/records"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.senseaudio.cn/v1/audio/records', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.senseaudio.cn/v1/audio/records",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.senseaudio.cn/v1/audio/records"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.senseaudio.cn/v1/audio/records")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.senseaudio.cn/v1/audio/records")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"total": 1,
"list": [
{
"audio": "https://example.com/file/bcc1a46806d94bfef1a442f44e3cbe0a-record.pcm",
"session_id": "bcc1a46806d94bfef1a442f44e3cbe0a",
"session_start": 1772161815,
"session_end": 1772161917,
"api_key": "sk-123456",
"points": 485,
"text": "这是一个示例文本。"
}
]
}语音识别
语音识别历史
查询语音识别历史记录,支持按会话或 API Key 过滤
GET
/
v1
/
audio
/
records
获取语音识别历史
curl --request GET \
--url https://api.senseaudio.cn/v1/audio/records \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.senseaudio.cn/v1/audio/records"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.senseaudio.cn/v1/audio/records', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.senseaudio.cn/v1/audio/records",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.senseaudio.cn/v1/audio/records"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.senseaudio.cn/v1/audio/records")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.senseaudio.cn/v1/audio/records")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"total": 1,
"list": [
{
"audio": "https://example.com/file/bcc1a46806d94bfef1a442f44e3cbe0a-record.pcm",
"session_id": "bcc1a46806d94bfef1a442f44e3cbe0a",
"session_start": 1772161815,
"session_end": 1772161917,
"api_key": "sk-123456",
"points": 485,
"text": "这是一个示例文本。"
}
]
}说明
获取语音识别历史,支持按会话 ID 或 API Key 过滤。历史最长保存 7 天(按会话结束时间计)。- 接口地址:
https://api.senseaudio.cn/v1/audio/records - 鉴权方式:Bearer Token,详见 快速接入
Authorizations
string
必填
Bearer 鉴权头,格式为
Bearer SENSEAUDIO_API_KEY。Query parameters
integer
默认值:"1"
页数。
integer
默认值:"20"
分页大小。
string
按会话 ID 筛选。
string
按 API Key 筛选。
Response
200 — application/json
integer
调用记录总数。
object[]
相关指南
⌘I