taskstring
Task to perform on the audio file. Either transcribe or translate.
默认值:"transcribe"
可选值:"transcribe", "translate"
openai/wizperWizper is a fast Whisper v3 speech-to-text model. It transcribes audio or video in about 100 languages, or translates the speech into English, with segment-level timestamps.
试用该模型
选择一个示例,将其输入和结果加载到 playground 中。
{
"audio": "https://static.sandbase.ai/examples/9a8dcd55-ad4d-4ef6-b8a6-fb977acc926e/input/a854cae2-ac54-4df5-bb68-324477ae2ae5.wav",
"language": "zh",
"task": "transcribe"
}{
"audio": "https://static.sandbase.ai/examples/40ec8cdb-5101-447c-a497-a286c422f64d/input/75c69de4-174d-466d-86c7-014c95296f66.wav",
"language": "ja",
"task": "translate"
}{
"audio": "https://static.sandbase.ai/examples/8c465b2c-cf15-4c9b-b911-2a875bd1346d/input/25f58df2-490d-4b75-b9f3-213059c90d7f.wav",
"language": "zh",
"task": "translate"
}{
"audio": "https://static.sandbase.ai/examples/151f34c3-8e84-4ac3-8559-af3ee7545417/input/64a43f4b-e952-4693-a56b-5bf3ab327b99.wav",
"language": "ko",
"task": "transcribe"
}{
"audio": "https://static.sandbase.ai/examples/fafffff4-3159-416f-a20e-3b825b6a9080/input/e762427e-ff57-4677-a3b3-5cc87ce98cf4.wav",
"language": "ja",
"task": "translate"
}Wizper is a fast Whisper v3 speech-to-text model: transcribe audio in about 100 languages, or translate it to English.
| Field | Type | Default | Notes |
|---|---|---|---|
audio | audio URL | — | Audio or video URL to transcribe. |
task | transcribe / translate | transcribe | transcribe keeps the source language; translate outputs English. |
chunk_level | string | segment | Timestamp granularity. |
max_segment_len | integer 10–29 | 29 | Maximum segment length in seconds. |
language | afamarasazbabebgbnbobrbscacscydadeeleneseteufafifofrglguhahawhehihrhthuhyidisitjajwkakkkmknkolalblnloltlvmgmimkmlmnmrmsmtmynenlnnnoocpaplpsptrorusasdsiskslsnsosqsrsusvswtatetgthtktltrttukuruzviyiyozh | en | Source language code. |
version | string | 3 | Version of the model to use. |
merge_chunks | boolean | true | Merge short segments. |
$0.006 per request, whatever the audio length.
| Request | Price |
|---|---|
| One file | $0.006 |
Failed runs are not charged.
开始构建
通过 SandBase Unified Run API 提交此模型。
# The quoted heredoc keeps Unicode and shell metacharacters unchanged.
result=$(curl --fail-with-body --silent \
-X POST "https://api.sandbase.ai/v1/run" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'SANDBASE_JSON'
{
"model": "openai/wizper",
"task": "transcribe",
"audio": "https://static.sandbase.ai/examples/elevenlabs/scribe-v2/input_audio_0.mp3",
"version": "3",
"language": "en",
"chunk_level": "segment",
"merge_chunks": true,
"max_segment_len": 29
}
SANDBASE_JSON
)
run_id=$(printf '%s' "$result" | jq -r .id)
for attempt in $(seq 1 120); do
status=$(printf '%s' "$result" | jq -r .status)
case "$status" in completed|failed|timeout) break ;; esac
sleep 2
result=$(curl --fail-with-body --silent \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
"https://api.sandbase.ai/v1/run/$run_id")
done
status=$(printf '%s' "$result" | jq -r .status)
[ "$status" = completed ] || { echo "Generation ended: $status" >&2; exit 1; }
printf '%s\n' "$result"创建一个 SandBase API 密钥,并将其设置到服务器环境中。所有请求都使用 Bearer 身份验证。
export SANDBASE_API_KEY="YOUR_API_KEY"请将密钥保存在服务器端。不要在浏览器代码中暴露它,也不要提交到仓库。
使用此模型 ID 及其输入向 /v1/run 发送 POST 请求。上方的请求示例包含提交和轮询。
使用返回的运行 ID 轮询,直到状态为 completed、failed 或 timeout。仅在 completed 后读取输出。
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"在模型的 image、video 或 audio 字段中传入一个可公开访问的文件 URL。支持的格式和限制显示在每个 Playground 输入项旁边。
在 Playground 中支持的图片字段上使用上传或替换控件。视频 URL 字段接受托管的 driving video;这并不表示支持视频上传。
taskstringTask to perform on the audio file. Either transcribe or translate.
默认值:"transcribe"
可选值:"transcribe", "translate"
audiostringURL of the audio file to transcribe. Supported formats: mp3, mp4, mpeg, mpga, m4a, wav or webm.
versionstringVersion of the model to use. All of the models are the Whisper large variant.
默认值:"3"
languagestringLanguage of the audio file. If translate is selected as the task, the audio will be translated to English, regardless of the language selected. If `None` is passed, the language will be automatically detected. This will also increase the inference time.
默认值:"en"
可选值:"af", "am", "ar", "as", "az", "ba", "be", "bg", "bn", "bo", "br", "bs", "ca", "cs", "cy", "da", "de", "el", "en", "es", "et", "eu", "fa", "fi", "fo", "fr", "gl", "gu", "ha", "haw", "he", "hi", "hr", "ht", "hu", "hy", "id", "is", "it", "ja", "jw", "ka", "kk", "km", "kn", "ko", "la", "lb", "ln", "lo", "lt", "lv", "mg", "mi", "mk", "ml", "mn", "mr", "ms", "mt", "my", "ne", "nl", "nn", "no", "oc", "pa", "pl", "ps", "pt", "ro", "ru", "sa", "sd", "si", "sk", "sl", "sn", "so", "sq", "sr", "su", "sv", "sw", "ta", "te", "tg", "th", "tk", "tl", "tr", "tt", "uk", "ur", "uz", "vi", "yi", "yo", "zh"
chunk_levelstringLevel of the chunks to return.
默认值:"segment"
merge_chunksbooleanWhether to merge consecutive chunks. When enabled, chunks are merged if their combined duration does not exceed max_segment_len.
默认值:true
max_segment_lenintegerMaximum speech segment duration in seconds before splitting.
默认值:29
最小值:10
最大值:29
{
"model": "openai/wizper",
"task": "transcribe",
"audio": "https://static.sandbase.ai/examples/elevenlabs/scribe-v2/input_audio_0.mp3",
"version": "3",
"language": "en",
"chunk_level": "segment",
"merge_chunks": true,
"max_segment_len": 29
}已完成的运行会在输出中展示结果。以下内容是该模型保存的示例,而不是新的生成结果。
[
{
"text": "这里是冰雪大世界眼前这座冰城堡有三层楼那么高晚上灯一亮整座城堡会变成蓝色和紫色气温零下20度大家记得戴好手套"
}
]