where should I creat hello_ps.c? it should be an empty .txt file?
about instructions, I did following tutorial and ran ~~~
'pocketsphinx_continuous -inmic yes'
~~~ successfully! but after that I don't know exactly what should I do?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I made a (hello_ps.c) file and wrote this code inside and saved:
#include <pocketsphinx.h>intmain(intargc,char*argv[]){ps_decoder_t*ps;cmd_ln_t*config;FILE*fh;charconst*hyp,*uttid;int16buf[512];intrv;int32score;config=cmd_ln_init(NULL,ps_args(),TRUE,"-hmm",MODELDIR"/en-us/en-us","-lm",MODELDIR"/en-us/en-us.lm.bin","-dict",MODELDIR"/en-us/cmudict-en-us.dict",NULL);if(config==NULL){fprintf(stderr,"Failed to create config object, see log for details\n");return-1;}ps=ps_init(config);if(ps==NULL){fprintf(stderr,"Failed to create recognizer, see log for details\n");return-1;}fh=fopen("goforward.raw","rb");if(fh==NULL){fprintf(stderr,"Unable to open input file goforward.raw\n");return-1;}rv=ps_start_utt(ps);while(!feof(fh)){size_tnsamp;nsamp=fread(buf,2,512,fh);rv=ps_process_raw(ps,buf,nsamp,FALSE,FALSE);}rv=ps_end_utt(ps);hyp=ps_get_hyp(ps,&score);printf("Recognized: %s\n",hyp);fclose(fh);ps_free(ps);cmd_ln_free_r(config);return0;}
and went to it's directory by terminal: /home/cmu/ and wrote this code
I have followed the tutorial till basic usage(hello world) and copied this to my shell:
but I got this Error:
then I wrote this line as mentioned :
pkg-config –cflags –libs pocketsphinx sphinxbase
and got nothing!
what's the problem and how can I fix it?
You should have created the file hello_ps.c with a text editor. The content of this file is discussed in tutorial.
This means you didn't properly configured your environment as well as described in tutorial. You need to follow the tutorial carefully.
where should I creat hello_ps.c? it should be an empty .txt file?
about instructions, I did following tutorial and ran ~~~
'pocketsphinx_continuous -inmic yes'
~~~ successfully! but after that I don't know exactly what should I do?
It does not matter where to create it, I suggest you to have an empty working folder for that.
No, it is a source in C language. The content is provided in tutorial.
may you explain what does this part do?
Sure, take a look at
https://www3.ntu.edu.sg/home/ehchua/programming/cpp/gcc_make.html
I do get this Errors :(
Last edit: rezaee 2016-09-06
The code you used in hello_ps.c is different from the one provided in tutorial. In tutorial you will see:
The code you used is outdated.
may you give me the true code?
http://cmusphinx.sourceforge.net/wiki/tutorialpocketsphinx#code_listing
I made a (hello_ps.c) file and wrote this code inside and saved:
and went to it's directory by terminal: /home/cmu/ and wrote this code
But I got nothing after that! nothing happend!
I don't know why?
It created a binary executable hello_ps which you can now run.
I did run the file and got this
So, is this meaning that everything is ok and true and I can keeping tutorials?
So, is this meaning that everything is ok and true and I can keeping tutorials?
Last edit: rezaee 2016-09-09