---
title: Driving a clip from your own audio — P-Video-2 | Runware Docs
url: https://runware.ai/docs/models/prunaai-p-video-2/guides/audio-driven
description: How to condition Pruna P-Video-2 on an imported track with inputs.audio, why the audio and not duration sets the length, and when to import a voice instead of generating one.
---
### [Introduction](https://runware.ai/docs/models/prunaai-p-video-2/guides/audio-driven#introduction)

[Native audio](https://runware.ai/docs/models/prunaai-p-video-2/guides/native-audio) has the model invent the soundtrack. `inputs.audio` inverts that: you supply the track and **the picture is generated to fit it**. That matters whenever the audio is not yours to regenerate, which covers a licensed song, a recorded voiceover, a brand sonic identity, or a line a legal team has already signed off.

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

*A performance built around a song that already existed*

> **Prompt**: She sings the vocal into the microphone, her mouth matching the words and her phrasing following the melody, leaning in slightly on the chorus and gesturing once with her free hand. The camera holds still.

**First frame**:

![A woman in her twenties with braided hair in an oversized denim jacket standing at a chrome studio microphone in a dim booth with acoustic foam behind her](https://runware.ai/docs/assets/still-singer.gbCgNmHF_Z2aTaeG.jpg)

> **Prompt**: A woman in her twenties with braided hair, wearing an oversized denim jacket over a black vest, standing at a chrome studio microphone in a dim recording booth with acoustic foam behind her, one hand resting on the mic stand. A single warm key light from the left, deep shadows. Photoreal music performance photography, vertical framing, chest-up, no text.

**Vocal track**:

[Listen to audio](https://runware.ai/docs/assets/track-vocal.DgSKu6Hj.mp3)

> **Prompt**: A mid-tempo indie pop song at around 96 beats per minute with a clear female lead vocal well forward in the mix, warm electric guitar, soft bass and brushed drums, an unhurried and hopeful chorus.

Three inputs, one output. The face comes from the still, **the voice and the phrasing come from the song**, and the prompt only says what the performance does. Nothing in that request describes a melody, because the melody was supplied. This guide covers the request, the length rule that trips people up, what the picture actually takes from music, and how imported speech compares with letting the model generate its own.

### [The request](https://runware.ai/docs/models/prunaai-p-video-2/guides/audio-driven#the-request)

`inputs.audio` is **a single string, not an array**. It takes a URL, a UUID from an earlier task, a data URI or base64.

```json
{
  "inputs": {
    "audio": "https://am.runware.ai/audio/os/a14d18/ws/2/ai/c81f3a95-7d24-4e60-be15-2a7c9d413f80.mp3"
  }
}
```

It combines with a first frame, which is the shape most production work wants: your track, your approved face, and a prompt that only describes the performance.

**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',
  positivePrompt: 'She delivers the line to camera, her mouth matching the words, with small natural head movement and one open-handed gesture, then settles. The camera holds still.',
  inputs: {
    audio: 'https://am.runware.ai/audio/os/a14d18/ws/2/ai/5c2e8a71-4b93-4d06-9f18-7a3c1d5e2b84.mp3',
    frameImages: [
      {
        image: 'https://im.runware.ai/image/os/a14d18/ws/2/ii/1d7a4c92-8e35-4b60-9f27-5c8a2d1f7e93.jpg',
        frame: 'first'
      }
    ]
  },
  resolution: '720p',
  seed: 7729481,
  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",
            "positivePrompt": "She delivers the line to camera, her mouth matching the words, with small natural head movement and one open-handed gesture, then settles. The camera holds still.",
            "inputs": {
                "audio": "https://am.runware.ai/audio/os/a14d18/ws/2/ai/5c2e8a71-4b93-4d06-9f18-7a3c1d5e2b84.mp3",
                "frameImages": [
                    {
                        "image": "https://im.runware.ai/image/os/a14d18/ws/2/ii/1d7a4c92-8e35-4b60-9f27-5c8a2d1f7e93.jpg",
                        "frame": "first"
                    }
                ]
            },
            "resolution": "720p",
            "seed": 7729481,
            "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": "d47b1c85-3e92-4a06-8f51-2c7d9a5e1b30",
      "model": "prunaai:p-video@2",
      "positivePrompt": "She delivers the line to camera, her mouth matching the words, with small natural head movement and one open-handed gesture, then settles. The camera holds still.",
      "inputs": {
        "audio": "https://am.runware.ai/audio/os/a14d18/ws/2/ai/5c2e8a71-4b93-4d06-9f18-7a3c1d5e2b84.mp3",
        "frameImages": [
          {
            "image": "https://im.runware.ai/image/os/a14d18/ws/2/ii/1d7a4c92-8e35-4b60-9f27-5c8a2d1f7e93.jpg",
            "frame": "first"
          }
        ]
      },
      "resolution": "720p",
      "seed": 7729481,
      "deliveryMethod": "async"
    }
  ]'
```

**CLI**:

```bash
runware run prunaai:p-video@2 \
  positivePrompt="She delivers the line to camera, her mouth matching the words, with small natural head movement and one open-handed gesture, then settles. The camera holds still." \
  inputs.audio=https://am.runware.ai/audio/os/a14d18/ws/2/ai/5c2e8a71-4b93-4d06-9f18-7a3c1d5e2b84.mp3 \
  inputs.frameImages.0.image=https://im.runware.ai/image/os/a14d18/ws/2/ii/1d7a4c92-8e35-4b60-9f27-5c8a2d1f7e93.jpg \
  inputs.frameImages.0.frame=first \
  resolution=720p \
  seed=7729481 \
  deliveryMethod=async
```

**JSON**:

```json
{
  "taskType": "videoInference",
  "taskUUID": "d47b1c85-3e92-4a06-8f51-2c7d9a5e1b30",
  "model": "prunaai:p-video@2",
  "positivePrompt": "She delivers the line to camera, her mouth matching the words, with small natural head movement and one open-handed gesture, then settles. The camera holds still.",
  "inputs": {
    "audio": "https://am.runware.ai/audio/os/a14d18/ws/2/ai/5c2e8a71-4b93-4d06-9f18-7a3c1d5e2b84.mp3",
    "frameImages": [
      {
        "image": "https://im.runware.ai/image/os/a14d18/ws/2/ii/1d7a4c92-8e35-4b60-9f27-5c8a2d1f7e93.jpg",
        "frame": "first"
      }
    ]
  },
  "resolution": "720p",
  "seed": 7729481,
  "deliveryMethod": "async"
}
```

Notice what is missing from that prompt. **There is no `Audio:` clause**, because the soundtrack is no longer a thing the model decides. A sound description left in an audio-conditioned request is prompt length spent on an instruction that cannot be followed.

### [The track sets the length](https://runware.ai/docs/models/prunaai-p-video-2/guides/audio-driven#the-track-sets-the-length)

This is enforced, not advisory. **`duration` is rejected outright when `inputs.audio` is present.** A request carrying both fails validation.

> [!WARNING]
> `duration` and `inputs.audio` are mutually exclusive. The length of the output is the length of the audio you supplied, which also means **the audio decides what you are billed for**, since billing follows the seconds of finished video.

That inverts the usual workflow. The way to control a clip's length is to **cut the audio before you send it**, and the same track at two lengths gives two different clips with nothing else changed:

[Watch video](https://runware.ai/docs/assets/output-len-short.9h5fbxxQ.mp4)

*A four-second cut of the track*

> **Prompt**: A dancer in a loose grey tracksuit moves through a routine in a bright empty studio with a sprung wood floor and a mirrored wall behind, matching the energy of the music. Wide shot, even soft daylight from a bank of windows. Photoreal dance-content cinematography, locked-off camera.

[Watch video](https://runware.ai/docs/assets/output-len-long.C2ukzGdX.mp4)

*A fourteen-second cut of the same track*

> **Prompt**: A dancer in a loose grey tracksuit moves through a routine in a bright empty studio with a sprung wood floor and a mirrored wall behind, matching the energy of the music. Wide shot, even soft daylight from a bank of windows. Photoreal dance-content cinematography, locked-off camera.

Both are cuts of one instrumental track, taken from the same offset, and it is the same track you can hear in the next section. Neither request said anything about length.

Two practical consequences follow. **Trim to the beat, not to a round number**, because the clip ends where the audio ends and a track cut mid-phrase gives you a video that stops mid-phrase. And **trim before you experiment**: iterating on a fourteen-second track costs three and a half times what iterating on a four-second cut does, so find the prompt on a short excerpt and run the full length once.

> [!NOTE]
> The 20-second ceiling that applies to `duration` is a ceiling on the model, so a longer track is not a way around it. For anything longer, cut the audio into sections, generate a clip per section, and join them in your edit. Sectioning on musical phrases gives you edit points that land on the beat.

### [What the picture takes from the music](https://runware.ai/docs/models/prunaai-p-video-2/guides/audio-driven#what-the-picture-takes-from-the-music)

The model reads the track for energy and pace, not just length. Same prompt, same seed, two tracks:

[Listen to audio](https://runware.ai/docs/assets/track-upbeat.C0VwCC8n.mp3)

*124 BPM, four-on-the-floor*

> **Prompt**: An energetic instrumental electronic track at around 124 beats per minute, four-on-the-floor kick, bright plucked synth arpeggio, hand claps on the offbeat, confident and forward-moving, suitable for a fashion campaign.

[Listen to audio](https://runware.ai/docs/assets/track-calm.CajSKvA6.mp3)

*68 BPM, no percussion*

> **Prompt**: A slow ambient instrumental piece at around 68 beats per minute, sustained warm pads, sparse felt piano notes, no percussion, spacious and unhurried, suitable for a wellness brand film.

[Watch video](https://runware.ai/docs/assets/output-music-upbeat.B1BkpD4v.mp4)

*Driven by the 124 BPM track*

> **Prompt**: A dancer in a loose grey tracksuit moves through a routine in a bright empty studio with a sprung wood floor and a mirrored wall behind, matching the energy of the music. Wide shot, even soft daylight from a bank of windows. Photoreal dance-content cinematography, locked-off camera.

[Watch video](https://runware.ai/docs/assets/output-music-calm.BNB0QKNd.mp4)

*Driven by the 68 BPM track*

> **Prompt**: A dancer in a loose grey tracksuit moves through a routine in a bright empty studio with a sprung wood floor and a mirrored wall behind, matching the energy of the music. Wide shot, even soft daylight from a bank of windows. Photoreal dance-content cinematography, locked-off camera.

One prompt, two performances. The fast track produces sharp movement that changes direction often, the slow one produces sustained movement that holds. **The prompt asked for a routine and the track decided what kind**, which is why "matching the energy of the music" is a clause worth writing: it tells the model the audio is a director and not just a length.

What this is not is beat detection. **Do not expect a hit on a specific downbeat.** The correspondence is at the level of feel over seconds, so a cut that has to land on a particular accent still belongs in your edit. Plan the audio-driven clip as the raw material and keep the frame-accurate work where you have frames.

### [Speaking with your own audio](https://runware.ai/docs/models/prunaai-p-video-2/guides/audio-driven#speaking-with-your-own-audio)

A recorded or synthesised line plus a portrait gives you a spokesperson whose words you fully control, which is the case for anything with a number, a price or a legal term in it.

[Listen to audio](https://runware.ai/docs/assets/voice-line.Bz7ponEY.mp3)

*English, synthesised*

> **Prompt**: Our returns window is now sixty days, and postage is on us both ways.

[Listen to audio](https://runware.ai/docs/assets/voice-line-es.Da7D2y3V.mp3)

*Spanish, same voice*

> **Prompt**: Nuestro plazo de devolución es ahora de sesenta días, y los gastos de envío corren por nuestra cuenta.

Both go to the same portrait, which is what keeps the presenter identical across the set:

![A woman in a slate blue blazer standing in front of a plain warm white wall with a leafy plant out of focus beside her, looking into the lens with her mouth closed](https://runware.ai/docs/assets/still-spokesperson.D-3B_BKO_ZXD0Y3.jpg)

*The shared first frame, mouth closed and expression neutral*

> **Prompt**: A woman in her thirties with dark hair tied back, wearing a slate blue blazer, standing in front of a plain warm white wall with a leafy plant softly out of focus to one side, hands relaxed, looking straight into the lens with a neutral friendly expression and her mouth closed. Soft even daylight from the front left. Photoreal corporate spokesperson photography, medium shot, chest-up, no text.

Feeding both tracks to that still, with the same prompt and the same seed, gives a localized pair:

[Watch video](https://runware.ai/docs/assets/output-voice-portrait.CxNKX7tX.mp4)

*English track*

> **Prompt**: She delivers the line to camera, her mouth matching the words, with small natural head movement and one open-handed gesture, then settles. The camera holds still.

[Watch video](https://runware.ai/docs/assets/output-voice-es.DXO97Mee.mp4)

*Spanish track*

> **Prompt**: She delivers the line to camera, her mouth matching the words, with small natural head movement and one open-handed gesture, then settles. The camera holds still.

This is the pattern for a localized announcement set. **One approved portrait plus one track per market** gets you the same presenter across every language, with no chance of the face drifting between versions, because the face is a file rather than a generation.

Two things make it work in practice. **The still should start with the mouth closed and a neutral expression**, so the first frame is a plausible position to begin speaking from. And **the prompt has to say she is speaking**, since the model needs to know the audio is a voice to be lip-synced rather than a soundtrack to move to.

### [Imported audio or native speech](https://runware.ai/docs/models/prunaai-p-video-2/guides/audio-driven#imported-audio-or-native-speech)

Both routes produce a talking clip and they are not equivalent. The difference is where the lip sync comes from.

**Native speech** is generated with the picture, so the model chooses the pacing and shapes the mouth around a delivery it is authoring. That is why the lip sync is at its strongest here, and why the pause-line-rest shape is so consistent.

**Imported audio** arrives fixed. The model has to fit a mouth to timing it did not choose, and it favors **a stable, clean face over exaggerated articulation**. Faces hold together well and the sync reads as natural at conversational distance, but do not expect the pronounced mouth shapes that a generated line produces.

The choice follows from what is actually constrained:

- **The words must be exact, or the voice is a brand asset, or you need multiple languages.** Import the audio. Nothing else guarantees the script.
- **The words are yours to write and one clip is the deliverable.** Generate natively. Fewer moving parts and better sync.
- **A licensed or recorded track has to be in the clip.** Import it, and accept that the length comes with it.
- **The clip needs a music bed under a spoken line.** Generate natively, since one imported file cannot be separated into a voice and a bed the model can treat differently.

> [!NOTE]
> For a single presenter reading a script against a plain background with no scene around them, [P-Video-Avatar](https://runware.ai/docs/models/prunaai-p-video-avatar) is built for exactly that and accepts audio too. P-Video-2 is the better choice when there is a set, a product, a music bed or a second person involved.

### [Tips](https://runware.ai/docs/models/prunaai-p-video-2/guides/audio-driven#tips)

1. **Cut the audio to set the length.** `duration` is rejected with `inputs.audio`, so the trim is your only length control, and it decides the bill.
    
2. **Trim on a phrase, not a round number.** The video stops when the audio stops, so a track cut mid-bar gives you a clip that ends mid-bar.
    
3. **Iterate on a short excerpt.** Find the prompt on four seconds, then run the full track once.
    
4. **Drop the `Audio:` clause.** With a track supplied there is nothing for it to direct, and it competes with the picture for prompt length.
    
5. **Say "matching the energy of the music".** It tells the model to treat the track as direction rather than as a length, and the movement changes with the tempo.
    
6. **Do not expect beat-accurate hits.** The correspondence is feel over seconds. Frame-accurate cuts belong in your edit.
    
7. **Start portraits with the mouth closed.** A first frame mid-expression is a bad position to begin a line from, and it shows in the first half second.
    
8. **Say the subject is speaking.** Without it the model may read a voice track as ambient sound and move the subject to it instead of syncing.
    
9. **Reuse one portrait across every language.** One still plus one track per market keeps the presenter identical, which no prompt-only approach can promise.
    
10. **Section long audio on musical phrases.** Past 20 seconds you are cutting anyway, so cut where the edit wants to be.