曹旭辉 发表于 2024-7-31 00:29:11

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

环境:体系ubuntu16.04,显卡是NVIDIAQuadro 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.https://i-blog.csdnimg.cn/blog_migrate/003a2ce7eb50c2e24a8c624c260c5930.pnghttps://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.https://i-blog.csdnimg.cn/blog_migrate/003a2ce7eb50c2e24a8c624c260c5930.pnghttps://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下令指向。https://i-blog.csdnimg.cn/blog_migrate/003a2ce7eb50c2e24a8c624c260c5930.pnghttps://www.chua-n.com/2020/06/29/linux%E4%BB%8E%E6%BA%90%E7%A0%81%E5%AE%89%E8%A3%85python/
         这里不再具体

免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
页: [1]
查看完整版本: ubuntu16.04安装语音识别whisper及whisper-ctranslate2工具(填坑篇)