认识到使用PocketSphinx多个关键字 [英] Recognizing multiple keywords using PocketSphinx

查看:1273
本文介绍了认识到使用PocketSphinx多个关键字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装了PocketSphinx演示,并能正常工作的Ubuntu和Eclipse下,但尽管尝试,我可以不知道如何我想补充的多词识别。

I've installed the PocketSphinx demo and it works fine under Ubuntu and Eclipse, but despite trying I can't work out how I would add recognition of multiple words.

我要的是为code识别单个的词,我可以再开关()中的code,例如: 上,下,左,右。我不想承认的句子,只是单个的词。

All I want is for the code to recognize single words, which I can then switch() within the code, e.g. "up", "down", "left", "right". I don't want to recognize sentences, just single words.

任何帮助将不胜感激。我已经发现其他用户有类似的问题,但没有人知道答案为止。

Any help on this would be grateful. I have spotted other users' having similar problems but nobody knows the answer so far.

一件事是莫名其妙我就是为什么我们需要使用唤醒不变呢?

One thing which is baffling me is why do we need to use the "wakeup" constant at all?

private static final String KWS_SEARCH = "wakeup";
private static final String KEYPHRASE = "oh mighty computer";
.
.
.
recognizer.addKeyphraseSearch(KWS_SEARCH, KEYPHRASE);

什么东西有唤醒必须做的任何事情?

What has wakeup got to do with anything?

我已经取得了一些进展(?):使用 addGrammarSearch 我可以使用 .gram 文件来列出我的话,例如: 上,下,左,右,向前,向后,这似乎运作良好,如果所有我说的是那些特别的话。但是,任何其他的话会导致系统匹配的内容是说从这些规定的最近字。理想情况下,我不想,如果说的话是不是在 .gram 文件发生的认可...

I have made some progress (?) : Using addGrammarSearch I am able to use a .gram file to list my words, e.g. up,down,left,right,forwards,backwards, which seems to work well if all I say are those particular words. However, any other words will cause the system to match what is said to the "nearest" word from those stated. Ideally I don't want recognition to occur if words spoken are not in the .gram file...

推荐答案

您可以使用 addKeywordSearch ,它使用与句到文件。每行一个短语与阈值的//每个短语,例如:

you can use addKeywordSearch which uses to file with keyphrases. One phrase per line with threshold for each phrase in //, for example

up /1.0/
down /1.0/
left /1.0/
right /1.0/
forwards /1e-1/

阈值的选择必须避免误报

Threshold must be selected to avoid false alarms.

这篇关于认识到使用PocketSphinx多个关键字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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