CMUSphinx PocketSphinx - 识别所有(或大量)的单词 [英] CMUSphinx PocketSphinx - Recognize all (or large amount) of words

查看:570
本文介绍了CMUSphinx PocketSphinx - 识别所有(或大量)的单词的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我尝试使用PocketSphinx for Android之前,我使用了Google的语音识别API。
我不需要设置搜索名称或字典文件。它只是认识到所有被告知的单词。



现在,在PocketSphinx中,我需要这样做。但是我只能找到如何设置一个字的识别,或者设置字典(演示项目中只有几个字),识别器认为这是唯一存在的词,这意味着如果有人说类似的话,识别器认为它在字典中列出的单词。



我只想问一下,我如何设置几个搜索名称,或者我如何设置它来识别所有的话可用(甚至大量的)?也许有人有一个大量字词的字典文件?

解决方案


在我尝试使用之前PocketSphinx for Android,我使用了Google的语音识别API。我不需要设置搜索名称或字典文件。它只是认识到每一个被告知的单词。


Google API也识别出一个很大但仍然有限的单词。很长时间以来,它无法识别Spotify。 Google离线语音识别器使用大约50k字,如出版物


我只想问一下,我如何设置几个搜索名称,或者我如何设置它能识别所有可用的词(甚至大量的)?也许有人有一个大量词汇的字典文件?


演示包括语言模型(预测部分)的大词汇语音识别。有较大的英文语言版本可供下载,例如 En-US通用语言模型



简单运行识别的代码是这样的:

  recognitionizer = defaultSetup()
.setAcousticModel(new File(assetsDir, en-us-ptm))
.setDictionary(new File(assetsDir,cmudict-en-us.dict))
.getRecognizer();
recognitionizer.addListener(this);

//创建关键字激活搜索。
recognitionizer.addNgramSearch(NGRAM_SEARCH,new File(assetsDir,en-us.lm.bin););

//开始搜索
recognitionizer.startListening(NGRAM_SEARCH);

但是,它们不容易适合设备和实时解码。如果您想用大量词汇实时解码语音,则需要将音频流传输到服务器。或者您需要将词汇和语言限制为通用英语的一小部分。您可以在教程中了解有关CMUSphinx中语音识别的更多信息。


Before I tried to used PocketSphinx for Android, I used Google's voice recognition API. I didn't need to set a search name or a dictionary file. It just recognized every word that was told.

Now, In PocketSphinx, I need to do it. But I can only find how to set recognition for one word, Or to set dictionary (The ones available in the demo project have only few words) that the recognizer think these are the only words exist, Which means that if someone says something similar, The recognizer thinks its the word that listed in the dictionary.

I just want to ask, How could I set a few search names, Or how could I set it to recognize all the words available (or even a large amount of them)? Maybe someone has a dictionary file with a big number of words?

解决方案

Before I tried to used PocketSphinx for Android, I used Google's voice recognition API. I didn't need to set a search name or a dictionary file. It just recognized every word that was told.

Google API recognizes a large but still limited set of words too. For a long time it failed to recognize "Spotify". Google offline speech recognizer uses about 50k words as described in their publication.

I just want to ask, How could I set a few search names, Or how could I set it to recognize all the words available (or even a large amount of them)? Maybe someone has a dictionary file with a big number of words?

Demo includes large vocabulary speech recognition with a language model (forecast part). There are bigger language model for the English language available for download, for example En-US generic language model.

The simple code to run the recognition is like that:

 recognizer = defaultSetup()
   .setAcousticModel(new File(assetsDir, "en-us-ptm"))
   .setDictionary(new File(assetsDir, "cmudict-en-us.dict"))
   .getRecognizer();
  recognizer.addListener(this);

  // Create keyword-activation search.
  recognizer.addNgramSearch(NGRAM_SEARCH, new File(assetsDir, "en-us.lm.bin"););

  // Start the search
  recognizer.startListening(NGRAM_SEARCH);

However, they are not easy to fit into device and decode in realtime. If you want to decode speech in realtime with large vocabulary you need to stream audio to a server. Or you need to restrict the vocabulary and language to some small subset of generic English. You can learn more about speech recognition in CMUSphinx in tutorial.

这篇关于CMUSphinx PocketSphinx - 识别所有(或大量)的单词的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆