Replies: 1 comment 2 replies
-
可以补充到readme吗?发起pr即可 |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
注:因为整套环境都是按x86-64搭的,也就是没办法用M1跑训练,这个是我仅作为应用在inference time不改代码的workaround。如果想兼顾,就抛弃可视化pyqt5或者改用tkinter,然后安装pytorch最新的nightly版本。
我看Readme里面写到支持macOS M1,但是原paper,Real-time voice cloning里面的ui用的就是pyqt5,而pyqt5不支持m1,所以不确定其他人怎么做的,我在网上查到的几步workaround:
一、安装PyQt5
参考这个链接,终端要支持Rosetta,然后用非homebrew的python搭建虚拟环境
二、安装pyworld和ctc-segmentation
这里两个文件在直接
pip install
的时候都找不到wheel,于是程序尝试从c里build,但找不到Python.h会报错brew install python
或者reinstall,brew的python自带Python.h
export CPLUS_INCLUDE_PATH=/opt/homebrew/Frameworks/Python.framework/Headers
把Python.h文件路径添加到环境变量里,对于M1的brew,安装路径是以上pip install pyworld
就可以了git clone https://github.com/lumaku/ctc-segmentation.git
github克隆,我是放在和MockingBird并列的层级里cd ctc-segmentation
进目录source /pathToMockingBird/venv/bin/activate
开MockingBird的虚拟环境(假设一开始没开的话)cythonize -3 ctc_segmentation/ctc_segmentation_dyn.pyx
/usr/bin/arch -x86_64 python setup.py build
用x86-64架构编译/usr/bin/arch -x86_64 python setup.py install --optimize=1 --skip-build
用x86-64架构安装/usr/bin/arch -x86_64 pip install torch torchvision torchaudio
我用pip安的pytorch,明确架构是x86pip install -r requirements.txt
deactivate
三、运行
参考这个链接,让项目跑在x86架构上
上面是我用的方法,如果有更好的解决方案欢迎提出
Beta Was this translation helpful? Give feedback.
All reactions