Menu

dict.c looks in /usr/local/... even if not specified

Help
2014-09-03
2014-09-03
  • Jamie Bullock

    Jamie Bullock - 2014-09-03

    Hi,

    I am trying to pass some local paths to to cmd_ln_init(). For example in the example below MODELDIR is set to "./"

    config = cmd_ln_init(NULL, ps_args(), TRUE,
    "-hmm", MODELDIR "model/en-us",
    "-lm", MODELDIR "model/en-us/en-us.lm",
    "-dict", MODELDIR "lm/en_US/cmu07a.dic",
    "-samprate", "16000",
    NULL);

    However, when I run my program, it fails with:

    SYSTEM_ERROR: "dict.c", line 274: Failed to open dictionary file '/usr/local/share/pocketsphinx/model/lm/./lm/en_US/cmu07a.dic' for reading: No such file or directory

    How can I prevent it from prefixing the path with "/usr/local/share/pocketsphinx/model/lm/"

    Thanks,

    Jamie

     
    • Nickolay V. Shmyrev

      Hello Jamie

      Location in /usr/local/share is fallback when you didn't properly point the dictionary location. It first searches in relative path then tries to search in /usr/local/share/pocketsphinx.

      Make sure your relative path is correct first of all, it is probably models/lm/en_US, not lm/en_US.

       

Log in to post a comment.