Humanlike avatar plugin for LiveKit Agents — real-time talking-head video with expression control
Project description
livekit-plugins-humanlike
Real-time talking-head avatar plugin for LiveKit Agents.
Streams TTS audio to a GPU-backed avatar orchestrator that returns lip-synced video frames with facial expressions guided by a natural-language prompt.
Install
pip install livekit-plugins-humanlike
Quick start
from livekit.plugins.humanlike import AvatarSession
avatar = AvatarSession(
orchestrator_url="ws://your-gpu-server:8000/ws/stream",
image="/path/to/face.png",
avatar_model="humanlike-homo",
prompt="warm, friendly, subtly smiling, occasional nods",
)
# Wire into your LiveKit agent
await avatar.start(agent_session, room=ctx.room)
Parameters
| Parameter | Default | Description |
|---|---|---|
orchestrator_url |
ws://localhost:8000/ws/stream |
Avatar server WebSocket URL |
image |
./face.png |
Face image (file path or raw bytes) |
avatar_model |
humanlike-homo |
Model identifier |
prompt |
"" |
Expression prompt (e.g. "warm, smiling, nods") |
seed |
42 |
Random seed for reproducibility |
video_width |
512 |
Output video width |
video_height |
512 |
Output video height |
tts_sample_rate |
16000 |
Must match your TTS output rate |
Live expression updates
Update the avatar's expression mid-conversation:
await avatar.set_prompt("excited, wide eyes, big smile")
Full agent example
from livekit.agents import Agent, AgentSession, JobContext, RoomOutputOptions, WorkerOptions, cli
from livekit.plugins import cartesia, openai, silero
from livekit.plugins.humanlike import AvatarSession
async def entrypoint(ctx: JobContext):
await ctx.connect()
session = AgentSession(
stt=openai.STT(),
llm=openai.LLM(model="gpt-4o"),
tts=cartesia.TTS(model="sonic-3", sample_rate=16000),
vad=silero.VAD.load(),
)
avatar = AvatarSession(
orchestrator_url="ws://localhost:8000/ws/stream",
image="./face.png",
avatar_model="humanlike-homo",
prompt="warm, friendly, natural eye movement",
)
await avatar.start(session, room=ctx.room)
await session.start(
room=ctx.room,
agent=Agent(instructions="You are a helpful assistant."),
room_output_options=RoomOutputOptions(audio_enabled=False),
)
if __name__ == "__main__":
cli.run_app(WorkerOptions(entrypoint_fnc=entrypoint))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file livekit_plugins_humanlike-0.1.0.tar.gz.
File metadata
- Download URL: livekit_plugins_humanlike-0.1.0.tar.gz
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c599c28f31b10b87ff5dcf85b81ef213405fd17b6e89210670d2c71f843785b3
|
|
| MD5 |
cbca29c21f8b73fa0ea203b05f404297
|
|
| BLAKE2b-256 |
6b015c61c58dc7540eaefb2dbbbe77dc30378f8fdc2203bc729069af78a242d5
|
File details
Details for the file livekit_plugins_humanlike-0.1.0-py3-none-any.whl.
File metadata
- Download URL: livekit_plugins_humanlike-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
60078c671fc928654b804c77049609e6589183465ca29a0bf467aec0a8cf2e48
|
|
| MD5 |
4bf86b5e580a1c5b75742e7e67d14d1f
|
|
| BLAKE2b-256 |
2b286fbc6f2c0e21a3be8671053db3d6dee13163445519aa44bded48a0a507ff
|