---
title: Editing speech in video — P-Video-2-Pro-Lipsync | Runware Docs
url: https://runware.ai/docs/models/prunaai-p-video-2-pro-lipsync/guides/editing-speech-in-video
description: "How to give an existing video new speech with Pruna P-Video-2-Pro-Lipsync: the request, changing one line without a reshoot, and dubbing a clip into other languages."
---
### [Introduction](https://runware.ai/docs/models/prunaai-p-video-2-pro-lipsync/guides/editing-speech-in-video#introduction)

P-Video-2-Pro-Lipsync takes **a video of someone talking and a new audio track**, and returns the same video with **the mouth re-synced to the new speech**. Only the lower face is redrawn, and everything else in the shot comes from your video. Turn the sound on:

[Watch video](https://runware.ai/docs/assets/hero.SdDdHZya.mp4)

*The same take with a new line*

**Source video**:

[Watch video](https://runware.ai/docs/assets/source-hero.BqVNtV6g.mp4)

> **Prompt**: A boutique owner, a woman in her thirties with shoulder-length wavy brown hair, in a cream knit sweater, stands still in her small clothing shop in front of a rail of denim jackets and says to the camera in a calm, friendly voice, "All the denim on this rail is half price until Sunday." Vertical phone framing, close-up from the shoulders up, her face large in the frame and turned to the lens, her cream sweater fills the bottom of the frame with nothing between her and the camera, she keeps her head still and speaks without big expressions, locked-off camera, soft daylight. Photoreal small-business social video, no text, no logos. Audio: her calm clear voice close to the microphone, no music.

**New audio**:

[Listen to audio](https://runware.ai/docs/assets/speech-hero.0LZZBw6H.mp3)

> **Prompt**: Our new spring jackets just came in, and they are already selling fast.

One video and one audio file, **no prompt**. This guide covers the request, changing a single line in the original voice, and dubbing one clip into several languages.

### [Request shape](https://runware.ai/docs/models/prunaai-p-video-2-pro-lipsync/guides/editing-speech-in-video#request-shape)

The model takes two inputs, and **both are required**. The person speaking goes in `inputs.video`, and the speech the mouth should follow goes in `inputs.audio`. That is the whole request:

**TypeScript**:

```typescript
import { createClient } from '@runware/sdk'

const client = await createClient({ apiKey: process.env.RUNWARE_API_KEY })
await client.connect()

const [result] = await client.run({
  model: 'prunaai:p-video@2-pro-lipsync',
  inputs: {
    video: 'https://assets.runware.ai/guides/prunaai-p-video-2-pro-lipsync/editing-speech-in-video/source-hero.mp4',
    audio: 'https://assets.runware.ai/guides/prunaai-p-video-2-pro-lipsync/editing-speech-in-video/speech-hero.mp3'
  },
  deliveryMethod: 'async'
})
```

**Python**:

```python
import asyncio
import os

from runware import Runware

async def main():
    async with Runware(api_key=os.environ["RUNWARE_API_KEY"]) as client:
        results = await client.run({
            "model": "prunaai:p-video@2-pro-lipsync",
            "inputs": {
                "video": "https://assets.runware.ai/guides/prunaai-p-video-2-pro-lipsync/editing-speech-in-video/source-hero.mp4",
                "audio": "https://assets.runware.ai/guides/prunaai-p-video-2-pro-lipsync/editing-speech-in-video/speech-hero.mp3"
            },
            "deliveryMethod": "async"
        })

asyncio.run(main())
```

**cURL**:

```bash
curl https://api.runware.ai/v1 \
  -H "Authorization: Bearer $RUNWARE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[
    {
      "taskType": "videoInference",
      "taskUUID": "3c82201a-fad8-4f23-b20e-381e1189235f",
      "model": "prunaai:p-video@2-pro-lipsync",
      "inputs": {
        "video": "https://assets.runware.ai/guides/prunaai-p-video-2-pro-lipsync/editing-speech-in-video/source-hero.mp4",
        "audio": "https://assets.runware.ai/guides/prunaai-p-video-2-pro-lipsync/editing-speech-in-video/speech-hero.mp3"
      },
      "deliveryMethod": "async"
    }
  ]'
```

**CLI**:

```bash
runware run prunaai:p-video@2-pro-lipsync \
  inputs.video=https://assets.runware.ai/guides/prunaai-p-video-2-pro-lipsync/editing-speech-in-video/source-hero.mp4 \
  inputs.audio=https://assets.runware.ai/guides/prunaai-p-video-2-pro-lipsync/editing-speech-in-video/speech-hero.mp3 \
  deliveryMethod=async
```

**JSON**:

```json
{
  "taskType": "videoInference",
  "taskUUID": "3c82201a-fad8-4f23-b20e-381e1189235f",
  "model": "prunaai:p-video@2-pro-lipsync",
  "inputs": {
    "video": "https://assets.runware.ai/guides/prunaai-p-video-2-pro-lipsync/editing-speech-in-video/source-hero.mp4",
    "audio": "https://assets.runware.ai/guides/prunaai-p-video-2-pro-lipsync/editing-speech-in-video/speech-hero.mp3"
  },
  "deliveryMethod": "async"
}
```

There is **no field for the shot or the length**. A request with `positivePrompt`, `width`, `height`, `resolution`, `duration` or `fps` is rejected, because the video sets the size and the shorter of the two inputs sets the length. [Preparing source video](https://runware.ai/docs/models/prunaai-p-video-2-pro-lipsync/guides/source-video) and [Preparing the audio](https://runware.ai/docs/models/prunaai-p-video-2-pro-lipsync/guides/preparing-the-audio) cover each input.

The two optional fields are `seed` and `settings.safetyFilter`, which turns on **the provider's content filter**. The filter is off by default.

### [Changing a line](https://runware.ai/docs/models/prunaai-p-video-2-pro-lipsync/guides/editing-speech-in-video#changing-a-line)

A line can change after the take is approved, such as a date or a price. **Generate the new line in the same voice**, send it with the approved take, and the mouth moves to the new words while the rest of the take stays as it was:

[Watch video](https://runware.ai/docs/assets/output-fixed-line.D2LAHOkQ.mp4)

*The fixed take: Thursday instead of Tuesday*

**Approved take**:

[Watch video](https://runware.ai/docs/assets/take-approved.ZVLO-6o6.mp4)

**New line**:

[Listen to audio](https://runware.ai/docs/assets/speech-webinar-thursday.B04_Bqmk.mp3)

> **Prompt**: Join us live on Thursday at five for the full product demo.

Both lines come from the same voice with the same delivery direction, so **the fix sounds like the take it replaces**. The new audio carries **the whole line**, because it replaces the soundtrack of the clip and the shorter input sets the length. A file with only the changed word would return a clip as short as that word.

**TypeScript**:

```typescript
import { createClient } from '@runware/sdk'

const client = await createClient({ apiKey: process.env.RUNWARE_API_KEY })
await client.connect()

const [result] = await client.run({
  model: 'prunaai:p-video@2-pro-lipsync',
  inputs: {
    video: 'https://assets.runware.ai/guides/prunaai-p-video-2-pro-lipsync/editing-speech-in-video/take-approved.mp4',
    audio: 'https://assets.runware.ai/guides/prunaai-p-video-2-pro-lipsync/editing-speech-in-video/speech-webinar-thursday.mp3'
  },
  deliveryMethod: 'async'
})
```

**Python**:

```python
import asyncio
import os

from runware import Runware

async def main():
    async with Runware(api_key=os.environ["RUNWARE_API_KEY"]) as client:
        results = await client.run({
            "model": "prunaai:p-video@2-pro-lipsync",
            "inputs": {
                "video": "https://assets.runware.ai/guides/prunaai-p-video-2-pro-lipsync/editing-speech-in-video/take-approved.mp4",
                "audio": "https://assets.runware.ai/guides/prunaai-p-video-2-pro-lipsync/editing-speech-in-video/speech-webinar-thursday.mp3"
            },
            "deliveryMethod": "async"
        })

asyncio.run(main())
```

**cURL**:

```bash
curl https://api.runware.ai/v1 \
  -H "Authorization: Bearer $RUNWARE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[
    {
      "taskType": "videoInference",
      "taskUUID": "12a44961-e75e-47f7-9c6e-35fc39eda7e8",
      "model": "prunaai:p-video@2-pro-lipsync",
      "inputs": {
        "video": "https://assets.runware.ai/guides/prunaai-p-video-2-pro-lipsync/editing-speech-in-video/take-approved.mp4",
        "audio": "https://assets.runware.ai/guides/prunaai-p-video-2-pro-lipsync/editing-speech-in-video/speech-webinar-thursday.mp3"
      },
      "deliveryMethod": "async"
    }
  ]'
```

**CLI**:

```bash
runware run prunaai:p-video@2-pro-lipsync \
  inputs.video=https://assets.runware.ai/guides/prunaai-p-video-2-pro-lipsync/editing-speech-in-video/take-approved.mp4 \
  inputs.audio=https://assets.runware.ai/guides/prunaai-p-video-2-pro-lipsync/editing-speech-in-video/speech-webinar-thursday.mp3 \
  deliveryMethod=async
```

**JSON**:

```json
{
  "taskType": "videoInference",
  "taskUUID": "12a44961-e75e-47f7-9c6e-35fc39eda7e8",
  "model": "prunaai:p-video@2-pro-lipsync",
  "inputs": {
    "video": "https://assets.runware.ai/guides/prunaai-p-video-2-pro-lipsync/editing-speech-in-video/take-approved.mp4",
    "audio": "https://assets.runware.ai/guides/prunaai-p-video-2-pro-lipsync/editing-speech-in-video/speech-webinar-thursday.mp3"
  },
  "deliveryMethod": "async"
}
```

### [Dubbing into several languages](https://runware.ai/docs/models/prunaai-p-video-2-pro-lipsync/guides/editing-speech-in-video#dubbing-into-several-languages)

A dub is **one request per language** on the same source. The voice is the one in the audio, so pick one that fits the person on screen, and **keep the same voice across languages** when one person speaks all of them:

**English source**:

[Watch video](https://runware.ai/docs/assets/source-course.6k8j0e5P.mp4)

*The source, in English*

> **Prompt**: An online course instructor, a woman in her fifties with a short silver pixie cut, in a rust-colored blouse, sits at a tidy desk with a laptop beside her and says to the camera, "Open the dashboard, click New report, and pick the date range you need." Medium close-up, locked-off camera, soft daylight, a bookshelf softly out of focus behind her. Photoreal e-learning lesson video, no text, no logos. Audio: her calm clear speaking voice close to the microphone, no music.

**French**:

[Watch video](https://runware.ai/docs/assets/output-course-fr.DsRddEly.mp4)

*Ouvrez le tableau de bord, cliquez sur Nouveau rapport et choisissez vos dates.*

**German**:

[Watch video](https://runware.ai/docs/assets/output-course-de.C_CUgLR3.mp4)

*Öffnen Sie das Dashboard, klicken Sie auf Neuer Bericht und wählen Sie den Zeitraum.*

**Japanese**:

[Watch video](https://runware.ai/docs/assets/output-course-ja.DTgc3SSm.mp4)

*ダッシュボードを開いて、新しいレポートをクリックし、期間を選んでください。*

The model follows the speech **in whatever language the audio is in**, with nothing to set. A translation runs longer or shorter than the original line, and **the output ends with the shorter input**, so time each one against the clip before you send it. [Preparing the audio](https://runware.ai/docs/models/prunaai-p-video-2-pro-lipsync/guides/preparing-the-audio) shows what happens when it overruns.

### [Tips](https://runware.ai/docs/models/prunaai-p-video-2-pro-lipsync/guides/editing-speech-in-video#tips)

1. **Send the whole line.** The audio replaces the soundtrack, so it has to carry everything the clip should say.
    
2. **Keep one voice per person.** Generate fixes and translations with the voice and the delivery direction of the original take.
    
3. **Fit the voice to the face.** The output speaks with the voice in the audio, whoever is on screen.
    
4. **Time each translation against the clip.** The shorter input sets the length, and a line that runs past the video is cut where the video ends.