如何在狮身人面像中添加单词? [英] How to add words to sphinx?

查看:134
本文介绍了如何在狮身人面像中添加单词?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用Java将单词添加到狮身人面像? 我是一个学习狮身人面像的新学习者,我只知道如何使用它.我想学习添加我的文字.任何人都可以帮助我.

How to add my words to sphinx using java? Iam a new learner for learning sphinx,I just know how to use it.I want to learn adding my words.anybody can help me.

推荐答案

将单词添加到字典文件sphinx4/models/acoustic/wsj/dict/cmudict.0.6d:

Add the word to the dictionary file sphinx4/models/acoustic/wsj/dict/cmudict.0.6d:

ABACK AH B AE K

ABACK AH B AE K

ABACO AE B AH K OW

ABACO AE B AH K OW

ABACUS AE B AH K AH S

ABACUS AE B AH K AH S

PINTREST P IH N T R EH S T

然后将单词添加到语法中sphinx4/src/apps/edu/cmu/sphinx/demo/helloworld/hello.gram:

Then add the word to the grammar sphinx4/src/apps/edu/cmu/sphinx/demo/helloworld/hello.gram:

#JSGF V1.0;

#JSGF V1.0;

语法你好;

public =(早上好|您好)(Bhiksha | Evandro | Paul | 菲利普|丽塔|会| Pintrest );

public = (Good morning | Hello) ( Bhiksha | Evandro | Paul | Philip | Rita | Will | Pintrest );

重新编译并运行HelloWorld演示,它将了解一个新词.

Recompile and run HelloWorld demo, it will understand a new word.

如果单词已经在字典中,则可以将其添加到语法中.

If the word is already in the dictionary, you can just add it to the grammar.

这篇关于如何在狮身人面像中添加单词?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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