Menu

decoder is undecleared !(need help as soon as possible)

Help
rezaee
2017-06-21
2017-06-29
  • rezaee

    rezaee - 2017-06-21

    Hi
    I am trying to compile continuous.c file with this command:

    gcc -o continuous continuous.c     -DMODELDIR=\"`pkg-config --variable=modeldir pocketsphinx`\"     `pkg-config --cflags --libs pocketsphinx sphinxbase`
    

    with this part of sample code:

    hyp = ps_get_hyp(decoder);
    if (strcmp(hyp, "play sound") == 0) {
          system("aplay asound.wav");
    }
    if (strcmp(hyp, "goodbye") == 0) {
          exit(0);
    }
    

    But it says "decoder is undecleared! " , also calling "ps_get_hyp" with too few arguments!

    I can remember I did it before successfully but now, it doesn't work!
    what is the problem?

     

    Last edit: rezaee 2017-06-21
  • rezaee

    rezaee - 2017-06-23

    OK!
    I must say, I want my program does some actions when pocketsphinx recognized my command. for example if I said "hello" and pocketsphinx recognized it, pocketsphinx plays a wav file that says hello for response.

    Before I could do it with above code, but last time when I trying that code, it gives me Undecleard decoder error!

    What is the problem?
    How can I do what I want?

     
    • Nickolay V. Shmyrev

      Most likely PKG_CONFIG_PATH is not properly set as described in tutorial.

       

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.