sample.wav。以下示例在 Bash、zsh 等终端运行;Windows 可使用 WSL 或 Git Bash。YOUR_API_KEY 换成自己的 Key,将 sample.wav 换成实际文件路径。--form 上传文件,cURL 会自动生成正确的 multipart/form-data 请求头及 boundary,无需手动填写 Content-Type。{
"language": "en",
"confidence_score": 0.98,
"text": "Hello.",
"words": [
{
"text": "Hello.",
"start_time": 0.0,
"end_time": 0.5,
"confidence_score": 0.98,
"token_type": "word"
}
]
}text;需要逐词信息时再处理 words。响应字段可能随模型与选项变化,详细说明见创建文件转录。model_id=echo_v2_medical| 现象 | 先检查什么 |
|---|---|
| HTTP 401 | Key 是否有效,是否放在 API-Key 请求头中 |
missing_input | 是否真正上传了文件;本地路径是否存在 |
invalid model_id | 模型 ID 的拼写与所用接口是否匹配 |
HTTP 200,但 text 为空 | 音频是否包含可识别的语音,是否主要为静音 |