Menu

Italian Voice Recognition

Help
2016-07-07
2016-07-08
  • Andrea Lisi

    Andrea Lisi - 2016-07-07

    Hi!

    Those days I am using Pocketsphinx in a Unity Application and it's working really fine with english-us recognition!

    So I wanted to use the italian package now (because italian is my motherlanguage), but the unity application silenty crashs. I guess an error occurs in one of the C functions.

    Better explanation:
    In my DLL C functions I create the configuration config invoking:

            data->config = cmd_ln_init(NULL, ps_args(), TRUE,
                "-hmm", hmmStr,
                "-dict", dictStr,
                "-jsgf", grammStr,
                NULL);
    

    where
    hmmStr is the path of the acoustic model directory containing files such as feat.params, mdef, means, variances... etc;
    dictStr the path of the dictionary (cmudict-en-us.dict);
    grammStr the path of my JSGF grammar.

    From here I dowloaded the italian files and I used those paths:
    hmmStr: the path cmusphinx-it-5.2.tar\cmusphinx-it-5.2\cmusphinx-it-5.2\model_parameters\voxforge_it_sphinx.cd_cont_2000 which contains similar files to the US one like feat.params, mdef, means, variances etc..;
    dictStr: I guess the dictionary is the voxforge_it_sphinx.dic

    But when I run and I reach the ps = ps_init(config); Unity crashes without say anything.

    Am I passing the wrong files?

    Thank you in advice!

     
    • Nickolay V. Shmyrev

      The path you set in configuration is wrong. You need to say the proper path. If you are not sure what the path is, provide an absolute path, not relative path. Also try to make it shorter to avoid mistakes.

      You can check the actual path in pocketsphinx log

       
  • Andrea Lisi

    Andrea Lisi - 2016-07-08

    Thank you for the answer!

    That path was an example using the downloaded folder. Actually I am using a different one.
    Actually, before call the C DLL functions, from C# I check the existance of the files. If those don't exist I throw an exception. And no exceptions are thrown.

    I pass as parameter to the functions the relative path and I build the absolute appending the currentDirectory_path with the relative I pass. With the en-us files it works really good! Thank you for this good tool!
    But with the italian files it crashes..

     
    • Nickolay V. Shmyrev

      You need to provide exact pocketsphinx output then.

       
  • Andrea Lisi

    Andrea Lisi - 2016-07-08

    Do you mean the log written by Pocketsphinx?

    Do you know the name of the output/log file? I tried to look for *.log but I am not able to find a runtime log file written by Pocktsphinx. I wrote mine and I see that it crashes at the ps_init(config).
    So I guess that the config variable is not properly built..

     
    • Nickolay V. Shmyrev

      You can add an option -logfn <file> to store a log in specific file.

       

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.