ubuntu16.04安装语音识别whisper及whisper-ctranslate2工具(填坑篇)

环境:系统ubuntu16.04,显卡是NVIDIA  Quadro RTX5000

目标:安装语音识别工具whipser/whipser-ctranslate2

        因之前有过几次在linux和windows上有过部署whisper经验和使用经验,其中有使用GPU的,有CPU的,各自语音识别效率一言难尽,建议直接装whipser-ctranslate2。同时,感谢B站博主的(Windows系统 Whisper(OpenAI) 安装指南(全局python环境) – 哔哩哔哩)这篇文章曾给我一些启发,有需求的小伙伴可以先参考这篇文章了解一下。

一、whipser-ctranslate2介绍

        whipser-ctranslate2是相比whipser而言,识别速率更快,占用内存空间更小的语音识别工具,GitHub使用介绍参见:

GitHub – Softcatala/whisper-ctranslate2: Whisper command line client compatible with original OpenAI client based on CTranslate2.Whisper command line client compatible with original OpenAI client based on CTranslate2. – GitHub – Softcatala/whisper-ctranslate2: Whisper command line client compatible with original OpenAI client based on CTranslate2.icon-default.png?t=N7T8https://github.com/Softcatala/whisper-ctranslate2

    faster-whisper是使用CTranslate2重新实现 OpenAI 的 Whisper 模型,CTranslate2 是 Transformer 模型的快速推理引擎。比whisper快 4 倍,但使用的内存更少,且具有相同的精度。GitHub使用介绍参见:

GitHub – SYSTRAN/faster-whisper: Faster Whisper transcription with CTranslate2Faster Whisper transcription with CTranslate2. Contribute to SYSTRAN/faster-whisper development by creating an account on GitHub.icon-default.png?t=N7T8https://github.com/SYSTRAN/faster-whisper

        Github介绍whipser-ctranslate2是一个基于faster-whisper的命令行客户端,与openai/whisper的原始客户端兼容。在这里只介绍一下whipser-ctranslate2的安装过程和踩坑。

二、准备环境

说明:我这里没有通过conda/anaconda建立虚拟环境安装python等,是直接在系统上安装的。两种方式各有各的优点,这里不赘述。

1. Python版本

        必须是3.8及以上高版本。安装过程可以参考这篇博客:linux 下从源码安装 Python——小白踩坑记 | 这里是川!实验室服务器使用的系统为 Ubuntu 16.04,自带的 python 版本为 Python 2.7.12 和 Python 3.5.2,命令行下使用$ python命令来启动 python 时默认是 python2.7。而我想使用 Python 3.8,因此尝试从源码安装 Python,并更改默认的$ python命令指向。

版权声明:本文为博主作者:腊八粥2022原创文章,版权归属原作者,如果侵权,请联系我们删除!

原文链接:https://blog.csdn.net/yangyi139926/article/details/135110390

共计人评分,平均

到目前为止还没有投票!成为第一位评论此文章。

(0)
乘风的头像乘风管理团队
上一篇 2024年1月11日
下一篇 2024年1月11日

相关推荐