videostringbắt buộc
URL of the video file to dub (MP4 / MOV). The dubbed result is returned as a video.
elevenlabs/dubbingElevenLabs Dubbing translates the speech in a video into another language while preserving each speaker's voice, timing, and background audio.
Thử model
Bạn muốn làm gì tiếp theo?
Chọn một ví dụ để nạp đầu vào và kết quả của nó vào playground.
{
"target_lang": "es",
"video": "https://static.sandbase.ai/examples/8f64921f-0d6e-4239-a36a-7419390685bc/input/2515467e-312a-4f21-a8e1-763533464bb3.mp4"
}ElevenLabs Dubbing translates the speech in a video into another language while keeping each speaker's voice, timing, and the background audio.
| Field | Type | Default | Notes |
|---|---|---|---|
video | video URL, required | — | Video to dub. |
source_lang | string | — | Source language; omit to detect. |
num_speakers | integer 1–50 | — | Speaker count; omit to detect. |
target_lang | string, required | — | Language to dub into. |
highest_resolution | boolean | true | Keep the source resolution. |
$0.60 per started minute of video. The quote before submission assumes 1 minute; the final charge uses the measured length.
| Video | Price |
|---|---|
| 1 min | $0.60 |
| 5 min | $3.00 |
| 15 min | $9.00 |
Failed runs are not charged.
Bắt đầu xây dựng
Gửi model này qua 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": "elevenlabs/dubbing",
"video": "https://static.sandbase.ai/examples/elevenlabs/dubbing/input_video_0.mp4",
"source_lang": "en",
"target_lang": "es",
"highest_resolution": true
}
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"Tạo một SandBase API key và đặt nó trong môi trường máy chủ của bạn. Tất cả request sử dụng xác thực Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Giữ key trên máy chủ. Không hiển thị trong mã trình duyệt hoặc commit vào repository.
POST tới /v1/run với model ID này và các đầu vào của nó. Ví dụ request ở trên bao gồm cả bước gửi và polling.
Dùng run ID được trả về để poll cho đến khi trạng thái là completed, failed hoặc timeout. Chỉ đọc đầu ra sau khi completed.
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"Cung cấp một URL tệp có thể truy cập công khai trong trường image, video hoặc audio của model. Các định dạng và giới hạn được hỗ trợ hiển thị bên cạnh từng input trong Playground.
Dùng điều khiển upload hoặc replace trên các trường image được hỗ trợ trong Playground. Trường URL video chấp nhận một video driving được host; điều này không đồng nghĩa hỗ trợ tải lên video.
videostringbắt buộcURL of the video file to dub (MP4 / MOV). The dubbed result is returned as a video.
source_langstringSource language code. If not provided, will be auto-detected.
target_langstringbắt buộcTarget language code for dubbing (ISO 639-1)
num_speakersintegerNumber of speakers in the audio. If not provided, will be auto-detected.
Tối thiểu: 1
Tối đa: 50
highest_resolutionbooleanWhether to use the highest resolution for dubbing.
Mặc định: true
{
"model": "elevenlabs/dubbing",
"video": "https://static.sandbase.ai/examples/elevenlabs/dubbing/input_video_0.mp4",
"source_lang": "en",
"target_lang": "es",
"highest_resolution": true
}Một run đã hoàn tất sẽ hiển thị kết quả trong output. Phần sau là ví dụ đã lưu của model, không phải một lần tạo mới.
[
{
"poster": "https://static.sandbase.ai/examples/posters/5539d010229053c2251d.jpg",
"source": "ElevenLabs schema mirror",
"source_url": "https://elevenlabs.io/docs",
"url": "https://static.sandbase.ai/examples/8f64921f-0d6e-4239-a36a-7419390685bc/output/2e522cf6-5580-4ef4-b959-c0aa4f6b8d1c.mp4"
}
]