Speech Recognition Engines

Flat
asterisk intergration with asterisk
User: doubled
Date: 9/27/2009 7:47 pm
Views: 9667
Rating: 1

hi

i am trying to intergrate asterisk with sphinx on ubuntu 8.04, i have been following http://scribblej.com/svn/  tutorial

my problem the tutorial does not how to create the grammar files,it has everything but i don't know how to put everything together,like how to get the lm and hmm is not described  though it is mentioned that it is required. can somebody help me on how to put things togethere and get the server working? so far i have downloaded the server.tar.tgz but when i run it i get lots of errors,i don't even know where to get the files it is requesting,this is some of the errors,your help will be greately appreciated

astsphinx.c:10:20: error: cmd_ln.h: No such file or directory
astsphinx.c:11:26: error: pocketsphinx.h: No such file or directory
astsphinx.c:12:25: error: ngram_model.h: No such file or directory
astsphinx.c: In function ‘testserver’:
astsphinx.c:39: error: ‘cmd_ln_t’ undeclared (first use in this function)
astsphinx.c:39: error: (Each undeclared identifier is reported only once
astsphinx.c:39: error: for each function it appears in.)

--- (Edited on 9/27/2009 7:47 pm [GMT-0500] by doubled) ---

Re: asterisk intergration with asterisk
User: nsh
Date: 9/28/2009 4:24 pm
Views: 172
Rating: 2

Those files are part of sphinxbase and pocketsphinx. You probably need to install them first. Make sure you are using latest version of them. And read instructions carefully, actually it's rather hard to  make a mistake following them.

 

--- (Edited on 9/29/2009 01:24 [GMT+0400] by nsh) ---

Re: asterisk intergration with sphinx
User: Visitor
Date: 9/30/2009 7:00 am
Views: 212
Rating: 1

hi

i am trying to compile sphinxbase 0.4.1 and pocket sphinx like it was suggested on the reply but i can't get it compiling i get the following errors,can anybody help me please

sphinxbase.c:885: error: ‘PyObject’ undeclared (first use in this function)
sphinxbase.c:885: error: (Each undeclared identifier is reported only once
sphinxbase.c:885: error: for each function it appears in.)
sphinxbase.c:885: error: ‘py_srcfile’ undeclared (first use in this function)
sphinxbase.c:885: error: invalid operands to binary *
sphinxbase.c:885: warning: statement with no effect
sphinxbase.c:886: error: ‘py_funcname’ undeclared (first use in this function)
sphinxbase.c:886: error: invalid operands to binary *
sphinxbase.c:886: warning: statement with no effect
sphinxbase.c:887: error: ‘py_globals’ undeclared (first use in this function)
sphinxbase.c:887: error: invalid operands to binary *
sphinxbase.c:887: warning: statement with no effect
sphinxbase.c:888: error: ‘empty_tuple’ undeclared (first use in this function)
sphinxbase.c:888: error: invalid operands to binary *
sphinxbase.c:888: warning: statement with no effect
sphinxbase.c:889: error: ‘empty_string’ undeclared (first use in this function)
sphinxbase.c:889: error: invalid operands to binary *
sphinxbase.c:889: warning: statement with no effect
sphinxbase.c:890: error: ‘PyCodeObject’ undeclared (first use in this function)
sphinxbase.c:890: error: ‘py_code’ undeclared (first use in this function)
sphinxbase.c:890: error: invalid operands to binary *
sphinxbase.c:890: warning: statement with no effect
sphinxbase.c:891: error: ‘PyFrameObject’ undeclared (first use in this function)
sphinxbase.c:891: error: ‘py_frame’ undeclared (first use in this function)
sphinxbase.c:891: error: invalid operands to binary *
sphinxbase.c:891: warning: statement with no effect
sphinxbase.c:893: warning: implicit declaration of function ‘PyString_FromString’
sphinxbase.c:893: warning: statement with no effect
sphinxbase.c:895: warning: statement with no effect
sphinxbase.c:897: warning: implicit declaration of function ‘PyModule_GetDict’
sphinxbase.c:897: error: ‘__pyx_m’ undeclared (first use in this function)
sphinxbase.c:897: warning: statement with no effect
sphinxbase.c:899: warning: implicit declaration of function ‘PyTuple_New’
sphinxbase.c:899: warning: statement with no effect
sphinxbase.c:901: warning: statement with no effect
sphinxbase.c:903: warning: implicit declaration of function ‘PyCode_New’
sphinxbase.c:918: warning: statement with no effect
sphinxbase.c:920: warning: implicit declaration of function ‘PyFrame_New’
sphinxbase.c:921: warning: implicit declaration of function ‘PyThreadState_Get’
sphinxbase.c:925: warning: statement with no effect
sphinxbase.c:927: error: request for member ‘f_lineno’ in something not a structure or union
sphinxbase.c:927: warning: statement with no effect
sphinxbase.c:928: warning: implicit declaration of function ‘PyTraceBack_Here’
sphinxbase.c:930: warning: implicit declaration of function ‘Py_XDECREF’
error: command 'gcc' failed with exit status 1
make[1]: *** [pymod-build-stamp] Error 1
make[1]: Leaving directory `/home/docas/Desktop/tutorial/AsteSphinx/sphinxbase-0.4.1/python'
make: *** [all-recursive] Error 1

--- (Edited on 9/30/2009 7:00 am [GMT-0500] by Visitor) ---

Re: asterisk intergration with sphinx
User: nsh
Date: 9/30/2009 6:57 pm
Views: 362
Rating: 2

You need to install python development package

http://packages.ubuntu.com/hardy/python-dev

--- (Edited on 10/1/2009 03:57 [GMT+0400] by nsh) ---

Re: asterisk intergration with sphinx
User: doubled
Date: 10/3/2009 2:22 am
Views: 86
Rating: 2

I did install the latest sphinxbase and pocketsphinx successfully but still i get the following errors that i got before. This happens when i run the server.tar.tgz from the http://scribblej.com/svn/. I don't know whether there is something i missed or that i don't understand on the tutorial can somebody please help me with this or could somebody provide another link to a tutorial that will provide additional information for me to make this project work.thanks in advance

make  all-am
make[1]: Entering directory `/home/docas/Desktop/tutorial/AsteSphinx/server'
gcc -DHAVE_CONFIG_H -I.     -g -O2 -MT astsphinx.o -MD -MP -MF .deps/astsphinx.Tpo -c -o astsphinx.o astsphinx.c
astsphinx.c:10:20: error: cmd_ln.h: No such file or directory
astsphinx.c:11:26: error: pocketsphinx.h: No such file or directory
astsphinx.c:12:25: error: ngram_model.h: No such file or directory
astsphinx.c: In function ‘testserver’:
astsphinx.c:39: error: ‘cmd_ln_t’ undeclared (first use in this function)
astsphinx.c:39: error: (Each undeclared identifier is reported only once
astsphinx.c:39: error: for each function it appears in.)
astsphinx.c:39: error: ‘cmdln’ undeclared (first use in this function)
astsphinx.c:39: error: ‘FALSE’ undeclared (first use in this function)
astsphinx.c:46: error: ‘ps_decoder_t’ undeclared (first use in this function)
astsphinx.c:46: error: ‘decoder’ undeclared (first use in this function)
astsphinx.c:54: error: ‘ngram_model_t’ undeclared (first use in this function)
astsphinx.c:54: error: ‘ngram’ undeclared (first use in this function)
astsphinx.c:55: error: ‘lmset’ undeclared (first use in this function)
astsphinx.c:65: error: ‘NGRAM_AUTO’ undeclared (first use in this function)
astsphinx.c:80: error: ‘TRUE’ undeclared (first use in this function)
astsphinx.c:86: warning: comparison between pointer and integer
astsphinx.c:144: error: ‘int32’ undeclared (first use in this function)
astsphinx.c:144: error: expected ‘;’ before ‘score’
astsphinx.c:160: warning: comparison between pointer and integer
astsphinx.c:176: error: ‘int16’ undeclared (first use in this function)
astsphinx.c:176: error: expected expression before ‘)’ token
astsphinx.c:180: error: ‘score’ undeclared (first use in this function)
astsphinx.c:180: warning: assignment makes pointer from integer without a cast
astsphinx.c:181: error: expected ‘;’ before ‘modscore’
astsphinx.c:182: error: ‘modscore’ undeclared (first use in this function)
astsphinx.c:187: error: expected expression before ‘)’ token
astsphinx.c:212: warning: assignment makes pointer from integer without a cast
astsphinx.c:213: error: expected ‘;’ before ‘modscore’
astsphinx.c:219: error: expected expression before ‘)’ token
make[1]: *** [astsphinx.o] Error 1
make[1]: Leaving directory `/home/docas/Desktop/tutorial/AsteSphinx/server'
make: *** [all] Error 2

--- (Edited on 10/3/2009 2:22 am [GMT-0500] by Visitor) ---

Re: asterisk intergration with sphinx
User: nsh
Date: 10/3/2009 4:54 am
Views: 129
Rating: 1

It's very hard ignore the following line on the Scribblej's page:

cd astsphinx;CPPFLAGS="-I/opt/sphinx/include/sphinxbase -I/opt/sphinx/include/pocketsphinx" LDFLAGS=-L/opt/sphinx/lib ./configure --prefix=/opt/astsphinx;make install


CPPFLAGS here points to the location of the pocketsphinx headers which should be presumably present in that location. I'm not sure why are you so blind.


I'd recommend you to read this document

http://tldp.org/HOWTO/Software-Building-HOWTO.html

it will definitely help you to understand the basics.

 

--- (Edited on 10/3/2009 13:54 [GMT+0400] by nsh) ---

Re: asterisk intergration with sphinx
User: doubled
Date: 10/3/2009 3:26 pm
Views: 147
Rating: 2

thank you,i really don't know why i was so blind,thank you for opening my eyes

--- (Edited on 10/3/2009 3:26 pm [GMT-0500] by doubled) ---

Re: asterisk intergration with sphinx
User: Visitor
Date: 10/4/2009 3:04 pm
Views: 4466
Rating: 1

i followed the tutorial until i got to the dialplans of asterisk,now my problem is now i am calling from an xlite softphone using the dialplans provided on scribblej website so i can say the simple phrases and i get the following errors

[Oct  4 21:48:38] ERROR[30141]: res_speech_sphinx.c:644 sphinx_connect: Connect failed with unexpected error: Connection refused
[Oct  4 21:48:38] ERROR[30141]: res_speech_sphinx.c:147 sphinx_create: Can't create Sphinx server
[Oct  4 21:48:38] ERROR[30141]: utils.c:966 ast_carefulwrite: write() returned error: Broken pipe
[Oct  4 21:48:38] ERROR[30141]: utils.c:966 ast_carefulwrite: write() returned error: Broken pipe
 

i thought i did start the server with the command from scribblej website  as follow

astsphinx 10069 ./configfile yesno phonetree compass 2>/dev/null

your help will be greatly appreciated

--- (Edited on 10/4/2009 3:04 pm [GMT-0500] by Visitor) ---

PreviousNext