音频转文字 gpt-4o-transcribe
POST /v1/audio/transcriptions
说明
概览
| Method | POST |
|---|---|
| Path | /v1/audio/transcriptions |
| Type | http |
| Status | 1 |
| Module | 2102810 |
| Folder | 45008043 |
参数
{ "header": [ { "required": false, "description": "", "type": "string", "id": "ifSfytDdTe", "enable": true, "name": "Content-Type", "sampleValue": "multipart/form-data" } ] }
请求体
{ "type": "multipart/form-data", "parameters": [ { "required": true, "description": "要转录的音频文件对象(不是文件名),格式为:flac、mp3、mp4、mpeg、mpga、m4a、ogg、wav 或 webm。\n\n", "type": "file", "id": "Q3chqzEhHB", "enable": true, "name": "file", "sampleValue": "file://C:\\Users\\Administrator\\Desktop\\test.m4a" }, { "required": true, "description": "要使用的模型 ID。目前只有 whisper-1,gpt-4o-mini-transcribe 是可用的。\n\n", "type": "string", "id": "N15KW2DjQL", "enable": true, "name": "model", "sampleValue": "gpt-4o-transcribe" }, { "required": false, "description": "输入音频的语言。以 ISO-639-1 格式提供输入语言可以提高准确性和延迟。\n\n", "type": "string", "id": "9YPyW01WRR", "enable": false, "name": "language", "sampleValue": "" }, { "required": false, "description": "一个可选的文本来指导模型的风格或继续之前的音频段落。提示应该与音频语言匹配。\n\n", "type": "string", "id": "DD5Jdc8l1D", "enable": false, "name": "prompt", "sampleValue": "" }, { "required": false, "description": "默认为 json\n转录输出的格式,可选择:json、text", "type": "string", "id": "cGqTgRZuvj", "enable": true, "name": "response_format", "sampleValue": "json" }, { "required": false, "description": "默认为 0,采样温度,between 0 和 1。更高的值像 0.8 会使输出更随机,而更低的值像 0.2 会使其更集中和确定性。如果设置为 0,模型将使用对数概率自动增加温度直到达到特定阈值。", "type": "number", "id": "pP9BAwD6CK", "enable": false, "name": "temperature", "sampleValue": "" } ], "required": false, "mediaType": "", "examples": [], "oasExtensions": "" }
响应
[ { "id": 562497979, "name": "成功", "code": 200, "contentType": "json", "jsonSchema": { "type": "object", "properties": { "text": { "type": "string" } }, "required": [ "text" ], "x-apifox-orders": [ "text" ] }, "itemSchema": {}, "description": "", "mediaType": "", "headers": [], "oasExtensions": "" } ]
响应示例
[ { "name": "成功示例", "responseId": 562497979, "data": "{\r\n \"text\": \"Imagine the wildest idea that you've ever had, and you're curious about how it might scale to something that's a 100, a 1,000 times bigger. This is a place where you can get to do that.\"\r\n}", "description": "", "oasKey": "", "oasExtensions": "", "id": 440608985 }, { "name": "成功示例", "responseId": 562497979, "data": "{\"text\":\"一二三四五六七八九十\"}", "description": "", "oasKey": "", "oasExtensions": "", "id": 650387999 } ]