You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi guys, I need help.
I try to add new words in current language model already set. But the new words cannot be recognized. What's wrong with this code?
String[] words = {"one", "two", "three"};
// Language model already seted. So, this lmModel is not null.NGramModellmModel = speechRecognizer.getDecoder().getLm("CURRENT_LM");
for (Stringword: words) {
intresult = lmModel.addWord(word.trim().toLowerCase(Locale.ENGLISH), 1.7f);
System.out.println("Result word: " + a);
if (result < 0) {
System.out.println(word + " doesn't support. Please add word \""+ word + "\" in dictionary.");
}
}
// I have tried to remove and add this line but the result is same.speechRecognizer.getRapidDecoder().setLm(SEARCH_ID, lmModel);
The result values are:
Result word: 7
Result word: 8
Result word: 9
The text was updated successfully, but these errors were encountered:
Hi guys, I need help.
I try to add new words in current language model already set. But the new words cannot be recognized. What's wrong with this code?
The result values are:
The text was updated successfully, but these errors were encountered: