Speech recognition speed version can identify intact audio files within 60 seconds as text. Used in near-field phrases, such as mobile phone voice search, chat input and other scenes. Support upload a complete recording file, the recording file is not more than 60 seconds. Real-time returning the identification result. This paper mainly introduces Baidu voice recognition to implement the read and write function of the applet.
1 System Frame
The techniques for use include: Baidu Voice Recognition and WeChat applet. Recording Manager RecorderManager provided by WeChat implements recording, recording format AAC. The applet submits the voice uploaded voice to Baidu voice certificate identification service, returns text information and displayed. All functions are completed in the applet, do not require the server, suitable for personal developers to learn debugging, and also provide the corresponding solution for business applications. 2 Create a small program item
In the global profile app.json, the “Pages / ASR / ASR” is automatically created, the related page file is created. The structure is as follows:
ASR.JS: Function logic module ASR.WXSS: page style file
ASR.WXML: page layout file
- ASR.JSON: Page Profile
3 Call speech recognition speed version API
3.1 First, create an app at the console, call the speech recognition speed version API, “Get the API Key / Secret Key”.
Send request parameters in Body, parameter details are as follows:
3.2 Speech recognition speed version of the function
(1) Send URL Request Core Code
(2) Defining Buttons Click Events
(4) Modify page style file
here this article about AI small program voice Have a written article introduced this, more related AI dedicated voice listening, please search for Tumi cloud previous articles or continue to browse the following related articles I hope you will support Tumi cloud!