Ae · Whisper
22.58积分/次
ae_whisper
将音频文件转写为文本,可选择翻译为英语、添加时间戳和识别说话人。
22.58积分/次
价格说明
22.58积分/次
API 调用
通过统一工具网关发起同步请求,鉴权和计费由 AgentEarth 处理。
cURL
curl --request POST \
--url 'https://api.agentearth.ai/v1/tools/run' \
--header 'Authorization: Bearer $AGENTEARTH_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"tool": "ae_whisper",
"input": {
"task": "transcribe",
"prompt": "xxx",
"diarize": "false",
"language": "xxx",
"audio_url": "xxx",
"batch_size": "64",
"chunk_level": "segment",
"num_speakers": "xxx"
}
}'- 请求方式
- POST
- 接口地址
- /v1/tools/run
- 鉴权方式
- Bearer Token
- 超时时间
- 60 秒
- 当前版本
- —
响应示例
{
"error_no": 0,
"error_msg": "",
"result": [
{
"type": "text",
"text": "xxx"
}
],
"platform_annotations": {
"source": "AgentEarth",
"platform_note": "xxx",
"platform_suggestion": "xxx"
}
}工具参数
未传入的可选参数将使用平台默认值。
| 参数 | 类型 | 必填 | 说明 | 默认值 |
|---|---|---|---|---|
task | enum (transcribe | translate) | 否 | Task to perform on the audio file. Either transcribe or translate. | transcribe |
prompt | string | 否 | Prompt to use for generation. Defaults to an empty string. | — |
diarize | boolean | 否 | Whether to diarize the audio file. Defaults to false. Setting to true will add costs proportional to diarization inference time. | false |
language | string | 否 | Language of the audio file. If set to null, the language will be automatically detected. Defaults to null. If translate is selected as the task, the audio will be translated to English, regardless of the language selected. | — |
audio_url | string | 是 | URL of the audio file to transcribe. Supported formats: mp3, mp4, mpeg, mpga, m4a, wav or webm. | — |
batch_size | integer | 否 | 暂无参数说明。 | 64 |
chunk_level | enum (none | segment | word) | 否 | Level of the chunks to return. Either none, segment or word. `none` would imply that all of the audio will be transcribed without the timestamp tokens, we suggest to switch to `none` if you are not satisfied with the transcription quality, since it will usually improve the quality of the results. Switching to `none` will also provide minor speed ups in the transcription due to less amount of generated tokens. Notice that setting to none will produce **a single chunk with the whole transcription**. | segment |
num_speakers | integer | 否 | Number of speakers in the audio file. Defaults to null. If not provided, the number of speakers will be automatically detected. | — |
