Menu

How to calculate the value of CMN based on wave file on Android

Help
2016-04-13
2016-04-18
  • Toan Nguyen

    Toan Nguyen - 2016-04-13

    Dear cmusphinx,

    I use pocketsphinx_batch tool and take a look its logs and noticed that

    INFO: batch.c(729): Decoding 'raumen_thomas_waechter_3'
    INFO: cmn.c(183): CMN: 69.09 9.94 -13.22 -3.88 1.60 -1.80 8.75 0.59
    0.20 -2.00 -5.68 -1.32 -2.98

    INFO: batch.c(729): Decoding 'streuen_thomas_waechter_3'
    INFO: cmn.c(183): CMN: 72.96 6.14 -11.35 -4.89 -1.93 -6.71 9.47 2.53
    4.32 0.88 -4.52 -3.66 -1.19

    Based on each wav file the value of CMN is re-calculated.

    Could you tell me how to calculate this value on Android exactly like the
    method cmn in file cmusphinx-code/sphinxbase/src/libsphinxbase/feat/cmn.c does now?

    Yours sincerely, Toan

     

    Last edit: Toan Nguyen 2016-04-13
    • Nickolay V. Shmyrev

      It is not quite clear what do you mean by "how to calculate this value on android", if you want to calculate value like functions in cmn.c are doing, simply run those functions and they will calculate you the value.

       
  • Toan Nguyen

    Toan Nguyen - 2016-04-18

    Yes, I want to calculate value like functions in cmn.c are doing.

    Can I run those functions on Android or can I write android source code exactly like those functions do now?

     

    Last edit: Toan Nguyen 2016-04-18
  • Toan Nguyen

    Toan Nguyen - 2016-04-18

    or can I get the value of the cmn->cmn_mean array by android source code?

    I see its values printed in android log
    INFO: cmn_prior.c(155): cmn_prior_update: to < 73.06 6.04 -11.39 -4.79 -1.99 -6.59 9.39 2.73 4.12 0.97 -4.60 -3.67 -1.37 >

     
    • Nickolay V. Shmyrev

      or can I get the value of the cmn->cmn_mean array by android source code?

      No, it is not available.

       
  • Toan Nguyen

    Toan Nguyen - 2016-04-18

    Can I write a wrapper for it, and then adjust swig bindings and submit a patch like the tutorial below already stated?

    http://cmusphinx.sourceforge.net/wiki/tutorialandroid

     
    • Nickolay V. Shmyrev

      You could but I see no point in doing that.

       
  • Toan Nguyen

    Toan Nguyen - 2016-04-18

    Because I am recognizing the speech from wav files. So I want to get the right value for the paramater 'cmninit" for each wave file at first like pocketsphinx_batch and pocketsphinx_continuous tools do now.

    and then use this value on the command line below

    c.setString("-cmninit", cmninitValue);

    to recognize exactly what text is

     
    • Nickolay V. Shmyrev

      You can just set a reasonable initial estimation and that would be enough.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.