DinoMan / speech-driven-animation

947 stars 289 forks source link

AttributeError: 'BmpImageFile' object has no attribute 'ndim' #11

Open erjihaoshi opened 5 years ago

erjihaoshi commented 5 years ago

when i successfully import torchaudio in google colab ,but i get error AttributeError: 'BmpImageFile' object has no attribute 'ndim', Does anyone konw how to fix it ?

erjihaoshi commented 5 years ago

in sda.py at def call(self, img, audio, fs=None, aligned=False): you should change first else:

        frame = np.array(img)

or you just run : import sda import scipy.io.wavfile as wav from PIL import Image va = sda.VideoAnimator(gpu=0)# Instantiate the aminator fs, audio_clip = wav.read("example/audio.wav")

frame = Image.open("example/image.bmp")

frame = "example/image.bmp" vid, aud = va(frame, audio_clip, fs=fs)