audiostringrequerido
Input audio URL.
heygen/lipsync/precisionHeyGen v3 Lipsync (precision) replaces the speech in a video and re-syncs the speaker's lips to the new audio.
Probar el modelo
¿Qué le gustaría hacer después?
Seleccione un ejemplo para cargar sus entradas y el resultado en el playground.
{
"audio": "https://static.sandbase.ai/examples/3c0d2094-8315-4f9f-bfbd-1a209d8ab9e0/input/733399b2-2dc9-4da1-93ed-5b156997b3c6.mp3",
"video": "https://static.sandbase.ai/examples/3c0d2094-8315-4f9f-bfbd-1a209d8ab9e0/input/c517493c-b3d5-4f92-be2f-684336862d50.mp4"
}HeyGen Lipsync (precision) replaces the speech in a video and re-syncs the speaker's lips to new audio. Precision gives the best sync.
| Field | Type | Default | Notes |
|---|---|---|---|
video | video URL, required | — | Video with the speaker. |
audio | audio URL, required | — | New speech. |
disable_music_track | boolean | false | Drop background music. |
enable_caption | boolean | false | Burn in captions. |
enable_dynamic_duration | boolean | true | Adjust video length to the new audio. |
enable_speech_enhancement | boolean | false | Clean up the new speech. |
end_time | number | — | Optional end of the section. |
start_time | number | — | Optional start of the section to sync (seconds). |
$0.10 per output second. The quote before submission assumes 5 seconds.
| Output | Price |
|---|---|
| 5s | $0.50 |
| 30s | $3.00 |
| 60s | $6.00 |
Failed runs are not charged.
Related: heygen/lipsync/speed, sync/lipsync/3.0/video-to-video.
Empiece a construir
Envíe este modelo a través de la API de ejecución unificada de SandBase.
# 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": "heygen/lipsync/precision",
"audio": "https://v3.fal.media/files/rabbit/Ql3ade3wEKlZXRQLRbhxm_tts.mp3",
"video": "https://media.sandbase.ai/files/922d1013-9018-4956-a39d-d0859149ba76/0.mp4",
"enable_caption": false,
"disable_music_track": false,
"enable_dynamic_duration": true,
"enable_speech_enhancement": false
}
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"Cree una clave de API de SandBase y configúrela en el entorno de su servidor. Todas las solicitudes usan autenticación Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Conserve la clave en el servidor. No la exponga en código del navegador ni la confirme en un repositorio.
Haga un POST a /v1/run con este ID de modelo y sus entradas. El ejemplo de solicitud anterior incluye el envío y el sondeo.
Use el ID de ejecución devuelto para sondear hasta que el estado sea completed, failed o timeout. Lea la salida solo después de completed.
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"Proporcione una URL de archivo accesible públicamente en el campo de imagen, video o audio del modelo. Los formatos y límites admitidos se muestran junto a cada entrada de Playground.
Use el control de subir o reemplazar en los campos de imagen admitidos en Playground. Los campos de URL de video aceptan un video de conducción alojado; no implican compatibilidad con la subida de video.
audiostringrequeridoInput audio URL.
videostringrequeridoInput video URL.
end_timenumberEnd time (seconds) for partial lipsync.
Mínimo: 0
start_timenumberStart time (seconds) for partial lipsync.
Mínimo: 0
enable_captionbooleanBurn in captions.
Valor predeterminado: false
disable_music_trackbooleanRemove background music from the source video.
Valor predeterminado: false
enable_dynamic_durationbooleanAllow the video length to follow the new audio.
Valor predeterminado: true
enable_speech_enhancementbooleanEnhance the replacement audio.
Valor predeterminado: false
{
"model": "heygen/lipsync/precision",
"audio": "https://v3.fal.media/files/rabbit/Ql3ade3wEKlZXRQLRbhxm_tts.mp3",
"video": "https://media.sandbase.ai/files/922d1013-9018-4956-a39d-d0859149ba76/0.mp4",
"enable_caption": false,
"disable_music_track": false,
"enable_dynamic_duration": true,
"enable_speech_enhancement": false
}Una ejecución completada expone su resultado en la salida. Lo siguiente es el ejemplo guardado del modelo, no una nueva generación.
[
{
"poster": "https://static.sandbase.ai/examples/posters/160849037f6b829828c6.jpg",
"source": "heygen schema mirror",
"source_url": "https://heygen.example/",
"url": "https://static.sandbase.ai/examples/3c0d2094-8315-4f9f-bfbd-1a209d8ab9e0/output/2c878a19-1725-4c94-adc2-1a59986d8302.mp4"
}
]