Skip to main content

Overview

Create talking avatar videos with AI avatars that speak naturally. Talking Avatar combines AI avatars with voice synthesis and lipsync technology to create realistic spokesperson videos.

Quick Example

const response = await fetch('https://api.hooked.ai/v1/project/create/talking-avatar', {
  method: 'POST',
  headers: {
    'x-api-key': process.env.HOOKED_API_KEY,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    script: 'Check out this amazing product! It's super easy to use and I love the results.',
    avatarId: '2',
    voiceId: 'confident_voice_id'
  })
});

const data = await response.json();
console.log('Video ID:', data.data.videoId);
console.log('Project ID:', data.data.projectId);

Complete Example

const createTalkingAvatar = async () => {
  const response = await fetch('https://api.hooked.ai/v1/project/create/talking-avatar', {
    method: 'POST',
    headers: {
      'x-api-key': process.env.HOOKED_API_KEY,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      name: 'Welcome Video',
      script: 'Hey there! Thanks for checking out our channel. We create awesome content every week, so make sure to subscribe and hit that notification bell!',
      avatarId: '2',
      voiceId: 'confident_voice_id',
      lipsyncModel: 'pro',
      caption: {
        preset: 'tiktok',
        alignment: 'bottom',
        disabled: false
      },
      audio: {
        speed: 1,
        stability: 0.5,
        similarityBoost: 0.75,
        style: 0,
        useSpeakerBoost: true
      },
      musicId: 'music_upbeat_01',
      webhook: 'https://yoursite.com/webhook',
      metadata: {
        channelId: 'my-channel',
        videoType: 'welcome'
      }
    })
  });

  return await response.json();
};

Tips for Talking Avatar Videos

Be authentic: Write scripts that sound natural and conversational, not scripted
Keep it short: 15-60 seconds works best for social media content
Choose the right lipsync model: Use base for faster processing, pro for higher quality synchronization
Match voice to avatar: Choose a voice that matches the avatar’s appearance for authenticity
Use webhooks: Always use webhooks in production instead of polling for video status
Customize audio settings: Adjust speed, stability, and similarity boost to fine-tune the voice output

Effective Script Formulas

FormulaExample
Conversational Greeting”Hey! How’s it going? I wanted to share something cool with you…”
Personal Story”So I tried this yesterday and I was blown away…”
Quick Tip”Quick tip that changed everything for me…”
Testimonial Style”I’ve been using this for a month now and here’s my honest review…”
Friendly Update”Hey everyone! Just wanted to give you a quick update…”

Lipsync Models

ModelDescriptionBest For
baseStandard lipsync quality, faster processingQuick videos, testing, lower priority content
proHigher quality lipsync, more accurate synchronizationProfessional content, final productions, high-quality output

Audio Settings

The audio object allows you to fine-tune the voice output:
audio: {
  speed: 1,              // Voice speed multiplier (0.7 to 1.2)
  stability: 0.5,        // Voice stability (0 to 1)
  similarityBoost: 0.75, // Voice similarity boost (0 to 1)
  style: 0,             // Voice style exaggeration (0 to 1)
  useSpeakerBoost: true // Enable speaker boost for clearer audio
}

Caption Presets

Available caption presets for the caption.preset field:
PresetDescription
defaultDefault caption style with bold text and shadow effects
beastBold uppercase style with Komika font
umiYellow glowing text style
tiktokViral & trendy style, perfect for social media
wrap1Wrapped style with red background highlight
wrap2Wrapped style with blue background highlight (uppercase)
arielBold uppercase style with purple highlight
hookedBrand style with purple background
classicClean, simple captions with black background (Default)
activeGreen background with bold text
bubbleWhite background bubble style
glassGlassmorphic transparency effect
comicComic Sans font with colorful style
glowPink and orange glow effects
pastelSoft pastel pink background
neonGreen neon glow effect
retroTVRetro TV style with cyan glow
redRed glow effect with white text
markerYellow marker/highlighter style
modernContemporary white background style
blueBlue background style
vividVibrant pink background with uppercase text

Use Cases

  • Testimonials: Authentic-looking customer testimonials
  • Social Media Content: TikTok, Instagram Reels, YouTube Shorts
  • Personal Messages: Video messages for customers or team
  • Quick Updates: Company updates or announcements
  • Educational Content: Quick tips or how-to videos
  • Product Presentations: Showcase products with talking avatars

Handling the Webhook Response

// Express.js webhook handler
app.post('/webhook', (req, res) => {
  const { data, status, message } = req.body;

  if (status === "COMPLETED") {
    const { videoId, status: videoStatus, url, shareUrl, metadata } = data;
    console.log('Video completed!');
    console.log('Video ID:', videoId);
    console.log('Download URL:', url);
    console.log('Share URL:', shareUrl);
    console.log('Channel:', metadata.channelId);

    // Save to your database, notify team, etc.
  }

  res.status(200).send('OK');
});