Using Audio Sources as Voice

Integrate Custom Audio as Your Avatar's Voice

Welcome to Audio Voice Integration!

Konpro's API enables you to use your own audio files as the voice track for avatar videos. This feature allows avatars to lip-sync to any audio you provide, giving you full flexibility over voice and narration.

Voice Settings for Audio Source

To use a custom audio source as the avatar's voice:

  • Set the voice type to audio in your API request settings.
  • Provide either an audio_url (a public link to your audio file) or an audio_asset_id (an uploaded audio file's identifier from your Konpro asset library).

You may:

  • Select an existing audio asset from Konpro's stored files to include in your video.
  • Provide your own audio by giving a direct public link to the audio file.

Creating Your Avatar Video

Once your voice settings are ready, initiate video generation. Make sure to specify either audio_url or audio_asset_id in your request. Here's a sample API call:

bash
curl -X POST 'https://api.konpro.ai/v1/video/generate' \
-H 'x-api-key: <your-api-key>' \
-H 'Content-Type: application/json' \
-d '{
  "video_inputs": [
    {
      "character": {
        "type": "avatar",
        "avatar_id": "Monica_inSleeveless_20220819",
        "avatar_style": "normal"
      },
      "voice": {
        "type": "audio",
        "audio_asset_id": "<asset_id>"
      },
      "background": {
        "type": "color",
        "value": "#008000"
      }
    }
  ]
}'

Substitute <asset_id> with your uploaded audio's identifier, or use "audio_url": "<your-url>" to provide a public URL for your audio file instead.

Additional Info

  • The system automatically synchronizes lip movement with your supplied audio, producing a highly realistic effect.
  • To use your own audio file, you may first upload it to obtain an audio_asset_id, or serve it directly via a public URL.

Table of Contents