制作数字人
图像
Heygem:https://github.com/duixcom/Duix.Heygem
通过官方 readme 安装服务端
客户端
- 通过 npm 构建
- github 的发布
问题
TypeError: SQLite3 can only bind numbers, strings, bigints, buffers, and null
修改src\main\dao\f2f-model.js
const voiceIdInt = typeof voiceId === "boolean" ? (voiceId ? 1 : 0) : voiceId;
stmt.run(modelName, videoPath, audioPath, voiceIdInt, Date.now());
也有可能是视频问题
音频
index-tts:https://github.com/index-tts/index-tts
利用 docker compose 快速构建
-
拉取源码
git clone git@github.com:index-tts/index-tts.git
-
进入文件夹
cd index-tts
-
下载模型
模型地址:https://huggingface.co/IndexTeam/IndexTTS-1.5
wget https://huggingface.co/IndexTeam/IndexTTS-1.5/resolve/main/bigvgan_discriminator.pth -P checkpoints wget https://huggingface.co/IndexTeam/IndexTTS-1.5/resolve/main/bigvgan_generator.pth -P checkpoints wget https://huggingface.co/IndexTeam/IndexTTS-1.5/resolve/main/bpe.model -P checkpoints wget https://huggingface.co/IndexTeam/IndexTTS-1.5/resolve/main/dvae.pth -P checkpoints wget https://huggingface.co/IndexTeam/IndexTTS-1.5/resolve/main/gpt.pth -P checkpoints wget https://huggingface.co/IndexTeam/IndexTTS-1.5/resolve/main/unigram_12000.vocab -P checkpoints wget https://huggingface.co/IndexTeam/IndexTTS-1.5/resolve/main/config.yaml -P checkpoints
-
创建 docker 构建文件
Dockerfile
FROM continuumio/miniconda3 # 创建 conda 环境并安装依赖 RUN conda create -n index-tts python=3.10 -y && \ echo "conda activate index-tts" >> ~/.bashrc SHELL ["/bin/bash", "-c"] ENV PATH /opt/conda/envs/index-tts/bin:$PATH # 安装 ffmpeg 和必要依赖 RUN conda install -n index-tts -c conda-forge ffmpeg pynini==2.1.6 -y && \ pip install torch torchaudio --index-url https://download.pytorch.org/whl/cu118 # 设置工作目录(必须与 docker-compose 中一致) WORKDIR /app
-
创建 docker 启动文件
docker-compose.yml
version: "3.8" services: indextts: build: context: . ports: - "7860:7860" volumes: - ./:/app/ working_dir: /app command: ["python", "webui.py"]
-
启动
docker compose up -d