Use python SDK to realize Baidu speech recognition
1. Function description
Python SDK implements speech recognition and REST API ( the function introduced in the previous article ). The function is basically the same. It can only recognize speech files (specific audio formats). Of course, Baidu also provides semantic analysis and real-time speech recognition (it should be a few days later) I will come out and share with you)
2. Open Baidu voice technology interface service
For detailed steps, see: https://blog.csdn.net/weixin_45386875/article/details/113482662?spm=1001.2014.3001.5502
Three, operation steps
(1) Download the SDK (note that the package name in the package is aip not api. Don’t make a mistake when calling it. I made this mistake and couldn’t find it, laughing to death)
(2) pip install baidu-aip**
Or cd to the sdk, then**python setup.py install
(3) Create a new baiduvoice_SDK.py file to write the calling program (there is a brief example in the technical document), and place it in the sdk folder.
(4) Minor changes, Client.asr will return the result of speech recognition in json format.
4. Source code
https://download.csdn.net/download/weixin_45386875/14981986
For the calls of other Baidu API series, please refer to https://blog.csdn.net/weixin_45386875/article/details/113705329