sphinx 4 AbstractDecoder
来源:互联网 发布:淘宝宽屏 编辑:程序博客网 时间:2024/06/16 08:42
public abstract class AbstractDecoderimplements ResultProducer, Configurable
一个抽象的解码器,此解码器实现了独立于被使用的(pull/push)的解码框架的全部方法的实现。
本类的属性:
@S4Component(type =SearchManager.class)
public final static String PROP_SEARCH_MANAGER ="searchManager";
protectedSearchManager searchManager;定义了被使用的搜索管理的名字。
@S4ComponentList(type =ResultListener.class)
public static final String PROP_RESULT_LISTENERS ="resultListeners";
protected finalList<ResultListener> resultListeners =newArrayList<ResultListener>();存储结果监听器的列表。
@S4Boolean(defaultValue= false)
public static final String AUTO_ALLOCATE ="autoAllocate";如果此属性设置为true,则被使用的搜索管理将会自动的在newProperties()中分配所需的资源即allocated。
@S4Boolean(defaultValue= false)
public static final String FIRE_NON_FINAL_RESULTS ="fireNonFinalResults";
private boolean fireNonFinalResults;如果设置为false,被使用的搜索管理的所有的注册的结果监听器仅在最终结果时才会被通知。每一个默认的非最终结果不会触发通知,因为在大多数的应用程序中utterance的最终结果是足够的。
private String name;此对象名字。
protected Logger logger;
本类的构造方法:
public AbstractDecoder()空的构造方法。
PublicAbstractDecoder(SearchManagersearchManager,boolean fireNonFinalResults,boolean autoAllocate,List<ResultListener>resultListeners);给定参数创建对象。
本类的方法:
public abstract Result decode(String referenceText);解码帧,直到识别完成为止。输入为参考文本或null,返回的是一个result。
public void newProperties(PropertySheetps) ;对属性进行设置。
private void init(String name, Loggerlogger, SearchManager searchManager,boolean fireNonFinalResults,boolean autoAllocate, List<ResultListener> listeners);给定参数来初始化属性。
public void allocate();为解码分配必须的资源。调用的是搜索管理的此方法。
public void deallocate();释放相应的资源。调用的搜索管理的此方法。
public voidaddResultListener(ResultListener resultListener);添加一个结果监听器到此识别器。无论何时当一个新的结果被识别器产生时,一个结果监听器被调用。此方法能够在任何状态被调用。输入为:要添加的结果监听器。即为往监听器列表添加此监听器。
protected void fireResultListeners(Result result);解除新的结果,一旦它们变的可用。Fires new results as soon as they become available.
public String toString():此对象的字符串表示,即name属性。
- sphinx 4 AbstractDecoder
- sphinx 4 AbstractDecoder
- Sphinx-4
- sphinx-release 2.1.4
- sphinx
- sphinx
- sphinx
- sphinx
- Sphinx
- Sphinx
- Sphinx
- sphinx
- sphinx
- sphinx
- sphinx
- Sphinx
- sphinx
- Sphinx
- Codeforces Team Olympiad(暴力)
- Swift学习笔记一
- escape()、encodeURI()、encodeURIComponent()区别详解
- 游戏种通用提示框的设计模板和应用(待续)
- ArrayList的add()方法使用
- sphinx 4 AbstractDecoder
- Android 编程下引入第三方jar包进行代码混淆时的问题解决
- DFGUI插件自适应的实现技巧(待续)
- AVAudioPlayer音频播放
- 桌面图标出现蓝色问号
- 用dom4j对xml文档解析
- 关于水平居中
- encodeURI与encodeURIComponent的区别
- poj 3604 Professor Ben 组合计数