在Win端离线安装并运行Deepspeech
写给自己的小备忘录。

获取各种包
获取pip包:https://blog.csdn.net/weixin_42517466/article/details/113578841
获取python包:https://python-docx.readthedocs.io/en/latest/index.html
获取DeepSpeech包:https://github.com/mozilla/DeepSpeech/releases/tag/v0.9.3

获取numpy包:https://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy
下载的时候注意numpy的版本,具体参考下图


安装
详细安装过程见视频:https://www.youtube.com/watch?v=c_0Q3T0XYTA&t=155s
创建Deepspeech文件夹,将之前下载的包都放进来:
makedir 文件名(新建文件夹)
cd 文件目录(进入该文件夹)
创建虚拟空间:python -m venv .(注意不要遗漏“.”!)
激活虚拟空间:Scripts\activate
安装numpy:pip install numpy-XX.whl
注意使用pip命令时需要关闭网络代理
安装DeepSpeech:pip install deepspeech-XX.whl

使用: deepspeech --model deepspeech-0.9.3-models-zh-CN.pbmm --audio XX.wav --lm_alpha 0.931289039105002 --lm_beta 1.1834137581510284(中文推荐参数)

即时翻译麦克风的语言
下载文件 https://github.com/mozilla/DeepSpeech-examples

安装方法见链接:
https://github.com/mozilla/DeepSpeech-examples/tree/r0.9/mic_vad_streaming
操作步骤:
首先导航到该“mic_vad_streaming”下
pip install -r requirements.txt
python mic_vad_streaming.py -m XX\XX.pbmm -s XX\XX..scorer

Q&A
Microsoft Visual C++ 14.0 is required解决方法
https://zhuanlan.zhihu.com/p/126669852
file does not start with RIFF id & try 16000 HZ
https://www.aconvert.com/cn/audio/mp3-to-wav/