gpt4 book ai didi

python - 有没有人使用过语音驱动的动画,你能让它工作吗?

转载 作者:行者123 更新时间:2023-12-04 23:22:23 24 4
gpt4 key购买 nike

我说的是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个小时,我什么都做不了,我没有想法。
如果你花时间帮助我,我从心底里感谢你。

最佳答案

  • 修复变量名framestill_frame
  • 修复 RuntimeWarning: Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work https://github.com/jiaaro/pydub/issues/348
  • 修复 AttributeError: 'BmpImageFile' object has no attribute 'ndim' https://github.com/DinoMan/speech-driven-animation/issues/11
  • 关于python - 有没有人使用过语音驱动的动画,你能让它工作吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63093114/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com