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.
モデルを試す
例を選択すると、その入力と結果がプレイグラウンドに読み込まれます。
{
"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してください。上のリクエスト例には送信とポーリングが含まれています。
返されたrun 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の対応する画像フィールドでアップロードまたは置換を使用してください。video URLフィールドはホストされたドライビング動画を受け付けますが、動画アップロード対応を意味するものではありません。
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
}完了したrunの結果は出力に表示されます。以下はモデルに保存されたサンプルであり、新規生成ではありません。
[
{
"text": "这里是冰雪大世界眼前这座冰城堡有三层楼那么高晚上灯一亮整座城堡会变成蓝色和紫色气温零下20度大家记得戴好手套"
}
]