我说的是this repo .我安装了所有依赖项,但无法使其工作。非常感谢任何帮助(:
我正在运行 python 3.7.5。
这是我的代码:
import sda
import scipy.io.wavfile as wav
from PIL import Image
va = sda.VideoAnimator(gpu=0, model_path="crema")# Instantiate the animator
fs, audio_clip = wav.read("example/audio.wav")
still_frame = Image.open("example/image.bmp")
vid, aud = va(frame, audio_clip, fs=fs)
va.save_video(vid, aud, "generated.mp4")
可悲的是它似乎不起作用,它给了我这个错误:Warning (from warnings module):
File "C:\Users\Alex\AppData\Local\Programs\Python\Python37\lib\site-packages\pydub\utils.py", line 170
warn("Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work", RuntimeWarning)
RuntimeWarning: Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work
Traceback (most recent call last):
File "C:\Users\Alex\Desktop\test\test.py", line 8, in <module>
vid, aud = va(frame, audio_clip, fs=fs)
NameError: name 'frame' is not defined
花了大约2个小时,我什么都做不了,我没有想法。如果你花时间帮助我,我从心底里感谢你。
最佳答案
frame
或 still_frame
RuntimeWarning: Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work
https://github.com/jiaaro/pydub/issues/348AttributeError: 'BmpImageFile' object has no attribute 'ndim'
https://github.com/DinoMan/speech-driven-animation/issues/11关于python - 有没有人使用过语音驱动的动画,你能让它工作吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63093114/