- Install dependencies:
pip install -r requirements.txt- Ensure you have the required assets in the
assets/directory
Run the application with all 4 avatar views in one window:
python main.pyRun the application with a second window showing only the front-facing avatar:
python main.py --second-window--second-window: Enable a second window with a centered front-facing avatar view- The second window runs in a separate process
- Both windows are synchronized and show the same avatar talking in sync
- The second window is half the size of the main window (900x500)
The application exposes a web server on port 5001 for sending messages to the avatar.
POST /post-message
Headers:
Content-Type: application/json
Body:
{
"text": "Your message here"
}curl -X POST http://localhost:5001/post-message \
-H "Content-Type: application/json" \
-d '{"text": "Hello, I am your virtual assistant!"}'Edit main.py to customize the avatar:
avatar_manager = AvatarManager(
character_name="clerk", # Character asset folder name
frames_count=10, # Number of animation frames
scale=0.7, # Avatar scale
is_front_only=False, # Use all 4 directions
speed_talking=70, # Animation speed when talking (ms)
speed_idle=100 # Animation speed when idle (ms)
)