Navigation

    蓝鲸ROS机器人论坛

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Popular
    ROS交流群
    ROS Group
    产品服务
    Product Service
    开源代码库
    Github
    官网
    Official website
    技术交流
    Technological exchanges
    激光雷达
    LIDAR
    ROS教程
    ROS Tourials
    深度学习
    Deep Learning
    机器视觉
    Computer Vision

    modelscope环境安装

    技术交流
    paraformer asr modelscope
    1
    1
    114
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • weijiz
      weijiz last edited by

      modelscope是阿里出的深度学习平台。里面有很多很有用的模型,比如其中的语音识别功能,经过测试效果非常好。能够达到商用级别。官方的环境安装文档有问题。下面是我自己摸索的安装过程。

      创建virtualenv

      环境是ubuntu 20.04 默认的python版本为3.8

      virtualenv venv
      

      安装tensorflow-gpu

      source venv/bin/activate
      pip install nvidia-tensorflow==1.15.5+nv22.07 -i https://pypi.tuna.tsinghua.edu.cn/simple
      

      这一步要注意其中的版本,这个版本是和下面torch相冲突比较少的,但是还是有冲突

      安装torch

      pip install torch torchvision torchaudio -i https://pypi.tuna.tsinghua.edu.cn/simple
      

      安装modelscope相关库

      pip install "modelscope[audio]" -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html -i https://pypi.tuna.tsinghua.edu.cn/simple
      

      重新安装numpy

      由于numpy版本之间的冲突会导致numpy安装失败,执行下面的指令再次安装

      pip install numpy==1.20.3 -i https://pypi.tuna.tsinghua.edu.cn/simple
      

      至此安装完成可以尝试运行下面的脚本测试是否正确安装

      from modelscope.pipelines import pipeline
      from modelscope.utils.constant import Tasks
      
      inference_16k_pipline = pipeline(
          task=Tasks.auto_speech_recognition,
          model='damo/speech_UniASR-large_asr_2pass-zh-cn-16k-common-vocab8358-tensorflow1-offline')
      
      rec_result = inference_16k_pipline(audio_in='https://modelscope.oss-cn-beijing.aliyuncs.com/test/audios/asr_example.wav')
      print(rec_result)
      
      1 Reply Last reply Reply Quote 0
      • First post
        Last post
      Copyright © 2015-2021 BlueWhale community