创建转录(whisper
接口:POST /v1/audio/transcriptions 归属:音频接口/OpenAI(TTS\Wishper 调用地址:Base URL https://api.allyang.cn(OpenAI 兼容前缀 https://api.allyang.cn/v1)+ 上述路径 鉴权:请求头 Authorization: Bearer <你的令牌>;令牌在控制台「令牌管理」创建 说明:下方为本接口契约。路径、字段名与枚举取值与线上接口一致;叙述文字已按本平台口径重写。价格、并发与限流等数值以控制台及实际返回为准,未确认处标注「待补」。
OpenAPI Specification
yaml
openapi: 3.0.1
info:
title: ''
description: ''
version: 1.0.0
paths:
/v1/audio/transcriptions:
post:
summary: 创建转录(whisper
description: ''
tags:
- 音频接口/OpenAI(TTS\Wishper
parameters:
- name: Authorization
in: header
description: ''
required: false
example: Bearer {{YOUR_API_KEY}}
schema:
type: string
default: Bearer {{YOUR_API_KEY}}
requestBody:
content:
multipart/form-data:
schema:
type: object
properties:
file:
description: "待转录的音频文件对象(传文件本身,不是文件名),格式为 flac、mp3、mp4、mpeg、mpga、m4a、ogg、wav 或 webm。"
example: ''
type: string
format: binary
model:
description: "所要使用的模型 ID,当前仅 whisper-1 可用。"
example: ''
type: string
language:
description: "输入音频的语言。按 ISO-639-1 格式传入可提升准确率并降低延迟。"
example: ''
type: string
prompt:
description: "可选文本,用于引导模型风格或延续上一段音频;提示应与音频语言一致。"
example: ''
type: string
response_format:
description: "转录输出格式,默认 json,可选 json、text、srt、verbose_json 或 vtt。"
example: ''
type: string
temperature:
description: "采样温度,默认 0,取值 0 至 1。数值越高(如 0.8)输出越随机,越低(如 0.2)越集中、越确定;设为 0 时模型会依据对数概率自动升温,直至达到既定阈值。"
example: 0
type: number
required:
- file
- model
examples: {}
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties:
text:
type: string
required:
- text
headers: {}
security: []
components:
schemas: {}
securitySchemes: {}
servers: []
security: []