语音转录ASR

语音转录

没有原生字幕时,提交视频或音频链接,返回带时间戳的文本。

接入流程

提交任务

POST /api/transcribe/submit

查询结果

GET /api/transcribe/{job_id}

更多接口,查看接口文档 →

典型用法

提交转录

POST /api/transcribe/submit — 平台链接或音频 URL,返回 job_id。

查询任务

GET /api/transcribe/{job_id} — 轮询状态、进度与分段文本。

复制就能跑

把 YOUR_API_KEY 换成控制台密钥。先 POST /api/transcribe/submit 提交任务,再用返回的 job_id 调 GET /api/transcribe/{job_id} 轮询结果。

import requests

API_BASE = "https://www.dataspider.ai/api"
HEADERS = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json",
}

job = requests.post(
    f"{API_BASE}/transcribe/submit",
    headers=HEADERS,
    json={
        "source": {"type": "platform_url", "url": "https://www.youtube.com/watch?v=sample-keynote"},
        "engine": "paraformer",
        "language": "",
        "enable_speaker": False,
    },
).json()["data"]
print(job)

result = requests.get(f"{API_BASE}/transcribe/{job['job_id']}", headers=HEADERS)
print(result.json())

JSON 响应

response.json
{
  "code": 200,
  "message": "ok",
  "success": true,
  "data": {
    "job_id": "tr_01",
    "status": "completed",
    "step": "bill",
    "progress": 100,
    "engine": "paraformer",
    "source_type": "platform_url",
    "duration_seconds": 3,
    "text": "欢迎使用 DataMiner。",
    "segments": [
      {
        "id": 0,
        "start": 0,
        "end": 2.8,
        "text": "欢迎使用 DataMiner。",
        "speaker": null,
        "words": []
      }
    ],
    "error": null
  }
}

返回内容

输入

  • 视频或音频 URL
  • YouTube / TikTok / 抖音链接
  • 分享文案中的链接
  • 可选指定语言

输出

  • 全文与分段
  • 起止时间
  • 任务状态查询
  • 可再转成 SRT / VTT

浏览其他平台

准备好接入了?

注册后创建 API Key,在在线试用里粘贴链接验证,再接到你的服务。