本地部署OpenAvatarChat实时交互数字人系统

1、依赖环境:

CUDA 12.4
Git LFS
UV

Ubuntu下在命令行中执行:
curl -LsSf https://astral.sh/uv/install.sh | sh

  • 2、代码下载:

    git clone https://github.com/HumanAIGC-Engineering/OpenAvatarChat.git

    cd OpenAvatarChat

    git submodule update --init --recursive

    3、创建并激活虚拟环境:

    uv venv --python 3.11.11

    source .venv/bin/activate

    uv pip install setuptools pip

    4、创建环境变量 .env
    (在阿里百炼上申请一个Api Key)

    DASHSCOPE_API_KEY='xxxx2222sssdddd'

    5、创建SSH证书

    bash scripts/create_ssl_certs.sh

    6、下载所需的数字人,需在项目文件夹「根目录」下运行:

    (LiteAvatar数字人)
    bash scripts/download_liteavatar_weights.sh

    (LAM数字人)
    git clone --depth 1 https://www.modelscope.cn/AI-ModelScope/wav2vec2-base-960h.git ./models/wav2vec2-base-960h
    wget https://virutalbuy-public.oss-cn-hangzhou.aliyuncs.com/share/aigc3d/data/LAM/LAM_audio2exp_streaming.tar -P ./models/LAM_audio2exp/
    tar -xzvf ./models/LAM_audio2exp/LAM_audio2exp_streaming.tar -C ./models/LAM_audio2exp && rm ./models/LAM_audio2exp/LAM_audio2exp_streaming.tar

    (MuseTalk数字人)
    bash scripts/download_musetalk_weights.sh

    7、安装所需的依赖库:


    uv run install.py --uv --config <配置文件的绝对路径>.yaml
    ./scripts/post_config_install.sh --config <配置文件的绝对路径>.yaml

    如:
    ./scripts/post_config_install.sh --config ./config/chat_with_openai_compatible_bailian_cosyvoice_musetalk.yaml

    8、对于使用MuseTalk数字人的还需要执行:

    uv pip uninstall mmcv

    uv run mim install mmcv==2.2.0 --force

    9、运行数字人程序,启动本地服务:

    uv run src/demo.py --config <配置文件的绝对路径>.yaml


    ****************************************************


    使用LiteAvatar数字人时,需要修改.yaml配置文件,将

    -----------------------------------------

    LiteAvatar: avatar_name: 20250408/xxxx


    -----------------------------------------

    数字人形象库参看: https://modelscope.cn/models/HumanAIGC-Engineering/LiteAvatarGallery/file/view/master/20250408%2Favatar.md?status=1 https://modelscope.cn/models/HumanAIGC-Engineering/LiteAvatarGallery/file/view/master/20250612%2Favatar.md?status=1



    评论

    此博客中的热门博文

    通过命令行在Github上发布项目的新版本

    利用GitHub免费的静态页面托管空间发布网页