赞
踩
Audio2Face是一种语音驱动表情的技术,该技术可以将语音实时转换成表情blendshape动画。这样做的原因是在现行的产业中,用BS去驱动数字形象的动画表情仍然是主流。方便动画艺术家对最终动画产出最艺术调整,传输的数据量小,方便动画在不同的数字形象之间进行传递等等。
该项目需要在Windows环境下运行,按照项目中的readme一步一步操作。
在conda中搭建一个虚拟环境用于运行此项目,由readme中的Dependences可得需要安装的软件和依赖库如下:
- tersorflow-gpu 1.15 cuda 10.0
-
- python-libs: pyaudio requests websocket websocket-client
之后就一路next,完成后,打开Anaconda Promt输入nvcc -version或nvcc -V,查看安装 结果,出现如下显示则表示安装成功。
- nvcc: NVIDIA (R) Cuda compiler driver
- Copyright (c) 2005-2018 NVIDIA Corporation
- Built on Sat_Aug_25_21:08:04_Central_Daylight_Time_2018
- Cuda compilation tools, release 10.0, V10.0.130
- C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\libnvvp
- C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\bin
- C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\extras\CUPTI\libx64
- C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\lib\x64
conda create -n Audio2Face_env python=3.6
命名为 Audio2Face_env,这里使用的Python版本为3.6,随后激活环境
conda activate Audio2Face_env
conda install tensorflow-gpu=1.15.0
安装完成后测试,依次输入以下命令
- //使用python
- python
-
-
- //测试代码,一行一行输入
- import tensorflow as tf
- a = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[2, 3], name=‘a’)
- b = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[3, 2], name=‘b’)
- c = tf.matmul(a, b)
- sess = tf.Session(config=tf.ConfigProto(log_device_placement=True))
- print(sess.run( c ))
-
-
运行完的结果如下,则证明安装成功
- MatMul: (MatMul): /job:localhost/replica:0/task:0/device:GPU:0
- 2022-05-12 01:55:15.573018: I tensorflow/core/common_runtime/placer.cc:54] MatMul: (MatMul): /job:localhost/replica:0/task:0/device:GPU:0
- a: (Const): /job:localhost/replica:0/task:0/device:GPU:0
- 2022-05-12 01:55:15.579136: I tensorflow/core/common_runtime/placer.cc:54] a: (Const): /job:localhost/replica:0/task:0/device:GPU:0
- b: (Const): /job:localhost/replica:0/task:0/device:GPU:0
- 2022-05-12 01:55:15.590756: I tensorflow/core/common_runtime/placer.cc:54] b: (Const): /job:localhost/replica:0/task:0/device:GPU:0
- [[22. 28.]
- [49. 64.]]
- conda install pyaudio
-
- conda install requests
-
- conda install websocket
-
- conda install websocket-client
在安装websocket时出现了如下错误 - UnsatisfiableError: The following specifications were found
- to be incompatible with the existing python installation in your environment:
-
- Specifications:
-
- - websocket -> python[version='2.6.*|2.7.*']
-
- Your python: python=3.6
-
- If python is on the left-most side of the chain, that's the version you've asked for.
- When python appears to the right, that indicates that the thing on the left is somehow
- not available for the python version you are constrained to. Note that conda will not
- change your python version to a different minor version unless you explicitly specify
- that.
随后用pip安装试一试
pip install websocket
在anaconda prompt里依次输入如下命令
- //进入test目录里
- F:
-
- cd cd FACEGOOD-Audio2Face\code\test\AiSpeech
-
- //激活环境
- activate Audio2Face_env
-
- //运行测试脚本
- python zsmeif.py
随后出现了错误
ImportError: cannot import name 'create_connection'
网上查找发现这是因为未安装websocket-client,但是我已经安装,最后发现必须得先安装websocket再安装 websocket-client,故执行以下命令即可
- //卸载
- pip uninstall websocket
- pip uninstall websocket-client
-
-
- //重新安装
- pip install websocket
- pip install websocket-client
继续执行测试代码,又出现如下错误
getaddrinfo failed
发现是网络未连接,连上网络即可,继续执行测试代码,出现“run main”,运行FaceGoodLiveLink.exe(在/example/ueExample/文件夹内),按住左键录制声音,但是ai没有回复,返回到命令窗口,发现成功录制声音,但是出现如下错误
- (0) Unknown: Failed to get convolution algorithm. This is probably because cuDNN failed to initialize, so try looking to see if a warning log message was printed above.
- [[{{node conv2d/Conv2D}}]]
- [[dense_1/BiasAdd/_5]]
- (1) Unknown: Failed to get convolution algorithm. This is probably because cuDNN failed to initialize, so try looking to see if a warning log message was printed above.
- [[{{node conv2d/Conv2D}}]]
网上查到这是cudnn内存开辟失败,随后在项目页面的issues里面发现同样的问题,作者回复显卡必须使用1060 6G以上才行,而笔者使用的电脑显卡配置是1050Ti 4G,无法满足要求,项目停滞。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。