- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我刚刚从一个短文本文件创建了一个语言模型。我对英语和荷兰语都这样做了,主要是为了通过减少可能性来减少识别时间。我都使用 Sphinx 工具包和 basesphinx lm 到二进制转换器创建它们。荷兰语语言模型可以在这里找到:http://pastebin.com/txkxiAc6英文版可以在这里找到:http://pastebin.com/fr3Epj5b它们都很小,但英国人能识别它需要识别的一切。
荷兰人使用荷兰语 Voxforge 包和字典。英语版本使用 cmusphinx-en-us-8khz-5.2.tar.gz 和 pocketsphinx 中的默认字典。
代码是这样的:
Public static main(){
configuration = new Configuration();
configuration.setAcousticModelPath("src/main/resources/"+language+"/model");
configuration.setDictionaryPath("src/main/resources/"+language+"/dict.dict");
configuration.setLanguageModelPath("src/main/resources/"+language+"/model.lm.bin");
context = new Context(configuration);
recognizer = context.getInstance(Recognizer.class);
recognizer.allocate();
----------GET INPUT STREAM AND SEND TO METHOD-------------
RecognizeText(inputstream,outputstream)
}
private static String RecognizeText(InputStream stream, OutputStream os) throws Exception {
context.setSpeechSource(stream, TimeFrame.INFINITE);
Result result;
while ((result = recognizer.recognize()) != null) {
SpeechResult speechResult = new SpeechResult(result);
return speechResult.getHypothesis();
}
return "";
}
“语言”变量可以设置为荷兰语或英语以获得正确的语言。英语可以,但荷兰语不行。我的错误在哪里?我好像找不到啊
Dutch Acoustic Model 文件夹包含以下内容:
feat.params
mdef
means
mixture_weights
noisedict
transition_matrices
variances
最佳答案
荷兰模型非常老旧,已经5年没有更新了。我刚刚在 cmusphinx 网站上上传了一个新模型。
https://sourceforge.net/projects/cmusphinx/files/Acoustic%20and%20Language%20Models/Dutch/
它应该更准确,但仍然只用 13 小时的数据进行训练。英国模型训练时间超过1000小时。我们需要更多转录的荷兰语数据。
关于java - Sphinx4 荷兰语语言模型不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40135581/
今天有小伙伴给我留言问到,try{...}catch(){...}是什么意思?它用来干什么? 简单的说 他们是用来捕获异常的 下面我们通过一个例子来详细讲解下
我正在努力提高网站的可访问性,但我不知道如何在页脚中标记社交媒体链接列表。这些链接指向我在 facecook、twitter 等上的帐户。我不想用 role="navigation" 标记这些链接,因
说现在是 6 点,我有一个 Timer 并在 10 点安排了一个 TimerTask。之后,System DateTime 被其他服务(例如 ntp)调整为 9 点钟。我仍然希望我的 TimerTas
就目前而言,这个问题不适合我们的问答形式。我们希望答案得到事实、引用资料或专业知识的支持,但这个问题可能会引发辩论、争论、投票或扩展讨论。如果您觉得这个问题可以改进并可能重新打开,visit the
我就废话不多说了,大家还是直接看代码吧~ ? 1
Maven系列1 1.什么是Maven? Maven是一个项目管理工具,它包含了一个对象模型。一组标准集合,一个依赖管理系统。和用来运行定义在生命周期阶段中插件目标和逻辑。 核心功能 Mav
我是一名优秀的程序员,十分优秀!