1.升级pip
python3 -m pip install -U pip
2.安装vosk
python3 -m pip install -U vosk
3.直至成功安装,比如:
Successfully installed vosk-0.3.10
测试:
Running the example code with python
1.mkdir src
2.cd src
3.git clone https://github.com/alphacep/vosk-api
4.cd vosk-api/python/example
5.wget https://alphacephei.com/kaldi/models/vosk-model-small-en-us-0.3.zip
6.unzip vosk-model-small-en-us-0.3.zip
7.mv vosk-model-small-en-us-0.3 model
8.python3 ./test_simple.py test.wav
参考:https://alphacephei.com/vosk/install