Rudrabha / Wav2Lip

This repository contains the codes of "A Lip Sync Expert Is All You Need for Speech to Lip Generation In the Wild", published at ACM Multimedia 2020. For HD commercial model, please try out Sync Labs
https://synclabs.so
10.79k stars 2.29k forks source link

> 应该是librosa版本的问题,但是老版本的安装上不上,我一直很苦恼怎么解决这个问题 #655

Open hanhan-20240326 opened 7 months ago

hanhan-20240326 commented 7 months ago
          > 应该是librosa版本的问题,但是老版本的安装上不上,我一直很苦恼怎么解决这个问题

修复此问题不走:

  1. 修改依赖版本号: librosa==0.10.1 numpy==1.24.3 opencv-contrib-python>=4.2.0.34 opencv-python>=4.7.0.72 torch==1.11.0 torchvision==0.12.0 tqdm==4.45.0 numba==0.59.0
  2. 修改audio.py 第一百行代码: return librosa.filters.mel(sr=hp.sample_rate, n_fft=hp.n_fft, n_mels=hp.num_mels, fmin=hp.fmin, fmax=hp.fmax)
    调整参数 在运行 就没问题了。

Originally posted by @TzyTman in https://github.com/Rudrabha/Wav2Lip/issues/634#issuecomment-1960632759

civen-cn commented 7 months ago

打日志定位到有个地方空转了。换python3.6能跑起来

ghost commented 6 months ago

打日志定位到有个地方空转了。换python3.6能跑起来

你怎么在python3.6上跑起来了,我在python3.6上,安装这几个总是报错opencv-contrib-python>=4.2.0.34,torch==1.1.0,torchvision==0.3.0

skynet-terminal commented 6 months ago

python 3.9.6版本,以下是运行项目导出(需要PATH添加ffmpeg目录路径)

venv\Lib\site-packages\librosa\util\decorators.py

from numba.decorators import jit as optional_jit

改成

from numba import jit as optional_jit

requeirements.txt

--extra-index-url https://download.pytorch.org/whl/cu118
audioread==3.0.1
certifi==2022.12.7
cffi==1.16.0
charset-normalizer==2.1.1
decorator==5.1.1
filelock==3.13.1
fsspec==2024.2.0
idna==3.4
Jinja2==3.1.3
joblib==1.4.2
librosa==0.7.0
llvmlite==0.42.0
MarkupSafe==2.1.5
mpmath==1.3.0
networkx==3.2.1
numba==0.59.1
numpy==1.26.4
opencv-contrib-python==4.9.0.80
opencv-python==4.9.0.80
pillow==10.3.0
pycparser==2.22
requests==2.28.1
resampy==0.4.3
scikit-learn==1.4.2
scipy==1.13.0
six==1.16.0
soundfile==0.12.1
sympy==1.12
threadpoolctl==3.5.0
torch==2.2.0+cu118
torchvision==0.17.0+cu118
tqdm==4.45.0
typing_extensions==4.11.0
urllib3==1.26.13

测试脚本

set ckpt="./checkpoints/wav2lip_gan.pth"
set face="./input/video.mp4"
set audio="./input/audio.wav"

set cmd=--face_det_batch_size 2 --wav2lip_batch_size 2

python inference.py --checkpoint_path %ckpt% --face %face% --audio %audio%  %cmd%
wangshuniguang commented 5 months ago

解决了,没解决可以Call我