-
Notifications
You must be signed in to change notification settings - Fork 869
windows环境安装
- anaconda历史版本下载地址,选择相应的版本安装:https://repo.anaconda.com/archive/
- 安装anaconda时注意勾选环境变量:
- 安装完成后,点击anaconda prompt命令窗口:
- 运行命令: conda config --set show_channel_urls yes
- 打开user下文件 .condarc,把里面的内容替换为清华源:
channels:
- [http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/](http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/)
- [http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/menpo/](http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/menpo/)
- [http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/](http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/)
- [http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/](http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/)
- [http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/](http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/)
- [http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/](http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/)
- [http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/](http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/)
show_channel_urls: true
- 生成虚拟环境: conda create -n funasr python=3.7 conda activate funasr
- 参考地址:https://pytorch.org/get-started/locally/:
- CPU:
conda install pytorch torchvision torchaudio cpuonly -c pytorch
- GPU(请确认本地cuda版本):
conda install pytorch torchvision torchaudio pytorch-cuda=11.6 -c pytorch -c nvidia
- 详见 Download for Windows; 使用 git bash clone funasr; https://aliyuque.antfin.com/lzr265946/gqqb6z/zqglpgpv2pcisg36?singleDoc# 《FunASR for Windows》
git clone https://github.com/alibaba/FunASR.git && cd FunASR pip install --editable ./
- 报错1:
- ctc-segmentation (因为没有编译环境,所以编译失败了)
Building wheel for ctc-segmentation (pyproject.toml) ... error error: subprocess-exited-with-error × Building wheel for ctc-segmentation (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [12 lines of output] running bdist_wheel running build running build_py creating build creating build\lib.win-amd64-cpython-37 creating build\lib.win-amd64-cpython-37\ctc_segmentation copying ctc_segmentation\ctc_segmentation.py -> build\lib.win-amd64-cpython-37\ctc_segmentation copying ctc_segmentation\partitioning.py -> build\lib.win-amd64-cpython-37\ctc_segmentation copying ctc_segmentation_init_.py -> build\lib.win-amd64-cpython-37\ctc_segmentation running build_ext building 'ctc_segmentation.ctc_segmentation_dyn' extension error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/ [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for ctc-segmentation
- 解决方案:
安装Microsoft Build Tools for Visual Studio,在 Build Tools 中,安装“使用C++的桌面开发”并确保安装详细信息的两项勾选:MSVC生成工具、windows SDK
conda create -n modelscope python=3.7 conda activate modelscope conda install pytorch torchvision torchaudio cpuonly -c pytorch 详细安装步骤见上; ,
git clone http://gitlab.alibaba-inc.com/Ali-MaaS/MaaS-lib.git cd MaaS-lib git checkout dev/audio_dep
- 先安装MaaS-lib框架的依赖,运行: pip install -r requirements.txt -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html
- 然后安装asr的依赖,运行:pip install -r requirements/audio_asr.txt -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html
后续maas同学会支持 pip install ".[audio_xxx]" 这种安装方式
在MaaS-lib目录下可以运行demo脚本 python demo.py
不同平台docker安装详见 https://docs.docker.com/desktop/
lyblsgo/funasr:0.1.7-torch1.13.1-py3.7-ubuntu20.04
lyblsgo/funasr:0.1.7-torch1.13.1-cu116-py3.7-ubuntu20.04 docker pull lyblsgo/funasr:0.1.7-torch1.13.1-py3.7-ubuntu20.04 docker run -it lyblsgo/funasr:0.1.7-torch1.13.1-py3.7-ubuntu20.04 /bin/bash