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

本文详细介绍了在Ubuntu 16.04上安装whisper-ctranslate2的过程,包括环境准备、Python与OpenSSL的安装、填坑环节如SSL模块问题、Perl模块缺失、_ctypes模块问题、证书问题,以及whisper-ctranslate2的安装和大模型下载。在安装过程中遇到了pkg-config、ModuleNotFoundError和torch版本等问题,都一一给出了解决方案。最后提到了whisper-ctranslate2的使用和测试情况。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

环境:系统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命令指向。icon-default.png?t=N7T8https://www.chua-n.com/2020/06/29/linux%E4%BB%8E%E6%BA%90%E7%A0%81%E5%AE%89%E8%A3%85python/

        这里不再详细介绍python安装过程,但注意执行.configure时加上参数--with-openssl指定openssl地址和--with-ssl-default-suites指定默认ssl是openssl。例如:</

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值