Performance information when using wav file

Home Forums OpenEars Performance information when using wav file

Viewing 25 posts - 1 through 25 (of 25 total)

  • Author
    Posts
  • #1017429
    nh3500
    Participant

    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.

    #1017434
    Halle Winkler
    Politepix

    Welcome,

    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?

    #1017435
    nh3500
    Participant

    It 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 xRT

    Do I misunderstand the meaning?

    #1017436
    Halle Winkler
    Politepix

    Hi,

    That tells you how much the speed was compared to the real time of the utterance, but not the overall processing time.

    #1017437
    nh3500
    Participant

    Hi,

    Yes, I understand the meaning. For my research, that is enough.

    Thanks for your reply. I will keep working on finding a solution.

    #1017438
    Halle Winkler
    Politepix

    What do you see in the logging output rather than the pocketsphinx run log?

    #1017439
    nh3500
    Participant

    This 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 speaking

    And 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 speaking

    And 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

    #1017440
    Halle Winkler
    Politepix

    Aha, 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.

    #1017441
    nh3500
    Participant

    I 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?

    #1017442
    Halle Winkler
    Politepix

    What were the framework errors?

    #1017443
    nh3500
    Participant

    Here 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 directory

    Can’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 failure

    #1017444
    Halle Winkler
    Politepix

    That 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?

    #1017445
    nh3500
    Participant

    Regretfully, it doesn’t change anything, same error message.

    #1017446
    Halle Winkler
    Politepix

    Is this the stable or preview version?

    #1017447
    nh3500
    Participant

    1.3 preview version.

    #1017448
    nh3500
    Participant

    I 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 xRT

    Thanks for your kind help.

    #1017449
    Halle Winkler
    Politepix

    Thanks for the update, I’ll look into what is up with rebuilding the framework in the preview.

    #1017469
    Halle Winkler
    Politepix

    OK, the current version of OpenEars should fix both the issue with verbosity and the issue with rebuilding the framework.

    #1017471
    nh3500
    Participant

    Good to know, thanks a lot.

    #1017503
    nh3500
    Participant

    Hi,

    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.

    #1017504
    Halle Winkler
    Politepix

    Sorry 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 :) .

    #1017505
    nh3500
    Participant

    Concerning “another question”, I think I’ve got the answer :)

    Thanks for your quick reply and kind reminder, looking forward to your good news.

    #1017508
    Halle Winkler
    Politepix

    No 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!

    #1017509
    nh3500
    Participant

    I 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!

    #1017510
    Halle Winkler
    Politepix

    Super, 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!

Viewing 25 posts - 1 through 25 (of 25 total)
  • You must be logged in to reply to this topic.