【问题标题】:Has anyone used the speech driven animation and can you make it work?有没有人使用过语音驱动的动画,你能让它工作吗?
【发布时间】:2020-07-25 20:11:29
【问题描述】:

我说的是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

标签: python python-3.x ffmpeg artificial-intelligence


【解决方案1】:
  1. 修正变量名framestill_frame

  2. 修复RuntimeWarning: Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work https://github.com/jiaaro/pydub/issues/348

  3. 修复AttributeError: 'BmpImageFile' object has no attribute 'ndim' https://github.com/DinoMan/speech-driven-animation/issues/11

【讨论】:

    猜你喜欢
    • 2023-03-20
    • 2016-04-17
    • 1970-01-01
    • 2016-06-26
    • 2017-04-26
    • 1970-01-01
    • 2017-06-21
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多