Menu

Confused about specifying mic for Pocketsphinx on Ubuntu 14.04

Help
2017-06-09
2017-06-09
  • Raghu Nimmagadda

    I'm trying to run pocketsphinx on my ubuntu 14.04 desktop machine and I'm running into an issue with specifying the audio device when using ad_open_dev. I have an external mic that I plugged in and am initializing the device as follows (this is c++ code, ad is an ad_rec_t):

    ad = ad_open_dev("sysdefault", (int) samprate);
    ad_start_rec(ad);

    I am getting the error "Error opening audio device sysdefault for capture: No such entity" followed by a seg fault (which might be unrelated) when I run the compiled code. However, when I run pocketsphinx_continuous -inmic yes I have absolutely no issues recognizing speech through the mic. I have tried the name "default" as well but that also didn't work. Does anyone know what parameter I should be passing instead of "sysdefault"? I can post the surrounding code as well if needed but it seems like the error is coming from here. Any help would be greatly appreciated!

    EDIT: I passed ad_open_dev NULL instead of "sysdefault" and it seems to have worked (I'm no longer getting the error about opening the audio device). I am still getting a seg fault and it is caused by

    config = cmd_ln_init(NULL, ps_args(), TRUE,
    "-hmm", "/usr/local/share/pocketsphinx/model/en-us/en-us",
    "-lm", "../audio/1638.lm",
    "-dict", "../audio/1638.dic",
    "-logfn", "/dev/null",
    NULL);
    ps = ps_init(config);
    // this line causes the issue
    ps_start_utt(ps);

     

    Last edit: Raghu Nimmagadda 2017-06-09

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.