最近闲着没事儿,接触到了语音识别,感觉挺好玩。首先介绍一下软件下载和入门知识,哈哈哈哈,希望可以坚持学下去。
安装:首先我是在虚拟python环境中试着玩玩的
1.创建虚拟环境:win+R:conda create -n voice python=3.6
2.安装需要的包:pip install speechrecognition》》》》》》》》pip install pywin32》》》》》》》》pip install pyttsx3》》》》》》》》https://www.lfd.uci.edu/~gohlke/pythonlibs/#pocketsphinx下载对应版本的pocketsphinx 然后:pip install 对应版本的whl文件,再pip install pocketsphinx》》》》》》》》https://sourceforge.net/projects/cmusphinx/ 下载 Mandarin,解压,然后:把解压出来的zh_cn.cd_cont_5000文件夹重命名为acoustic-model、zh_cn.lm.bin命名为language-model.lm.bin、zh_cn.dic中dic改为dict格式.然后将所有文件复制到对应环境的Libsite-packagesspeech_recognitionpocketsphinx-datazh-CN中,zh-CN文件是自己建的。
OK,基础环境就迅速建好了,可以愉快的学习了:
1.recognize_bing()
recognize_google()
recognize.google_cloud()
recognize.houndify()
recognize_ibm()
recognize_sphinx()
recognize_wait()