- This topic has 24 replies, 2 voices, and was last updated 10 years, 10 months ago by Halle Winkler.
-
AuthorPosts
-
June 7, 2013 at 1:27 pm #1017429nh3500Participant
Hi all,
I have a question about retrieving log of pocketsphinx,
I know we can simply set pocketsphinxController.verbosePocketSphinx = TRUE to get the log of pocketsphinx, and I did. But there is no log showed in the debugging window when I choose wav file as the source. Although it worked fine when it is in normal mode(continuous recognition).
The information I need is processing time. I can find it in normal mode.
But how can I find it when using wav as the source?
Should I turn on some parameter setting to allow pocketsphinx output the log?
If so, where can I find it?I would appreciate any suggestions.
June 7, 2013 at 1:38 pm #1017434Halle WinklerPolitepixWelcome,
Logging should behave identically for runRecognitionOnWavFileAtPath:. If it isn’t I would take normal troubleshooting steps such as making sure that you have all logging turned on in Xcode’s console, etc. But I don’t recall there being anything like overall processing time in either log — what does it look like when you see it with continuous?
June 7, 2013 at 1:44 pm #1017435nh3500ParticipantIt looked as follow:
INFO: ngram_search.c(888): bestpath 0.00 CPU 0.001 xRT
INFO: ngram_search.c(891): bestpath 0.00 wall 0.002 xRTDo I misunderstand the meaning?
June 7, 2013 at 1:51 pm #1017436Halle WinklerPolitepixHi,
That tells you how much the speed was compared to the real time of the utterance, but not the overall processing time.
June 7, 2013 at 1:55 pm #1017437nh3500ParticipantHi,
Yes, I understand the meaning. For my research, that is enough.
Thanks for your reply. I will keep working on finding a solution.
June 7, 2013 at 2:00 pm #1017438Halle WinklerPolitepixWhat do you see in the logging output rather than the pocketsphinx run log?
June 7, 2013 at 2:14 pm #1017439nh3500ParticipantThis the log showed with wav file:
2013-06-07 21:03:47.928 OpenEarsSampleApp[1758:907] The received hypothesis is 床 with a score of -305 and an ID of 000000000
2013-06-07 21:03:49.395 OpenEarsSampleApp[1758:907] Flite has started speaking
2013-06-07 21:03:50.732 OpenEarsSampleApp[1758:907] Flite has finished speakingAnd this is the log with continuous recognition:
2013-06-07 21:05:03.054 OpenEarsSampleApp[1770:907] Pocketsphinx has detected speech.
2013-06-07 21:05:04.330 OpenEarsSampleApp[1770:907] Pocketsphinx has detected a second of silence, concluding an utterance.
INFO: cmn_prior.c(121): cmn_prior_update: from < 8.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 >
INFO: cmn_prior.c(139): cmn_prior_update: to < 11.95 -0.01 -0.16 0.08 -0.27 -0.20 -0.07 -0.31 -0.24 -0.19 -0.23 -0.10 -0.24 >
INFO: ngram_search_fwdtree.c(1549): 468 words recognized (5/fr)
INFO: ngram_search_fwdtree.c(1551): 9619 senones evaluated (98/fr)
INFO: ngram_search_fwdtree.c(1553): 3634 channels searched (37/fr), 188 1st, 3446 last
INFO: ngram_search_fwdtree.c(1557): 849 words for which last channels evaluated (8/fr)
INFO: ngram_search_fwdtree.c(1560): 175 candidate words for entering last phone (1/fr)
INFO: ngram_search_fwdtree.c(1562): fwdtree 0.88 CPU 0.896 xRT
INFO: ngram_search_fwdtree.c(1565): fwdtree 1.78 wall 1.821 xRT
INFO: ngram_search_fwdflat.c(302): Utterance vocabulary contains 4 words
INFO: ngram_search_fwdflat.c(937): 410 words recognized (4/fr)
INFO: ngram_search_fwdflat.c(939): 11448 senones evaluated (117/fr)
INFO: ngram_search_fwdflat.c(941): 4525 channels searched (46/fr)
INFO: ngram_search_fwdflat.c(943): 968 words searched (9/fr)
INFO: ngram_search_fwdflat.c(945): 237 word transitions (2/fr)
INFO: ngram_search_fwdflat.c(948): fwdflat 0.75 CPU 0.763 xRT
INFO: ngram_search_fwdflat.c(951): fwdflat 0.75 wall 0.765 xRT
INFO: ngram_search.c(1214): </s> not found in last frame, using <sil>.96 instead
INFO: ngram_search.c(1266): lattice start node <s>.0 end node <sil>.46
INFO: ngram_search.c(1294): Eliminated 23 nodes before end node
INFO: ngram_search.c(1399): Lattice has 62 nodes, 35 links
INFO: ps_lattice.c(1367): Normalizer P(O) = alpha(<sil>:46:96) = -252498
INFO: ps_lattice.c(1405): Joint P(O,S) = -252548 P(S|O) = -50
INFO: ngram_search.c(888): bestpath 0.01 CPU 0.007 xRT
INFO: ngram_search.c(891): bestpath 0.00 wall 0.002 xRT
2013-06-07 21:05:05.254 OpenEarsSampleApp[1770:907] The received hypothesis is 起 with a score of -50 and an ID of 000000000
2013-06-07 21:05:05.620 OpenEarsSampleApp[1770:907] Pocketsphinx is now listening.
2013-06-07 21:05:05.625 OpenEarsSampleApp[1770:907] Flite has started speaking
2013-06-07 21:05:07.418 OpenEarsSampleApp[1770:907] Flite has finished speakingAnd I checked the code of PocketsphinxController.mm. I found in the method runRecognitionOnWavFileAtPath, there is no following line of code:
if(self.verbosePocketSphinx == 1) verbose_pocketsphinx = 1;May this be the reason why there is no log from pocketsphinx? However, I have no idea how to change and test it directly in OpenEarsSampleApp project…I found the code from OpenEars project, but in OpenEarsSampleApp project, it seems working with one complicated object named OpenEars in following path OpenEarsDistributionPreview/Framework/OpenEars.framework/Versions/A/OpenEars
June 7, 2013 at 2:22 pm #1017440Halle WinklerPolitepixAha, thank you for the info. All you should have to do to make the change in your local version is open OpenEars.xcodeproj, make the change, and build it. A product will be created in Xcode that is another OpenEars.framework which you can replace the old one with in your sample app.
June 7, 2013 at 3:00 pm #1017441nh3500ParticipantI add the code and rebuild the project. Then delete the framework from Build phase tab then add new OpenEars.framework. But it failed with following errors when I tried to run the project. In fact, when I built the OpenEars.xcodeproj, there were some errors also, but it is just about the location of some files and it built successfully. So I don’t think it is relevant.
Undefined symbols for architecture armv7:
“_fast_logmath_add”, referenced from:
_ptm_mgau_senone_eval in OpenEars(OpenEars)
_get_scores_4b_feat_all in OpenEars(OpenEars)
_get_scores_8b_feat_all in OpenEars(OpenEars)
_get_scores_8b_feat_6 in OpenEars(OpenEars)
_get_scores_8b_feat_5 in OpenEars(OpenEars)
_get_scores_8b_feat_4 in OpenEars(OpenEars)
_get_scores_8b_feat_3 in OpenEars(OpenEars)
…
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)It might be caused by some problem related to setting of libraries, but I’ve added the new generated framework to the project. Any suggestion?
June 7, 2013 at 3:10 pm #1017442Halle WinklerPolitepixWhat were the framework errors?
June 7, 2013 at 3:13 pm #1017443nh3500ParticipantHere is the error log :
cat: /Volumes/Macintosh: No such file or directory
cat: HD/Users/nh3500/Downloads/OpenEarsDistributionPreview/OpenEars/OpenEars.xcodeproj/../Version.txt: No such file or directoryCan’t open /Volumes/Macintosh: No such file or directory.
Can’t open HD/Users/nh3500/Downloads/OpenEarsDistributionPreview/OpenEars/OpenEars.xcodeproj/../Classes/src/OpenEarsLogging.m: No such file or directory.
Command /bin/sh emitted errors but did not return a nonzero exit code to indicate failureJune 7, 2013 at 3:26 pm #1017444Halle WinklerPolitepixThat seems to be a little bug in the project file. Does your app that links to the built framework work better if you add “OpenEarsDistribution/OpenEars/Dependencies/pocketsphinx/src/libpocketsphinx/” (wherever that is located on your system) to “Search Header Paths” under your app target’s build settings?
June 7, 2013 at 3:39 pm #1017445nh3500ParticipantRegretfully, it doesn’t change anything, same error message.
June 7, 2013 at 3:44 pm #1017446Halle WinklerPolitepixIs this the stable or preview version?
June 7, 2013 at 3:46 pm #1017447nh3500Participant1.3 preview version.
June 7, 2013 at 4:02 pm #1017448nh3500ParticipantI found it is ok with stable version.
Although it doesn’t really return meaningful information.
INFO: ngram_search.c(320): TOTAL bestpath 0.00 CPU nan xRT
INFO: ngram_search.c(323): TOTAL bestpath 0.00 wall nan xRTThanks for your kind help.
June 7, 2013 at 4:27 pm #1017449Halle WinklerPolitepixThanks for the update, I’ll look into what is up with rebuilding the framework in the preview.
June 11, 2013 at 12:52 pm #1017469Halle WinklerPolitepixOK, the current version of OpenEars should fix both the issue with verbosity and the issue with rebuilding the framework.
June 11, 2013 at 1:28 pm #1017471nh3500ParticipantGood to know, thanks a lot.
June 14, 2013 at 2:46 pm #1017503nh3500ParticipantHi,
I met the same problem again in newest OpenEars. After I rebuilt openears project, the sampleapp project has some error message as follow.
Undefined symbols for architecture i386:
“_fast_logmath_add”, referenced from:
_ptm_mgau_senone_eval in OpenEars(OpenEars)
_get_scores_4b_feat_all in OpenEars(OpenEars)
_get_scores_8b_feat_all in OpenEars(OpenEars)
_get_scores_8b_feat_6 in OpenEars(OpenEars)
_get_scores_8b_feat_5 in OpenEars(OpenEars)
_get_scores_8b_feat_4 in OpenEars(OpenEars)
_get_scores_8b_feat_3 in OpenEars(OpenEars)
…
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)This time, there is no error messages when I rebuilt openears project.
Another question, if I want to change some parameters in PocketsphinxRunConfig.h, can I simply do it in sampleapp project(modify PocketsphinxRunConfig.h and run the app) or I must recompile openears project to rebuild the framework.
June 14, 2013 at 3:01 pm #1017504Halle WinklerPolitepixSorry about that, it appeared to work when tested but I just re-checked and can see that it isn’t actually working. That is going to take some time to look into since it seems to have something to do with the fact that the function is in a header and isn’t being invoked with the use of the header, and furthermore it works on my local system and doesn’t work on the systems of others, which makes it difficult to test effectively. I’ll set up a virtual environment to figure out what’s up there.
Another question, if I want to change some parameters in PocketsphinxRunConfig.h, can I simply do it in sampleapp project(modify PocketsphinxRunConfig.h and run the app) or I must recompile openears project to rebuild the framework.
Only one way to find out :) .
June 14, 2013 at 3:09 pm #1017505nh3500ParticipantConcerning “another question”, I think I’ve got the answer :)
Thanks for your quick reply and kind reminder, looking forward to your good news.
June 15, 2013 at 3:49 pm #1017508Halle WinklerPolitepixNo problem, and I’m also interested in your results so let me know if you have a moment.
Quick question, if you go to this code in tied_mgau_common.h in the current version of OpenEars:
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ == 199901L) #define LOGMATH_INLINE inline #elif defined(__GNUC__) #define LOGMATH_INLINE static inline #elif defined(_MSC_VER) #define LOGMATH_INLINE __inline #else #define LOGMATH_INLINE static #endif
and change it to this:
//#if defined(__STDC_VERSION__) && (__STDC_VERSION__ == 199901L) //#define LOGMATH_INLINE inline //#elif defined(__GNUC__) #define LOGMATH_INLINE static inline //#elif defined(_MSC_VER) //#define LOGMATH_INLINE __inline //#else //#define LOGMATH_INLINE static //#endif
Does it then link correctly for you in the sample app? Assuming taking all precautions to avoid accidentally linking with an outdated version of the framework such as cleaning and rebuilding OpenEars.xcodeproj, cleaning and rebuilding the sample project, checking that the framework version the sample app is linking to is really the one you just compiled, and making sure that there is no old framework search path being referred to in the Framework Search Path build setting. Thanks for checking!
June 15, 2013 at 4:21 pm #1017509nh3500ParticipantI followed your guide and it works perfectly now. And cleaning and rebuilding are necessary in both project or some error appeared.
For now, I am 100% sure I have to rebuild framework to make parameter change valid.:)
Thanks for your response, this does help me a lot, wish you have a nice weekend!
June 15, 2013 at 4:28 pm #1017510Halle WinklerPolitepixSuper, I’ll put out a general fix for the current version sometime next week and in the meantime folks can use the instructions here for their rebuilds.
Have a great weekend!
-
AuthorPosts
- You must be logged in to reply to this topic.