I try and run this line:
cmd_ln_init(NULL, ps_args(), TRUE, "-inmic yes", "-hmm", MODELDIR "/en-us/en-us", "-lm", MODELDIR "/en-us/en-us.lm.bin", "-dict", MODELDIR "/en-us/cmudict-en-us.dict", NULL);
But i keep getting an error that says I need even arguments?
what do i need to add to the continious file stream github code to get it to recognize my mic. Im just trying to get a bare bones live mic to text recognition going so I could then tweak and understand it as go. But im having the hardest time getting it up and working.
Last edit: AD 2016-06-01
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
heres my main function code that I got from github:
intmain(intargc,char*argv[]){charconst*cfg;config=cmd_ln_parse_r(NULL,cont_args_def,argc,argv,TRUE);/*Handleargumentfileas-argfile.*/if(config&&(cfg=cmd_ln_str_r(config,"-argfile"))!=NULL){config=cmd_ln_parse_file_r(config,cont_args_def,cfg,FALSE);}if(config==NULL||(cmd_ln_str_r(config,"-infile")==NULL&&cmd_ln_boolean_r(config,"-inmic")==FALSE)){E_INFO("Specify '-infile <file.wav>' to recognize from file or '-inmic yes' to recognize from microphone.\n");cmd_ln_free_r(config);return1;}ps_default_search_args(config);ps=ps_init(config);if(ps==NULL){cmd_ln_free_r(config);return1;}E_INFO("%s COMPILED ON: %s, AT: %s\n\n",argv[0],__DATE__,__TIME__);if(cmd_ln_str_r(config,"-infile")!=NULL){recognize_from_file();}elseif(cmd_ln_boolean_r(config,"-inmic")){recognize_from_microphone();}ps_free(ps);cmd_ln_free_r(config);return0;}
what do I have to add and where, to get it to run the continious speech option
Last edit: Nickolay V. Shmyrev 2016-06-02
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You need to be more precise on what have you done exactly. You also need to try to understand the program you create instead of blindly cutting and pasting code.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
if (config == NULL || (cmd_ln_str_r(config, "-infile") == NULL && cmd_ln_boolean_r(config, "-inmic") == FALSE)) {
E_INFO("Specify '-infile <file.wav>' to recognize from file or '-inmic yes' to recognize from microphone.\n");
cmd_ln_free_r(config);
}
You check for non-important inmic option, then you free configuration thus corrupting memory and then you continue execution with the corrupted memory. I suspect it is not the behaviour you meant to implement.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I try and run this line:
cmd_ln_init(NULL, ps_args(), TRUE, "-inmic yes", "-hmm", MODELDIR "/en-us/en-us", "-lm", MODELDIR "/en-us/en-us.lm.bin", "-dict", MODELDIR "/en-us/cmudict-en-us.dict", NULL);
But i keep getting an error that says I need even arguments?
what do i need to add to the continious file stream github code to get it to recognize my mic. Im just trying to get a bare bones live mic to text recognition going so I could then tweak and understand it as go. But im having the hardest time getting it up and working.
Last edit: AD 2016-06-01
You need to remove
"-inmic yes"
argument.Ok well where do i place the -inmic part. im tryint to run the continious speech option when im presented this screen
http://s33.postimg.org/hsngj5v5b/image.png
heres my main function code that I got from github:
what do I have to add and where, to get it to run the continious speech option
Last edit: Nickolay V. Shmyrev 2016-06-02
If you want to recognize from microphone exclusively you can remove all inmic-related checks from your code and leave only
recognize_from_microphone
.When I do that I get this error:
http://s33.postimg.org/w1t4d1i5r/image.png
You need to be more precise on what have you done exactly. You also need to try to understand the program you create instead of blindly cutting and pasting code.
Tutorial series only covers reading from a voice file. Im trying to read live mic. ill paste my code.
http://s33.postimg.org/oy4qcu5i7/image.png
It is better to provide a source file instead of a picture. You can attach it to your message.
Heres the source code. Im trying to get it to just run the mic function. But it breaks when I run it.
In this piece of your code:
You check for non-important inmic option, then you free configuration thus corrupting memory and then you continue execution with the corrupted memory. I suspect it is not the behaviour you meant to implement.