Bonjour à tous et à toutes.
Je suis actuellement en train de compiler un code source me permettant d'utiliser Sphinx.
Cependant, je n'arrive point à réussir la compilation.
Voici le code source de base:
http://www.astalavista.com/topic/29952-hack-adding-speech-recognition-to-your-embedded-platform/
Et voici le mien:
nclude<pocketsphinx.h>
int main(int argc, char*argv[])
{
int ps_decoder_t = 0;
int cmd_ln_t = 0;
int config = 0;
int fh = 0;
int prob= 0;
int size_t = 0;
int nsamp = 0;
int score = 0;
int ps = 0;
char buf[512];
int FILE = 0;
int NULL = 0;
int TRUE = 1;
int FALSE = 0;
char* rv;
int hyp = 0;
int uttid = 0;
void lambda;
config = cmd_ln_init(NULL, ps_args(), TRUE,
"-samprate", "8000",
"-jsgf", "grammar1.jsgf",
NULL);
ps = ps_init(config);
prob = ps_get_prob(ps, uttid);
fh = fopen("go.wav", "rb");
rv = ps_start_utt(ps, "goforward");
while (!feof(fh))
{
size_t ;nsamp;
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, &uttid);
if(hyp == NULL)
return 1;
printf("Recognized: %s with prob %d", hyp, ps_get_prob (ps, NULL));
fclose(fh);
ps_free(ps);
return 0;
}
Lors de la compilation, je reçois comme erreur:
http://www.imagup.com/data/1122811166.html
ou bien:
<a
href="http://www.imagup.com/data/1122811166.html">
<img src="http://data.imagup.com/9/1122811166.png" /></a>
Comment pourrais-je les résoudre?