In recent projects, we need to study the speech recognition function. It is very interesting to find a lot of materials to learn. This article is recorded by referring to an article on the Internet, google speech recognition engine is primarily used from the user's perspective and has nothing to do with code.
Voice Search websites are quite useful, but Chrome is required !!!
Web site: http://slides.html5rocks.com/#speech-input
1. Prepare necessary software: cmd.exe and wget.exe. (The previous one is for transcoding, and the later one is for HTTP to submit and receive data. Put the two in the root directory of the d disk for testing)
2. First install a WAV recording software. You can also use the built-in Windows software. First, record and save the file name test.wav.
3. Open the command line, transfer it to disk D, and type:
> Cmd.exe-8-f -- Sample-rate = 16000 test.wav
This is to convert the test.wave file into a local file and save it in the current directory. The saved file name is test.flac.
Then, enter:
> Wget-o "googlespeechapi.txt" -- User-Agent = "Mozilla/5.0" --post-file=test.flac -- header = "Content-Type: Audio/X-Flac; rate = 16000" "http://www.google.com/speech-api/v1/recognize? Xjerr = 1 & client = chromium & lang = ZH-CN & maxresults = 1"
The test.example voice is converted into a local file and saved in googlespeechapi.txt:
{
"Status": 0,
"ID": "8f9d46231ac2dadee91d8d6ba1b57779-1 ",
"Hypotheses ":
[
{"Utterance": "That doesn't work.", "Confidence": 0.87555957}]
}
This is an early experience of using the Google speech recognition engine. It feels interesting, so let's record it.
Reference: http://hi.baidu.com/stoneforestwhu/item/84857330d9ccb102b2c0c55f
Source Address of this blog: Http://blog.csdn.net/ypist