You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<divalign="left"><figure><imgsrc="../../../.gitbook/assets/pixverse-v5-image-to-video_preview.gif"alt=""><figcaption><p><code>"Mona Lisa puts on glasses with her hands."</code></p></figcaption></figure></div>
312
+
313
+
## Full Example #2: Lip-Sync
314
+
315
+
Now let’s test the parameters related to the lip-sync feature. We’ll generate a video with some character and give them a piece of text to speak. The text goes into the `lip_sync_tts_content` parameter, and the `lip_sync_tts_speaker` parameter selects one of the predefined voices.
316
+
317
+
The code below, just like in the first example, creates a video generation task and then automatically polls the server every 15 seconds until it finally receives the video URL.
318
+
319
+
{% tabs %}
320
+
{% tab title="Python" %}
321
+
{% code overflow="wrap" %}
322
+
```python
323
+
import requests
324
+
import time
325
+
326
+
# Insert your AI/ML API key instead of <YOUR_AIMLAPI_KEY>:
327
+
api_key ="<YOUR_AIMLAPI_KEY>"
328
+
329
+
# Creating and sending a video generation task to the server
"prompt": "A young news presenter standing in the studio, facing the camera directly, eyes always on the camera, calm and professional, very still posture, minimal head movement, no sudden gestures, with a gentle friendly smile, confident stance, studio lighting, broadcast framing, realistic style, neutral background activity.",
340
+
"lip_sync_tts_content": "Hello and welcome. This is our latest news update, and here are the headlines.",
prompt:'A young news presenter standing in the studio, facing the camera directly, eyes always on the camera, calm and professional, very still posture, minimal head movement, no sudden gestures, with a gentle friendly smile, confident stance, studio lighting, broadcast framing, realistic style, neutral background activity.',
421
+
lip_sync_tts_content:'Hello and welcome. This is our latest news update, and here are the headlines.',
<table><thead><tr><thwidth="169.99993896484375">Status</th><th>Description</th></tr></thead><tbody><tr><td><code>queued</code></td><td>Job is waiting in queue</td></tr><tr><td><code>generating</code></td><td>Video is being generated</td></tr><tr><td><code>completed</code></td><td>Generation successful, video available</td></tr><tr><td><code>error</code></td><td>Generation failed, check <code>error</code> field</td></tr></tbody></table>
0 commit comments