我不需要设置搜索名称或字典文件.它只是认识到被告知的每一个字.
现在,在PocketSphinx中,我需要这样做.但我只能找到如何设置一个字的识别,或者设置字典(演示项目中只有几个字),识别器认为这是唯一存在的词,这意味着如果有人说类似的话,识别器认为字典中列出的单词.
我只想问一下,我如何设置几个搜索名称,或者我如何设置它来识别所有可用的单词(甚至是大量的)?也许有人有一个字数大量的字典文件?
解决方法
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也会识别一个很大但仍然有限的单词.很长时间以来,它无法识别“Spotify”. Google离线语音识别器使用大约50k字,如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?
演示包括语言模型(预测部分)的大词汇语音识别.有较大的英文语言版本可供下载,例如En-US generic language model.
运行识别的简单代码就是这样:
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);
但是,它们不容易适合设备和实时解码.如果您想用大量词汇实时解码语音,则需要将音频流式传输到服务器.或者您需要将词汇和语言限制为通用英语的一小部分.您可以在tutorial在CMUSphinx中更多地了解语音识别.