使用whisper实现语音转文本

项目地址:GitHub - openai/whisper: Robust Speech Recognition via Large-Scale Weak Supervision

1、需要py3.8环境

conda activate p38

2、安装

pip install -U openai-whisper

3、下载项目

 pip install git+https://github.com/openai/whisper.git

4、安装whisper

pip install --upgrade --no-deps --force-reinstall git+https://github.com/openai/whisper.git这个过程需要很长时间,耐心等等

5、安装ffmpeg

brew install ffmpeg

6、安装setuptools-rust

pip install setuptools-rust

7、测试

whisper --help

8、测试语音转文本

whisper test.m4a  --language  zh

会逐步输出语音的内容

你可能感兴趣的:(whisper)