faster-whisper wrap module for me
Go to file
2024-10-21 11:04:46 +08:00
conf first commit 2024-10-21 11:04:46 +08:00
README.md first commit 2024-10-21 11:04:46 +08:00
run.sh first commit 2024-10-21 11:04:46 +08:00
zmq_client.py first commit 2024-10-21 11:04:46 +08:00
zmqfw.py first commit 2024-10-21 11:04:46 +08:00

faster-whisper

这个比openai-whisper要快

创建虚拟环境

mkdir ve
python3 -m venv ~/ve/fw

安装

source ~/ve/fw/bin/activate
pip install nvidia-cublas-cu12 nvidia-cudnn-cu12

export LD_LIBRARY_PATH=`python -c 'import os; import nvidia.cublas.lib; import nvidia.cudnn.lib; print(os.path.dirname(nvidia.cublas.lib.__file__) + ":" + os.path.dirname(nvidia.cudnn.lib.__file__))'`
pip install faster-whisper

运行

创建一个run.sh

#!/bin/sh

r=$HOME/ve/fw/bin/python
export LD_LIBRARY_PATH=`$r -c 'import os; import nvidia.cublas.lib; import nvidia.cudnn.lib; print(os.path.dirname(nvidia.cublas.lib.__file__) + ":" + os.path.dirname(nvidia.cudnn.lib.__file__))'`
$r $*

执行服务

./run.sh zmqfw.py

执行客户端

./run.shzmq_client.py