# 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