Home › Forums › OpenEars › Recognize short Command in nonEnglish › Reply To: Recognize short Command in nonEnglish
OK, let’s see what happens when you make the following changes to the three projects.
For your regular grammar project and for your RuleORama project, please adjust this code:
let words = ["esch do no frey"]
// let err: Error! = lmGenerator.generateLanguageModel(from: words, withFilesNamed: name, forAcousticModelAtPath: OEAcousticModel.path(toModel: accusticModelName))
// let err: Error! = lmGenerator.generateGrammar(from: [OneOfTheseWillBeSaidOnce : words], withFilesNamed: fileName, forAcousticModelAtPath: OEAcousticModel.path(toModel: accusticModelName))
let err: Error! = lmGenerator.generateFastGrammar(from: [OneOfTheseWillBeSaidOnce : words], withFilesNamed: fileName, forAcousticModelAtPath: OEAcousticModel.path(toModel: accusticModelName))
so it matches the grammar instructions with the enclosing ThisWillBeSaidOnce declaration like so:
let words = ["esch do no frey"]
let grammar = [
ThisWillBeSaidOnce : [
[ OneOfTheseWillBeSaidOnce : words]
]
]
// let err: Error! = lmGenerator.generateGrammar(from: grammar, withFilesNamed: fileName, forAcousticModelAtPath: OEAcousticModel.path(toModel: accusticModelName))
let err: Error! = lmGenerator.generateFastGrammar(from: grammar, withFilesNamed: fileName, forAcousticModelAtPath: OEAcousticModel.path(toModel: accusticModelName))
Uncommenting whichever of the generateGrammar/generateFastGrammar lines are to be used by the respective grammar project.
For your Rejecto project, please open AcousticModelGerman.bundle/LanguageModelGeneratorLookupList.text at whatever location you are really linking to it (please be ABSOLUTELY sure you are performing this change on the real acoustic model that your project links to and moves into your app bundle, wherever that is located, or our troubleshooting work on this project will be guaranteed to be unsuccessful) and look for the following two lines:
es ee s
esf ee s f
and change them to this:
es ee s
eschdonofrey @ ss d oo n oo f r @ ii
esf ee s f
and then you have to change your Rejecto language model generation code (which you have never shown me here) so that it just creates a model for the single word “eschdonofrey”. Do not make this change to your grammar projects. For contrast, you can also try changing the acoustic model entry to this instead with your Rejecto project, with slightly different phonemes:
es ee s
eschdonofrey ee ss d oo n oo f r ee ii
esf ee s f
If none of these have better results, this will be the point at which we will have to stop the troubleshooting process, because it is guaranteed to get confused results if we try to further troubleshoot three different implementations in parallel which have hosted other different implementations at different times. If one of these projects has improved results, we can do a little bit more investigation of it, under the condition that the other two projects are put away and it is possible for me to rely on the fact that we are only investigating one clean project at a time moving forward. Let me know how it goes!
- This reply was modified 5 years, 5 months ago by Halle Winkler.