Home › Forums › OpenEars plugins › RapidEars 2.04 – crash when using within Cocos2d › Reply To: RapidEars 2.04 – crash when using within Cocos2d
August 4, 2015 at 12:07 pm
#1026488
anhtu
Participant
Here is the contents of the files which you need. In this case , I tested from A-G. When came to letter C, it crashed.
lession_vocal_C_2.dic file
C S IY
lession_vocal_C_2.arpa
#############################################################################
## Copyright (c) 1996, Carnegie Mellon University, Cambridge University,
## Ronald Rosenfeld and Philip Clarkson
## Version 3, Copyright (c) 2006, Carnegie Mellon University
## Contributors includes Wen Xu, Ananlada Chotimongkol,
## David Huggins-Daines, Arthur Chan and Alan Black
#############################################################################
=============================================================================
=============== This file was produced by the CMU-Cambridge ===============
=============== Statistical Language Modeling Toolkit ===============
=============================================================================
This is a 3-gram language model, based on a vocabulary of 3 words,
which begins "</s>", "<s>", "C"...
This is a CLOSED-vocabulary model
(OOVs eliminated from training data and are forbidden in test data)
Witten Bell discounting was applied.
This file is in the ARPA-standard format introduced by Doug Paul.
p(wd3|wd1,wd2)= if(trigram exists) p_3(wd1,wd2,wd3)
else if(bigram w1,w2 exists) bo_wt_2(w1,w2)*p(wd3|wd2)
else p(wd3|w2)
p(wd2|wd1)= if(bigram exists) p_2(wd1,wd2)
else bo_wt_1(wd1)*p_1(wd2)
All probs and back-off weights (bo_wt) are given in log10 form.
Data formats:
Beginning of data mark: \data\
ngram 1=nr # number of 1-grams
ngram 2=nr # number of 2-grams
ngram 3=nr # number of 3-grams
\1-grams:
p_1 wd_1 bo_wt_1
\2-grams:
p_2 wd_1 wd_2 bo_wt_2
\3-grams:
p_3 wd_1 wd_2 wd_3
end of data mark: \end\
\data\
ngram 1=3
ngram 2=2
ngram 3=1
\1-grams:
-98.6990 </s> 0.0000
-98.6990 <s> -99.9990
0.0000 C -0.3010
\2-grams:
-0.3010 <s> C 0.0000
-0.3010 C </s> -0.3010
\3-grams:
-0.3010 <s> C </s>
\end\
the log console
2015-08-04 16:37:00.758 App_Name[50514:4263641] Starting OpenEars logging for OpenEars version 2.03 on 64-bit device (or build): iPad running iOS version: 8.300000
2015-08-04 16:37:00.768 App_Name[50514:4263641] Starting dynamic language model generation
2015-08-04 16:37:00.892 App_Name[50514:4263641] Done creating language model with CMUCLMTK in 0.123174 seconds.
2015-08-04 16:37:00.900 App_Name[50514:4263641] I'm done running performDictionaryLookup and it took 0.002335 seconds
2015-08-04 16:37:00.908 App_Name[50514:4263641] I'm done running dynamic language model generation and it took 0.148800 seconds
2015-08-04 16:37:00.908 App_Name[50514:4263641] Valid setSecondsOfSilence value of 0.200000 will be used.
2015-08-04 16:37:01.017 App_Name[50514:4264050] there is a request to change to the language model file /var/mobile/Containers/Data/Application/A9D01313-E149-4F27-9067-EB2DA15AB639/Library/Caches/lession_vocal_B_1.DMP
2015-08-04 16:37:01.017 App_Name[50514:4264050] The language model ID is 1438681021
2015-08-04 16:37:01.032 App_Name[50514:4264050] Success loading the specified dictionary file /var/mobile/Containers/Data/Application/A9D01313-E149-4F27-9067-EB2DA15AB639/Library/Caches/lession_vocal_B_1.dic.
2015-08-04 16:37:01.033 App_Name[50514:4264050] Success loading the specified language model file /var/mobile/Containers/Data/Application/A9D01313-E149-4F27-9067-EB2DA15AB639/Library/Caches/lession_vocal_B_1.DMP.
2015-08-04 16:37:01.033 App_Name[50514:4263641] Pocketsphinx is now using the following language model:
/var/mobile/Containers/Data/Application/A9D01313-E149-4F27-9067-EB2DA15AB639/Library/Caches/lession_vocal_B_1.DMP and the following dictionary: /var/mobile/Containers/Data/Application/A9D01313-E149-4F27-9067-EB2DA15AB639/Library/Caches/lession_vocal_B_1.dic
2015-08-04 16:37:01.039 App_Name[50514:4264050] Changed language model. Project has these words or phrases in its dictionary:
B
2015-08-04 16:37:01.392 App_Name[50514:4264050] Speech detected...
2015-08-04 16:37:01.393 App_Name[50514:4264050] Pocketsphinx heard "" with a score of (-2680) and an utterance ID of 3.
2015-08-04 16:37:01.394 App_Name[50514:4264050] Hypothesis was null so we aren't returning it. If you want null hypotheses to also be returned, set OEPocketsphinxController's property returnNullHypotheses to TRUE before starting OEPocketsphinxController.
2015-08-04 16:37:01.544 App_Name[50514:4264050] Pocketsphinx heard "B" with a score of (-5403) and an utterance ID of 4.
2015-08-04 16:37:01.585 App_Name[50514:4263641] rapidEarsDidReceiveFinishedSpeechHypothesis: B with score: -5403
2015-08-04 16:37:01.775 App_Name[50514:4263763] End of speech detected...
2015-08-04 16:37:01.779 App_Name[50514:4263641] pocketsphinxDidDetectFinishedSpeech
2015-08-04 16:37:01.785 App_Name[50514:4263763] Pocketsphinx heard "B" with a score of (-8131) and an utterance ID of 5.
2015-08-04 16:37:01.792 App_Name[50514:4263641] rapidEarsDidReceiveFinishedSpeechHypothesis: B with score: -8131
2015-08-04 16:37:03.404 App_Name[50514:4263641] Starting OpenEars logging for OpenEars version 2.03 on 64-bit device (or build): iPad running iOS version: 8.300000
2015-08-04 16:37:03.416 App_Name[50514:4263641] Starting dynamic language model generation
2015-08-04 16:37:03.517 App_Name[50514:4263641] Done creating language model with CMUCLMTK in 0.100489 seconds.
2015-08-04 16:37:03.528 App_Name[50514:4263641] I'm done running performDictionaryLookup and it took 0.004014 seconds
2015-08-04 16:37:03.536 App_Name[50514:4263641] I'm done running dynamic language model generation and it took 0.131257 seconds
2015-08-04 16:37:03.536 App_Name[50514:4263641] Valid setSecondsOfSilence value of 0.200000 will be used.
2015-08-04 16:37:03.567 App_Name[50514:4264074] there is a request to change to the language model file /var/mobile/Containers/Data/Application/A9D01313-E149-4F27-9067-EB2DA15AB639/Library/Caches/lession_vocal_C_2.DMP
2015-08-04 16:37:03.569 App_Name[50514:4264074] The language model ID is 1438681023
App_Name(50514,0x104f10000) malloc: *** error for object 0x900000008: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
call stack
Thread 16Queue : com.apple.root.default-qos (concurent)
#0 0x00000001948c7270 in __pthread_kill ()
#1 0x0000000194965170 in pthread_kill ()
#2 0x000000019483eb18 in abort ()
#3 0x00000001948f42fc in free ()
#4 0x0000000100473054 in ngram_model_set_map_words ()
#5 0x0000000100476598 in ___lldb_unnamed_function156$$App_Name ()
#6 0x00000001004693e4 in ps_load_dict ()
#7 0x0000000100479c10 in ___lldb_unnamed_function183$$App_Name ()
#8 0x00000001004611c8 in ___lldb_unnamed_function78$$App_Name ()
#9 0x0000000100461858 in ___lldb_unnamed_function82$$App_Name ()
#10 0x0000000101388f94 in _dispatch_client_callout ()
#11 0x00000001013a0848 in _dispatch_source_latch_and_call ()
#12 0x000000010138b1c0 in _dispatch_source_invoke ()
#13 0x00000001013965d4 in _dispatch_root_queue_drain ()
#14 0x0000000101398248 in _dispatch_worker_thread3 ()
#15 0x000000019496122c in _pthread_wqthread ()
P.S: when I use REJECTO (demo version), this problem doesn’t appear. Here is the code I use:
error = [_languageModelGenerator generateRejectingLanguageModelFromArray:arrWords
withFilesNamed:name
withOptionalExclusions:[GlobalData sharedInstance].optionalExclusion
usingVowelsOnly:[GlobalData sharedInstance].usingVowelsOnly
withWeight:[NSNumber numberWithFloat: [GlobalData sharedInstance].weight_rejecto]
forAcousticModelAtPath:[OEAcousticModel pathToModel:@"AcousticModelEnglish"]];