I copied the example code from the tutorial:https://cmusphinx.github.io/wiki/tutorialpocketsphinx/ but when I compile it get these errors:
Severity Code Description Project File Line Suppression State Error C1010 unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source?
This is the code:
#include <pocketsphinx.h> int main(int argc, char *argv[]) { #define MODELDIR "c:/sphinx/model" ps_decoder_t *ps = NULL; cmd_ln_t *config = NULL; 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); return 0; }
How do I fix this?
Define MODELDIR in project properties or in the code.
Log in to post a comment.
I copied the example code from the tutorial:https://cmusphinx.github.io/wiki/tutorialpocketsphinx/ but when I compile it get these errors:
This is the code:
How do I fix this?
Last edit: bunnybot5555 2017-08-23
Define MODELDIR in project properties or in the code.