Duix.Avatar AI Avatar Toolkit

repository·main·Indexed 12 days ago

https://github.com/duixcom/duix-avatar

An open-source toolkit for creating high-fidelity AI avatars through offline video generation. It enables cloning of human appearance and voice to drive digital humans via text or audio, featuring integrated TTS, ASR, and video generation services. Version 1.0.6 requires an NVIDIA GPU and Docker with NVIDIA Container Toolkit.

Tokens
7K
Snippets
17
Records
29
Agent score
95%

What's inside Duix.Avatar

  1. Overview of Duix.Avatar

    main

    Duix.Avatar is an open-source AI avatar toolkit designed for offline video generation and digital human cloning. It allows users to clone their appearance and voice using a short video (approximately 10 seconds) and then drive the digital avatar using text or uploaded audio to generate talking-head videos.

    Core Capabilities

    • Appearance & Voice Cloning: High-precision capture of facial features and vocal characteristics.
    • Text & Audio Driving: Uses NLP to convert text to speech or accepts audio input to synchronize lip movements and expressions.
    • Efficient Video Synthesis: Synchronizes video frames with audio for natural lip-syncing.
    • Multi-language Support: Supports English, Japanese, Korean, Chinese, French, German, Arabic, and Spanish.
    • Offline Operation: Designed for local deployment to ensure privacy and data security.
  2. Compare Duix.Avatar Open Source vs. API Service

    main

    Duix.Avatar offers two primary ways to use its technology depending on your technical expertise and business needs:

    FeatureDuix.Avatar Open Source (Local)Digital Human/Clone API Service
    Target UserTechnical users / DevelopersBusiness users / Application developers
    Technical BarrierRequires deep learning framework experienceLow (Fast business integration)
    HardwareRequires GPU serverNo GPU server required
    CustomizationFull control (modify/extend source code)Limited to provided API interfaces
    SupportCommunity supportProfessional technical response team
    MaintenanceHigh maintenance costLow maintenance cost
    Visual QualityUsable resultsStunning and high-definition
    Commercial UseFree (Requires license if >100k users or >$10M revenue)Supported
    Update SpeedSlower (Community dependent)Fast (Priority access to latest models)
  3. Compare Local Deployment vs. Cloud API Service

    main

    Duix Avatar offers two distinct ways to use the technology:

    FeatureDuix.Avatar Open Source Local DeploymentDigital Human/Clone Voice API Service
    Best ForTechnical users/DevelopersBusiness users/Rapid integration
    HardwareRequires purchase of GPU serverNo GPU server needed
    CustomizationFull control; can modify/extend codeLimited to API-provided interfaces
    MaintenanceHigh maintenance costSimple maintenance
    Lip SyncUsable effectStunning/High definition effect
    CommercialFree for most (requires license if >100k users or >$10M revenue)Commercial use allowed

    For enterprise-level SLA and high-definition effects, use the Digital Human/Clone Voice API Service via https://docs.duix.com.

  4. Install Duix.Avatar on Ubuntu 22.04

    main

    Duix.Avatar is tested on Ubuntu 22.04. It requires an NVIDIA GPU and Docker with NVIDIA Container Toolkit.

    Hardware Requirements

    • GPU: NVIDIA graphics card (RTX 4070 recommended).
    • RAM: 32GB or more (required).
    • Storage: >100GB free space.

    Step 1: Install Docker and Drivers

    1. Install Docker and Docker Compose:
      sudo apt update
      sudo apt install docker.io
      sudo apt install docker-compose
    2. Install NVIDIA drivers and verify with nvidia-smi.

    Step 2: Install NVIDIA Container Toolkit

    This is required for Docker to access the GPU.

    1. Add the repository:
      distribution=$(. /etc/os-release;echo $ID$VERSION_ID) \
        && curl -s -L https://nvidia.github.io/libnvidia-container/gpgkey | sudo apt-key add - \
        && curl -s -L https://nvidia.github.io/libnvidia-container/$distribution/libnvidia-container.list | sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list
    2. Install the toolkit:
      sudo apt-get update
      sudo apt-get install -y nvidia-container-toolkit
    3. Configure Docker runtime:
      sudo nvidia-ctk runtime configure --runtime=docker
      sudo systemctl restart docker

    Step 3: Install the Server

    1. Navigate to the /deploy directory.
    2. Run the Linux compose file:
      docker-compose -f docker-compose-linux.yml up -d

    Step 4: Install the Client

    1. Download the .AppImage from the official releases.
    2. Run the AppImage. Note: If running as root on the desktop, you must use the --no-sandbox flag:
      ./Duix.Avatar-x.x.x.AppImage --no-sandbox
    # Install Docker components on Ubuntu
    sudo apt update
    sudo apt install docker.io docker-compose
    
    # Deploy the server
    cd /deploy
    docker-compose -f docker-compose-linux.yml up -d
    
    # Run client as root if necessary
    ./Duix.Avatar-x.x.x.AppImage --no-sandbox
  5. Train a Voice Model

    main

    Prepare a voice model for cloning by following these steps:

    1. Prepare Data: Separate your source video into a silent video and its corresponding audio track.
    2. Organize Files: Place the audio files in the designated data directory. By default, this is D:\duix_avatar_data\voice\data (aligned with the guiji2025/fish-speech-ziming service), but this can be modified in your docker-compose configuration.
    3. Execute Training: Call the Model Training API (refer to src/main/service/model.js for implementation details).
    4. Capture Results: Record the API response. You will need the returned asr_format_audio_url and reference_audio_text to perform subsequent Audio Synthesis tasks.
  6. Deploy Duix.Avatar for NVIDIA 50-series GPUs

    main

    If you are using an NVIDIA 50-series GPU (or 30/40-series users with CUDA 12.8), use the specialized deployment configuration which utilizes a preview version of PyTorch.

    Run the following command from the /deploy directory:

    cd /deploy
    docker-compose -f docker-compose-5090.yml up -d
  7. How to provide logs for support requests

    main

    When reporting an issue, provide detailed reproduction steps and error logs:

    • Client Logs: Follow the method shown in the project documentation (refer to the visual guide in the repository).
    • Server Logs: Locate the specific error in the logs, or access the three Docker services and use the "Copy" function to retrieve the log output.
  8. Install Duix.Avatar on Windows

    main

    Follow these steps to set up the Duix.Avatar server and client on Windows.

    Prerequisites

    • Disk Space:
      • D: Drive: >30GB free (used for digital human and work data storage).
      • C: Drive: >100GB free (used for service image files). If C: is insufficient, you can reconfigure the Docker storage location after installation.
    • System: Windows 10 19042.1526 or higher.
    • Hardware (Recommended):
      • CPU: 13th Gen Intel Core i5-13400F or better.
      • RAM: 32GB or more (Required).
      • GPU: NVIDIA RTX 4070 or better (NVIDIA GPU and correct drivers are required).

    Step 1: Setup WSL and Docker

    1. Check if WSL is installed: wsl --list --verbose. If not, install it using wsl --install.
    2. Update WSL: wsl --update.
    3. Download and install Docker Desktop for Windows.
    4. Run Docker and accept the terms (you can skip logging in).

    Step 2: Install the Server via Docker

    The server is installed using docker-compose located in the /deploy directory.

    1. Navigate to the /deploy directory.
    2. Run the standard installation:
      docker-compose up -d
      Note: To use the lite version, run: docker-compose -f docker-compose-lite.yml up -d.
    3. Wait approximately 30 minutes for downloads (~70GB). Success is indicated when three services appear in Docker (or one service Duix.Avatar-gen-video for the lite version).

    Step 3: Install the Client

    1. Download the official installer from GitHub Releases.
    2. Run Duix.Avatar-x.x.x-setup.exe to install.
    # Standard server installation
    cd /deploy
    docker-compose up -d
    
    # Lite version installation
    docker-compose -f docker-compose-lite.yml up -d
  9. Prerequisites for Duix.Avatar Deployment

    main

    Before deploying Duix.Avatar locally, ensure the following dependencies are installed on your system:

    1. Node.js: Version 18 or higher.
    2. Docker Images: You must pull the following required images:
      • guiji2025/fun-asr
      • guiji2025/fish-speech-ziming
      • guiji2025/duix.avatar
    docker pull guiji2025/fun-asr
    docker pull guiji2025/fish-speech-ziming
    docker pull guiji2025/duix.avatar
  10. Initialize the Duix Avatar Main Process

    main

    The src/main/index.js file serves as the entrypoint for the Electron main process. Upon startup, the application performs several critical initialization steps:

    1. Database Initialization: Calls initDB() to set up the local data storage.
    2. Interval Initialization: Calls initInterval() to manage background tasks or periodic operations.
    3. Service Registration: Executes registerHandler() to register core application services.
    4. Web Interface Registration: Executes registerWebHandles({ mainWindow }) to expose specific client interfaces to the renderer process.

    Developers extending the application should ensure that any new core services are registered within the app.whenReady() lifecycle to ensure the environment is fully prepared.