创建转录
/v1/audio/transcriptions将音频文件转录为文本,支持可选的语言检测。
认证
Authorization Bearer
在 Authorization 请求头中使用 API Key 作为 Bearer Token。
Request Body
modelstringrequiredModel ID.
languagestringInput audio language.
promptstringTranscription prompt.
response_formatstringResponse format.
temperaturenumberControls decoding randomness for transcription when supported. Lower values favor stable transcripts; higher values allow more alternatives.
timestamp_granularitiesarrayTimestamp granularity levels.
streambooleanStreaming response flag.
enable_itnbooleanConverts spoken or formatted entities into normalized written forms, such as numbers, dates, or times, when supported.
enable_puncbooleanRestores punctuation in the transcribed text when supported.
enable_channel_splitbooleanProcesses audio channels separately and returns channel-aware transcription results when supported.
enable_ddcbooleanDDC processing flag.
enable_speaker_infobooleanReturns speaker-related metadata or labels when supported.
corpusobjectCustom corpus configuration.
hotwordsstringHotword hints.
request_idstringClient request ID.
user_idstringEnd-user ID.
segment_durationnumberAudio segment duration.
audio_formatstringInput audio format.
codecstringInput audio codec.
rateintegerInput audio sample rate in Hz.
bitsintegerInput audio bit depth.
channelintegerNumber of input audio channels.
show_utterancesbooleanReturns utterance-level transcription details, usually including text and timing boundaries, when supported.
enable_nonstreambooleanNon-streaming recognition flag.
uidstringSpeech recognition user ID.
filestringAudio file.
file_urlstringAudio file URL.
audio_datastringInline audio data.
metadataobjectApplication metadata.
extra_bodyobjectAdditional request body fields.
provider_optionsobjectUpstream configuration.
提供
file或file_url。如果二者同时存在,将使用file_url。模型专属 ASR 字段请查看GET /v1/models/{model_id}.parameter_schema。
Response
textstring转录文本。
modelstring使用的模型 ID。
languagestring检测到的语言代码。verbose_json 格式返回。
durationnumber音频时长,单位秒。verbose_json 格式返回。
taskstring转录任务类型。verbose_json 格式返回。
segmentsobject[]带时间戳的片段。verbose_json 格式返回。
segments.idinteger片段 ID。
segments.startnumber片段开始时间,单位秒。
segments.endnumber片段结束时间,单位秒。
segments.textstring片段文本。
utterancesobject[]逐句详细信息。所选模型支持时返回。
utterances.startnumberUtterance start time in seconds.
utterances.endnumberUtterance end time in seconds.
utterances.textstringUtterance text.
utterances.speakerstringSpeaker label when returned.