Skip to main content
Glama

Lipsync / talking avatar with Replicate

replicate_lipsync

Animate a portrait to speak using text-to-speech or a driving audio file. Produces an MP4 video of the lipsynced avatar.

Instructions

Animate a portrait image to speak — either from a text script (model does TTS + lipsync) or from a driving audio file. Produces an MP4 video.

DISPLAY REQUIREMENT — after this tool returns successfully, include the URL(s) so the user can open the video. URLs expire in ~24h.

Args:

  • image_url (URL): Portrait or face image to animate. Use replicate_upload_file for local files.

  • text (string, optional): Script for the avatar to speak. Used by video-avatar (maps to voice_script). At least one of text or audio_url is required.

  • audio_url (URL, optional): Driving audio for lipsync. Required for sadtalker; optional override for video-avatar. At least one of text or audio_url is required.

  • model (string, default "video-avatar"): Curated key (video-avatar, sadtalker) or "owner/name[:version]".

  • extra_input (object, optional): Model-specific extras (e.g. {voice_prompt: "speak slowly"} for video-avatar).

  • download (boolean, default true): Download the MP4 locally.

  • timeout_ms: Default 300000.

Returns: PredictionResult. local_paths contain .mp4 files.

Examples:

  • image_url="<portrait.jpg>", text="Hello! Welcome to our product demo." → video-avatar (TTS + lipsync)

  • image_url="<face.jpg>", audio_url="<speech.wav>", model="sadtalker" → audio-driven lipsync

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textNoText script for the avatar to speak. Required for models that do TTS+lipsync (video-avatar). Ignored when audio_url is provided.
modelNoLipsync model. Curated: video-avatar, sadtalker. Or "owner/name".video-avatar
downloadNo
audio_urlNoURL of the driving audio. Required for audio-only lipsync models (sadtalker). Optional override when model can do TTS.
image_urlYesURL of the portrait or face image to animate. Use replicate_upload_file for local files.
timeout_msNoMax ms to wait for the prediction. If exceeded, returns the prediction ID so you can poll via replicate_get_prediction. Default: 300000 (5min).
extra_inputNoAdditional model-specific inputs.
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already indicate non-readonly, non-destructive. The description adds that it produces MP4 video, URLs expire in ~24h, and that timeout returns prediction ID for polling. No contradictions. This context is valuable beyond structured annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well-structured with overview, display requirement, parameter list, and examples. Every sentence adds value, though it's a bit long. No wasted words; front-loaded with the core action.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema, but description explains return type (PredictionResult with mp4 files) and display requirement. It covers timeout handling and model-specific extras. For a complex tool with 7 params and nested objects, it is sufficiently complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is high (86%), so baseline 3. The description adds meaning beyond schema: text maps to 'voice_script', extra_input usage, model defaults, and timeout_ms behavior. It compensates for the 14% uncovered (like timeout_ms details) and provides examples.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it animates a portrait to speak using either text (TTS+lipsync) or audio driving. It distinguishes from sibling tools like replicate_generate_video and replicate_generate_speech by focusing on lipsync. The verb 'animate' and resource 'portrait image' are specific.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explains when to use text vs audio_url, and that at least one is required. It mentions using replicate_upload_file for local files, and shows examples for both modes. However, it does not explicitly exclude cases like when model selection is inappropriate, but the overall guidance is clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sena-labs/replicate-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server