Forum Replies Created
-
AuthorPosts
-
PowerkeyParticipant
Okay. I think I can work within that process, but I have a few questions to make sure I understand the details.
1. Will pocketsphinx only recognize full names if my corpus contains only full names?
2. Does the fallback method utilize the lookup list in AcousticModelEnglish? i.e. Would an error in the English lookup list cause problems with the fallback method?
3. If I duplicate (in the Finder) the AcousticModelEnglish.bundle, rename it to AcousticModelCustom.bundle, add it to my project and point the pathToModel method to the Custom bundle, would you expect that to work? Or, should I just modify the lookup list in the English bundle?
April 22, 2016 at 1:39 am in reply to: Adding custom words to the LanguageModelGeneratorList.txt #1030155PowerkeyParticipantI just noticed that “key_west” in the English LanguageModelGeneratorLookupList.txt has an ‘_’ (underscore) instead of a ‘-‘ (dash).
Not sure if that is intentional or not.
April 21, 2016 at 6:32 pm in reply to: Adding custom words to the LanguageModelGeneratorList.txt #1030152PowerkeyParticipantAwesome, Thanks.
Editing these entries for the last day or so, I think I can now write in full grapheme!
EY K AA N S IY TH R UW T EY M!
April 20, 2016 at 8:08 pm in reply to: Adding custom words to the LanguageModelGeneratorList.txt #1030111PowerkeyParticipantOkay, great.
…but you can’t have any spaces in the word entry before the tab.
If no spaces are allowed before the tab, then I need to add the phrases as “John-Henry-Doe”. Are the dashes ignored when generating? Do they change inflections or timing anything like that?
You could also add JOHN and HENRY and DOE separately and a request for the phrase “John-Henry Doe” should then find all of your added words.
I do not want to add the names separately as only specific full names are used. For instance “John Doe” and “John Henry Doe” are used but “John Henry” is not. My thinking is that the recognition will be more accurate with phrases than it will be with simpler words that are used to make the phrase. True?
Yes, but this regards the generation of the language model or grammar, not the LanguageModelGeneratorLookupList entries, which should just be added in whatever case the rest of the list is in (uppercase, lowercase, or mixed case). The framework will make sure to normalize requests and the entries to the same case during lookups so you don’t have to worry about case.
Okay, to clarify the case answer… If my Array contains “John-Henry-Doe”, and the entry in the LookupList is “john-henry-doe” will that match? And what is returned in the string of recognized text?
April 20, 2016 at 7:18 pm in reply to: Adding custom words to the LanguageModelGeneratorList.txt #1030108PowerkeyParticipantHi Halle,
1. Can I create a phrase in the LookupList? i.e..
JOHN HENRY DOE<tab>JH AA N HH EH N R IY D OW
2. Can the phrases contain punctuation like ‘ (apostrophe) and – (dash)? i.e.
JOHN-HENRY DOE<tab>JH AA N HH EH N R IY D OW
3. I recall reading on the forum somewhere the the words do not need to be in all caps any more. Is that correct? i.e..
John Henry Doe<tab>JH AA N HH EH N R IY D OW
PowerkeyParticipantAs I was copying the code I found the problem.
Apparently,
generateLanguageModelFromArray(words, withFilesNamed: name, forAcousticModelAtPath: "AcousticModelEnglish")
is not the same as
generateLanguageModelFromArray(words, withFilesNamed: name, forAcousticModelAtPath: OEAcousticModel.pathToModel("AcousticModelEnglish"))
(damn noobie)
Thanks for your help.
PowerkeyParticipantWell, I have looked it over a bunch of times and re-built the app from the tutorial and I always get the same error.
I checked the AcousticModelEnglish.bundle and it appears to be properly added to the project (well, as fas as I can tell, anyway). I went through the steps in the tutorial again with a brand new project and followed the steps exactly. I checked the built application that is downloaded to the phone and the AcousticModelEnglish.bundel is at the root level of the app bundle. It is also selected as a member of the target in Xcode. The Framework Search paths are updated automatically when it was added to the project.
Any suggestions?
I have included the log from the recent re-built project which is simplified. It looks mostly the same as the previous one, but maybe there is something in it that will help determine what I am doing wrong.
2016-04-09 17:56:02.934 TalkApp[3460:1095599] Starting OpenEars logging for OpenEars version 2.501 on 64-bit device (or build): iPhone running iOS version: 9.300000 2016-04-09 17:56:02.989 TalkApp[3460:1095599] Starting dynamic language model generation INFO: ngram_model_arpa_legacy.c(504): ngrams 1=7, 2=9, 3=6 INFO: ngram_model_arpa_legacy.c(136): Reading unigrams INFO: ngram_model_arpa_legacy.c(543): 7 = #unigrams created INFO: ngram_model_arpa_legacy.c(196): Reading bigrams INFO: ngram_model_arpa_legacy.c(561): 9 = #bigrams created INFO: ngram_model_arpa_legacy.c(562): 4 = #prob2 entries INFO: ngram_model_arpa_legacy.c(570): 5 = #bo_wt2 entries INFO: ngram_model_arpa_legacy.c(293): Reading trigrams INFO: ngram_model_arpa_legacy.c(583): 6 = #trigrams created INFO: ngram_model_arpa_legacy.c(584): 2 = #prob3 entries INFO: ngram_model_dmp_legacy.c(521): Building DMP model... INFO: ngram_model_dmp_legacy.c(551): 7 = #unigrams created INFO: ngram_model_dmp_legacy.c(652): 9 = #bigrams created INFO: ngram_model_dmp_legacy.c(653): 4 = #prob2 entries INFO: ngram_model_dmp_legacy.c(660): 5 = #bo_wt2 entries INFO: ngram_model_dmp_legacy.c(664): 6 = #trigrams created INFO: ngram_model_dmp_legacy.c(665): 2 = #prob3 entries 2016-04-09 17:56:03.060 TalkApp[3460:1095599] Done creating language model with CMUCLMTK in 0.070624 seconds. 2016-04-09 17:56:03.060 TalkApp[3460:1095599] Since there is no cached version, loading the language model lookup list for the acoustic model called AcousticModelEnglish 2016-04-09 17:56:03.061 TalkApp[3460:1095599] Error: an attempt was made to load the lookup dictionary for the acoustic model at the path AcousticModelEnglish and it wasn't possible to complete. This file does not appear to exist. Please ask for help in the forums and be sure to turn on all logging. An exception or unpredictable behavior should be expected now since this file is a requirement. 2016-04-09 17:56:03.065 TalkApp[3460:1095599] Additionally, there was an error of Error Domain=NSCocoaErrorDomain Code=260 "The file “LanguageModelGeneratorLookupList.text” couldn’t be opened because there is no such file." UserInfo={NSFilePath=AcousticModelEnglish/LanguageModelGeneratorLookupList.text, NSUnderlyingError=0x147d51ce0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}} Error: Not possible to create a dictionary for this wordset. 2016-04-09 17:56:03.069 TalkApp[3460:1095599] Attempting to start listening session from startListeningWithLanguageModelAtPath: 2016-04-09 17:56:03.070 TalkApp[3460:1095599] Error: you have invoked the method: startListeningWithLanguageModelAtPath:(NSString *)languageModelPath dictionaryAtPath:(NSString *)dictionaryPath acousticModelAtPath:(NSString *)acousticModelPath languageModelIsJSGF:(BOOL)languageModelIsJSGF with a languageModelPath which is nil. If your call to OELanguageModelGenerator did not return an error when you generated this language model, that means the correct path to your language model that you should pass to this method's languageModelPath argument is as follows: NSString *correctPathToMyLanguageModelFile = [myLanguageModelGenerator pathToSuccessfullyGeneratedLanguageModelWithRequestedName:@"TheNameIChoseForMyVocabulary"]; Feel free to copy and paste this code for your path to your language model, but remember to replace the part that says "TheNameIChoseForMyVocabulary" with the name you actually chose for your language model or you will get this error again (and replace myLanguageModelGenerator with the name of your OELanguageModelGenerator instance). Since this file is required, expect an exception or undocumented behavior shortly.
PowerkeyParticipantOkay, OELogging and verbosePocketSphinx are enabled…
2016-04-08 10:53:47.992 TalkApp[2774:811646] Starting OpenEars logging for OpenEars version 2.501 on 64-bit device (or build): iPhone running iOS version: 9.300000 2016-04-08 10:53:47.993 TalkApp[2774:811646] Creating shared instance of OEPocketsphinxController 2016-04-08 10:53:48.039 TalkApp[2774:811646] Starting dynamic language model generation INFO: ngram_model_arpa_legacy.c(504): ngrams 1=37, 2=70, 3=35 INFO: ngram_model_arpa_legacy.c(136): Reading unigrams INFO: ngram_model_arpa_legacy.c(543): 37 = #unigrams created INFO: ngram_model_arpa_legacy.c(196): Reading bigrams INFO: ngram_model_arpa_legacy.c(561): 70 = #bigrams created INFO: ngram_model_arpa_legacy.c(562): 3 = #prob2 entries INFO: ngram_model_arpa_legacy.c(570): 3 = #bo_wt2 entries INFO: ngram_model_arpa_legacy.c(293): Reading trigrams INFO: ngram_model_arpa_legacy.c(583): 35 = #trigrams created INFO: ngram_model_arpa_legacy.c(584): 2 = #prob3 entries INFO: ngram_model_dmp_legacy.c(521): Building DMP model... INFO: ngram_model_dmp_legacy.c(551): 37 = #unigrams created INFO: ngram_model_dmp_legacy.c(652): 70 = #bigrams created INFO: ngram_model_dmp_legacy.c(653): 3 = #prob2 entries INFO: ngram_model_dmp_legacy.c(660): 3 = #bo_wt2 entries INFO: ngram_model_dmp_legacy.c(664): 35 = #trigrams created INFO: ngram_model_dmp_legacy.c(665): 2 = #prob3 entries 2016-04-08 10:53:48.086 TalkApp[2774:811646] Done creating language model with CMUCLMTK in 0.045739 seconds. 2016-04-08 10:53:48.086 TalkApp[2774:811646] Since there is no cached version, loading the language model lookup list for the acoustic model called AcousticModelEnglish 2016-04-08 10:53:48.087 TalkApp[2774:811646] Error: an attempt was made to load the lookup dictionary for the acoustic model at the path AcousticModelEnglish and it wasn't possible to complete. This file does not appear to exist. Please ask for help in the forums and be sure to turn on all logging. An exception or unpredictable behavior should be expected now since this file is a requirement. 2016-04-08 10:53:48.091 TalkApp[2774:811646] Additionally, there was an error of Error Domain=NSCocoaErrorDomain Code=260 "The file “LanguageModelGeneratorLookupList.text” couldn’t be opened because there is no such file." UserInfo={NSFilePath=AcousticModelEnglish/LanguageModelGeneratorLookupList.text, NSUnderlyingError=0x13e667d10 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}} 2016-04-08 10:53:48.091 TalkApp[2774:811646] Attempting to start listening session from startListeningWithLanguageModelAtPath: 2016-04-08 10:53:48.092 TalkApp[2774:811646] Error: you have invoked the method: startListeningWithLanguageModelAtPath:(NSString *)languageModelPath dictionaryAtPath:(NSString *)dictionaryPath acousticModelAtPath:(NSString *)acousticModelPath languageModelIsJSGF:(BOOL)languageModelIsJSGF with a dictionaryPath which is nil. If your call to OELanguageModelGenerator did not return an error when you generated this language model or grammar, that means the correct path to your phonetic dictionary that you should pass to this method's dictionaryPath argument is as follows: NSString *correctPathToMyPhoneticDictionaryFile = [myLanguageModelGenerator pathToSuccessfullyGeneratedDictionaryWithRequestedName:@"TheNameIChoseForMyVocabulary"]; Feel free to copy and paste this code for your path to your phonetic dictionary, but remember to replace the part that says "TheNameIChoseForMyVocabulary" with the name you actually chose for your grammar or language model or you will get this error again (and replace myLanguageModelGenerator with the name of your OELanguageModelGenerator instance). Since this file is required, expect an exception or undocumented behavior shortly.
PowerkeyParticipantJust in case I did accidentally delete something, here is the log as-is…
2016-04-08 10:33:02.560 TalkApp[2769:807010] Starting OpenEars logging for OpenEars version 2.501 on 64-bit device (or build): iPhone running iOS version: 9.300000 2016-04-08 10:33:04.202 TalkApp[2769:807010] Starting dynamic language model generation 2016-04-08 10:33:04.293 TalkApp[2769:807010] Done creating language model with CMUCLMTK in 0.091069 seconds. 2016-04-08 10:33:04.294 TalkApp[2769:807010] Since there is no cached version, loading the language model lookup list for the acoustic model called AcousticModelEnglish 2016-04-08 10:33:04.295 TalkApp[2769:807010] Error: an attempt was made to load the lookup dictionary for the acoustic model at the path AcousticModelEnglish and it wasn't possible to complete. This file does not appear to exist. Please ask for help in the forums and be sure to turn on all logging. An exception or unpredictable behavior should be expected now since this file is a requirement. 2016-04-08 10:33:04.298 TalkApp[2769:807010] Additionally, there was an error of Error Domain=NSCocoaErrorDomain Code=260 "The file “LanguageModelGeneratorLookupList.text” couldn’t be opened because there is no such file." UserInfo={NSFilePath=AcousticModelEnglish/LanguageModelGeneratorLookupList.text, NSUnderlyingError=0x15457add0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}} 2016-04-08 10:33:10.254 TalkApp[2769:807010] Creating shared instance of OEPocketsphinxController 2016-04-08 10:33:10.266 TalkApp[2769:807010] Attempting to start listening session from startListeningWithLanguageModelAtPath: 2016-04-08 10:33:10.267 TalkApp[2769:807010] Error: you have invoked the method: startListeningWithLanguageModelAtPath:(NSString *)languageModelPath dictionaryAtPath:(NSString *)dictionaryPath acousticModelAtPath:(NSString *)acousticModelPath languageModelIsJSGF:(BOOL)languageModelIsJSGF with a dictionaryPath which is nil. If your call to OELanguageModelGenerator did not return an error when you generated this language model or grammar, that means the correct path to your phonetic dictionary that you should pass to this method's dictionaryPath argument is as follows: NSString *correctPathToMyPhoneticDictionaryFile = [myLanguageModelGenerator pathToSuccessfullyGeneratedDictionaryWithRequestedName:@"TheNameIChoseForMyVocabulary"]; Feel free to copy and paste this code for your path to your phonetic dictionary, but remember to replace the part that says "TheNameIChoseForMyVocabulary" with the name you actually chose for your grammar or language model or you will get this error again (and replace myLanguageModelGenerator with the name of your OELanguageModelGenerator instance). Since this file is required, expect an exception or undocumented behavior shortly.
PowerkeyParticipantI spaced the message out to be more readable and changed the name of the app. No other edits. After I posted, I noticed that there are other logging routines that I had not enabled. Should I do that and re-submit the log?
-
AuthorPosts