[Android development and learning 45] Google speech recognition engine (Google Speech API)

Source: Internet
Author: User

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

 


 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.