Menu

Want to add functionality to load every possible type of model

Help
Toine db
2014-11-21
2014-12-12
  • Toine db

    Toine db - 2014-11-21

    I created the Windows/Windows Phone examples and I want to add/complete the innitialization part that sets the models for pocketsphinx.

    Is there an overview of different Models sphinx can make and handle.
    And is there a overview wich files need to be innitilized for pocketsphinx to work correctly for each type of model.
    (Something more like: http://cmusphinx.sourceforge.net/wiki/tutorialam#using_the_model)

    In the example I loaded a weather.dmp file just to fill in the request of -lm..... but I haven't got a clue why that was needed because the example doesn't do anything with weather.
    PS: without the weather.dmp the pocketsphinx crashes

    I hope someone can give me an overview so I can implement it in the examples for a next release

     
    • Nickolay V. Shmyrev

      And is there a overview wich files need to be innitilized for pocketsphinx to work correctly for each type of model.

      Yes, sure http://cmusphinx.sourceforge.net/wiki/tutorial

      In the example I loaded a weather.dmp file just to fill in the request of -lm..... but I haven't got a clue why that was needed because the example doesn't do anything with weather.

      You could probably be more specific about this issue. If you are about pocketsphinx-wp-demo, you do not need weather.lm there in Initialize, demo should work fine without it.

       
      • Toine db

        Toine db - 2014-12-05

        Found a bug in the WP8 demo.

        I was calling ps_end_utt(ps) before ever starting ps_start_utt().

        Strange anough this didn't throw exception when loading a LM at innitialization!

        I commited it on Nuget.
        (with some other missing files for a complete working build)

         
      • Toine db

        Toine db - 2014-12-05

        Nickolay, still have the same issue and I found the line of code with the problem.

        The situation is as follows (when using the WIndows Phone demo).

        • I initialize PocketSphinx with only the HMM path and Dictionary file. (so no Language Model).
        • I DO NOT ADD SEARCH PHRASES OR GRAMS

        The code does:
        1: ps_start_utt
        2: ps_process_raw
        3: ps_get_hyp

        - here is where it goos wrong at:
        

        hyp = ps_search_hyp(ps->search, out_best_score, NULL);

        Because "search" in ps->search is NULL.
        When initializing pocketsphinx with "-lm" all works fine! (then ps->search is NOT NULL)

        What do I need to do to only work with a model path -hmm and a dictionary -dict.

        My initialization parameters are:

          config = cmd_ln_init(NULL, ps_args(), TRUE,
                "-hmm", hmmPath,
                "-dict", dictPath,
                "-mmap", "no",
                "-logfn", logPath,
                "-kws_threshold", "1e-40",
                NULL);
        

        Hope to hear from you.

         
        • Nickolay V. Shmyrev

          You still need grammar or language model. For testing you are using grammar I suppose.

           
          • Toine db

            Toine db - 2014-12-05

            That worked, I will commit a change to not make it possible initialization without a grammer or language model.

            Can you tell me what the Config parameter option for gram/jsgf files are? (-lm crashes when using grammer files)

            Is there a overview of these parameters? Becuase after looking at this post http://bit.ly/1yTUy2D I'm thinking I can tweak a litle with these parameters.
            (PS the tutorial won't give much info about the cmd_ln_init options)

             
            • Alexander Solovets

              Hi Toine,

              The option is "-jsgf".

              On Sat, Dec 6, 2014 at 2:04 AM, Toine db tony_mortana@users.sf.net wrote:

              That worked, I will commit a change to not make it possible initialization without a grammer or language model.

              Can you tell me what the Config parameter option for gram/jsgf files are? (-lm crashes when using grammer files)

              Is there a overview of these parameters? Becuase after looking at this post http://bit.ly/1yTUy2D I'm thinking I can tweak a litle with these parameters.
              (PS the tutorial won't give much info about the cmd_ln_init options)


              Want to add functionality to load every possible type of model


              Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/cmusphinx/discussion/help/

              To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

              --
              Sincerely, Alexander

               
              • Toine db

                Toine db - 2014-12-07

                Thanks for the info.
                Gone update the Github rep for the WindowsPhone demo now.

                Still have two questions for better implementation;

                1: Is there any advantage in loading grams and language model in 'ps_init' compared to later on in 'ps_set_jsgf_file' or 'ps_set_lm_file'?
                (other then being the default search type)

                2: Is there a overview of all parameters that can be set in the config with 'cmd_ln_init' ??? (like -mmap or -lw... etc)

                Thanks for the help Alexander.

                 
                • Nickolay V. Shmyrev

                  1: Is there any advantage in loading grams and language model in 'ps_init' compared to later on in 'ps_set_jsgf_file' or 'ps_set_lm_file'?
                  (other then being the default search type)

                  No

                  2: Is there a overview of all parameters that can be set in the config with 'cmd_ln_init' ??? (like -mmap or -lw... etc)

                  You can run pocketsphinx_continuous without arguments and see the list. You can also check pocketsphinx man page.

                   
                  • Toine db

                    Toine db - 2014-12-07

                    Tnx for the quick reply,
                    Changes for WindowsPhone demo are commited as we speak.

                    I will check the list!
                    Do you mean this by 'man page'? http://cmusphinx.sourceforge.net/wiki/tutorialpocketsphinx

                     
                  • Toine db

                    Toine db - 2014-12-12

                    Dear Nickolay,

                    Tnx for the support, I was able to match the Config of pocketsphinx-continuos to the Windows Phone pocketsphinx.
                    The recognition is better, but not good anough yet.

                    I can see all the options that are available in pocketsphinx commandline (config) but I can't find the descriptions for that.

                    Are there any or where is the "Man Page" what you are talking about?

                     

Log in to post a comment.

MongoDB Logo MongoDB