Android offline speech recognition (Pocketsphinx)

Source: Internet
Author: User

Recently done projects, using offline speech recognition, the whole long time, check a lot of methods, and finally completed, the online information a bit chaotic, and most of those people wrote, a group of people turn! Below I summarize, also for later people to do a convenient.


about the environment configuration I will not say, I just follow this tutorial step by step, is absolutely feasible. http://gaebolg.blog.163.com/blog/static/19826906820136232810723/



The following highlights the operation of the demo and the configuration of The Voice library ( Note: The above tutorial run demo last write a mess, you can start from the copy acoustic model and voice library to see my !) )


First, the demo run requires the following files:pocketsphinx/model/en_us under the LM folder ( . dic file, . lm files), and the hmm folder. If you feel trouble, you can download the files I provided. http://download.csdn.net/detail/u011747781/8034061


Here's how to set up your own Chinese voice library:

1. Write your own command set:

Create a new TXT file and enter the command, such as:


Baidu
Google

Click File, Save As, note to change the encoding to UTF-8 format! (just below the encoding option) is saved as a TXT file.

2. Using online tools http://www.speech.cs.cmu.edu/tools/lmtool.html write the TXT file to generate the file. Download tgz file can (there are all files), copy tgz compressed the LM file in the package, because only this useful (if it is English, dic file can be used directly, you do not have the method I described below to generate the dic file!! )


3. Create a new TXT file. In the Data folder I gave, there is a file called Standard.dic, which is the standard voice library, ctrl+f find the pronunciation you need to copy into your new TXT file.

The format is as follows:

Baidu B ai D u

After that, save as UTF-8 format and rename the. dic file.


4, this belongs to your voice library is built, just overwrite my Data folder corresponding DIC, LM file can!


Finally, the full demo http://download.csdn.net/detail/u011747781/8034195 is available on the Pro test


Android offline speech recognition (Pocketsphinx)

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.