Menu

Asterisk PocketSphinx Integration

Help
Marco
2010-12-09
2012-09-22
  • Marco

    Marco - 2010-12-09

    Hi !

    I want to integrate pocketsphinx with asterisk. I have pocketsphinx 0.6.1 and
    Asterisk 1.4.38 installed.

    I know that there is a tutorial about this
    http://scribblej.com/svn/

    I want using my italian acoustic model and language model that i created for
    pocketsphinx but they were done with wav file at 16 Khz. So I must downsample
    at 8 Khz the wav files, reconfigure sound feature parameters as in tutorial h
    ttp://cmusphinx.sourceforge.net/wiki/tutorialam
    and retrain again, Isn't it?

    sox file.wav -r 8k file.wav

    Is this command correct to downsample my file to 8Khz?

    sox file.wav -t raw -2 -c 1 file.raw

    and is this correct to change the wav 8Khz file to raw file?

    Thanks in advance

    Marco

     
  • Marco

    Marco - 2010-12-10

    Hi Nickolay

    I tried to change sound features parameters as in http://cmusphinx.sourceforg
    e.net/wiki/tutorialam
    to
    adatp them to my sound files with a sampling rate of 8Khz

    So the default feat.params has these values:

    -alpha 0.97

    -dither yes

    -doublebw no

    -nfilt 40

    -ncep 13

    -lowerf 133.33334

    -upperf 6855.4976

    -nfft 512

    -wlen 0.0256

    -transform legacy

    -feat CFG_FEATURE

    -agc CFG_AGC

    -cmn CFG_CMN

    -varnorm CFG_VARNORM

    I changed the values and my feat.params was

    -alpha 0.97

    -dither yes

    -doublebw no

    -nfilt 31

    -ncep 13

    -samprate 8000.0

    -lowerf 200.00

    -upperf 3500.00

    -nfft 512

    -wlen 0.0256

    -transform legacy

    -feat CFG_FEATURE

    -agc CFG_AGC

    -cmn CFG_CMN

    -varnorm CFG_VARNORM

    I added -samprate 8000.0 that in default feat.params was not present

    After I have launched these commands

    ./scripts_pl/make_feats -ctl etc/evalita_train.fileids
    ./scripts_pl/make_feats -ctl etc/evalita_test.fileids
    I have seen that feat.params was again default

    -alpha 0.97

    -dither yes

    -doublebw no

    -nfilt 40

    -ncep 13

    -lowerf 133.33334

    -upperf 6855.4976

    -nfft 512

    -wlen 0.0256

    -transform legacy

    -feat CFG_FEATURE

    -agc CFG_AGC

    -cmn CFG_CMN

    -varnorm CFG_VARNORM

    So I can't change this file?

    Please help me

    Thanks in advance Nickolay

    Marco

     
  • Nickolay V. Shmyrev

    After I have launched these commands
    ./scripts_pl/make_feats -ctl etc/evalita_train.fileids
    ./scripts_pl/make_feats -ctl etc/evalita_test.fileids
    I have seen that feat.params was again default

    This issue was fixed in sphinxtrain trunk already

    So I must downsample at 8 Khz the wav files, reconfigure sound feature
    parameters as in tutorial http://cmusphinx.sourceforge.net/wiki/tutorialam and retrain again, Isn't it?
    sox file.wav -r 8k file.wav

    Yes

    sox file.wav -t raw -2 -c 1 file.raw
    and is this correct to change the wav 8Khz file to raw file?

    It's not recommended to convert files to raw, you can train using wav files

    I know that there is a tutorial about this
    http://scribblej.com/svn/

    Recommended tool to integrate asterisk with cmusphinx is UniMRCP with asterisk
    plugin

     
  • Marco

    Marco - 2010-12-11

    Hi Nickolay

    Thanks for the reply

    I downloaded with svn Revision 10742: /trunk/SphinxTrain through the command
    svn co https://cmusphinx.svn.sourceforge.net/svnroot/cmusphinx/trunk/SphinxTr
    ain/
    but when I launch make I have an error that I post

    making in src/programs/bldtree ...

    gcc -DPACKAGE_NAME=\"SphinxTrain\" -DPACKAGE_TARNAME=\"sphinxtrain\"
    -DPACKAGE_VERSION=\"1.0.99\" -DPACKAGE_STRING=\"SphinxTrain\ 1.0.99\"
    -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1
    -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1
    -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1
    -DHAVE_LIBM=1 -I/home/marco/prova_8/SphinxTrain/../sphinxbase-0.6.1/include
    -I/home/marco/prova_8/SphinxTrain/../sphinxbase-0.6.1/include
    -I../../../include -g -O2 -Wall -c parse_cmd_ln.c -o obj.i686-pc-linux-
    gnu/parse_cmd_ln.o

    gcc -DPACKAGE_NAME=\"SphinxTrain\" -DPACKAGE_TARNAME=\"sphinxtrain\"
    -DPACKAGE_VERSION=\"1.0.99\" -DPACKAGE_STRING=\"SphinxTrain\ 1.0.99\"
    -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1
    -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1
    -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1
    -DHAVE_LIBM=1 -I/home/marco/prova_8/SphinxTrain/../sphinxbase-0.6.1/include
    -I/home/marco/prova_8/SphinxTrain/../sphinxbase-0.6.1/include
    -I../../../include -g -O2 -Wall -c main.c -o obj.i686-pc-linux-gnu/main.o

    main.c: In function ‘init’:

    main.c:362: warning: implicit declaration of function ‘ckd_calloc_4d’

    main.c:542: warning: implicit declaration of function ‘ckd_free_4d’

    gcc -o ../../../bin.i686-pc-linux-gnu/bldtree
    -L/home/marco/prova_8/SphinxTrain/../sphinxbase-0.6.1/src/libsphinxad
    -L/home/marco/prova_8/SphinxTrain/../sphinxbase-0.6.1/src/libsphinxbase
    -L/home/marco/prova_8/SphinxTrain/../sphinxbase-0.6.1/src/libsphinxbase/.libs
    -L../../../lib.i686-pc-linux-gnu obj.i686-pc-linux-gnu/parse_cmd_ln.o obj.i686
    -pc-linux-gnu/main.o ../../../lib.i686-pc-linux-gnu/libcommon.a
    ../../../lib.i686-pc-linux-gnu/libmllr.a ../../../lib.i686-pc-linux-
    gnu/libio.a ../../../lib.i686-pc-linux-gnu/libs2io.a ../../../lib.i686-pc-
    linux-gnu/libcep_feat.a ../../../lib.i686-pc-linux-gnu/libmodinv.a
    ../../../lib.i686-pc-linux-gnu/libclust.a -lm -lsphinxbase ../../../lib.i686
    -pc-linux-gnu/libcommon.a ../../../lib.i686-pc-linux-gnu/libmllr.a
    ../../../lib.i686-pc-linux-gnu/libio.a ../../../lib.i686-pc-linux-
    gnu/libs2io.a ../../../lib.i686-pc-linux-gnu/libcep_feat.a ../../../lib.i686
    -pc-linux-gnu/libmodinv.a ../../../lib.i686-pc-linux-gnu/libclust.a -lm
    -lsphinxbase

    obj.i686-pc-linux-gnu/main.o: In function `init':

    /home/marco/prova_8/SphinxTrain/src/programs/bldtree/main.c:362: undefined
    reference to `ckd_calloc_4d'

    /home/marco/prova_8/SphinxTrain/src/programs/bldtree/main.c:482: undefined
    reference to `ckd_calloc_4d'

    /home/marco/prova_8/SphinxTrain/src/programs/bldtree/main.c:484: undefined
    reference to `ckd_calloc_4d'

    /home/marco/prova_8/SphinxTrain/src/programs/bldtree/main.c:542: undefined
    reference to `ckd_free_4d'

    /home/marco/prova_8/SphinxTrain/src/programs/bldtree/main.c:544: undefined
    reference to `ckd_free_4d'

    ../../../lib.i686-pc-linux-gnu/libcommon.a(dtree.o): In function
    `cluster_leaves':

    /home/marco/prova_8/SphinxTrain/src/libs/libcommon/dtree.c:1616: undefined
    reference to `ckd_calloc_4d'

    /home/marco/prova_8/SphinxTrain/src/libs/libcommon/dtree.c:1606: undefined
    reference to `ckd_calloc_4d'

    /home/marco/prova_8/SphinxTrain/src/libs/libcommon/dtree.c:1607: undefined
    reference to `ckd_calloc_4d'

    /home/marco/prova_8/SphinxTrain/src/libs/libcommon/dtree.c:1616: undefined
    reference to `ckd_calloc_4d'

    ../../../lib.i686-pc-linux-gnu/libio.a(s3gau_io.o): In function
    `s3gaucnt_write':

    /home/marco/prova_8/SphinxTrain/src/libs/libio/s3gau_io.c:456: undefined
    reference to `floor_nz_1d'

    /home/marco/prova_8/SphinxTrain/src/libs/libio/s3gau_io.c:464: undefined
    reference to `floor_nz_3d'

    /home/marco/prova_8/SphinxTrain/src/libs/libio/s3gau_io.c:449: undefined
    reference to `band_nz_1d'

    ../../../lib.i686-pc-linux-gnu/libio.a(s3gau_full_io.o): In function
    `s3gaucnt_write_full':

    /home/marco/prova_8/SphinxTrain/src/libs/libio/s3gau_full_io.c:496: undefined
    reference to `floor_nz_3d'

    /home/marco/prova_8/SphinxTrain/src/libs/libio/s3gau_full_io.c:481: undefined
    reference to `band_nz_1d'

    ../../../lib.i686-pc-linux-gnu/libio.a(s3gau_full_io.o): In function
    `s3gaucnt_read_full':

    /home/marco/prova_8/SphinxTrain/src/libs/libio/s3gau_full_io.c:362: undefined
    reference to `ckd_calloc_4d'

    ../../../lib.i686-pc-linux-gnu/libio.a(s3gau_full_io.o): In function
    `s3gau_read_maybe_full':

    /home/marco/prova_8/SphinxTrain/src/libs/libio/s3gau_full_io.c:136: undefined
    reference to `ckd_calloc_4d'

    ../../../lib.i686-pc-linux-gnu/libio.a(s3mixw_io.o): In function
    `s3mixw_write':

    /home/marco/prova_8/SphinxTrain/src/libs/libio/s3mixw_io.c:211: undefined
    reference to `floor_nz_3d'

    ../../../lib.i686-pc-linux-gnu/libmodinv.a(gauden.o): In function
    `gauden_alloc_param_full':

    /home/marco/prova_8/SphinxTrain/src/libs/libmodinv/gauden.c:246: undefined
    reference to `ckd_calloc_4d'

    ../../../lib.i686-pc-linux-gnu/libmodinv.a(gauden.o): In function
    `gauden_free_param_full':

    /home/marco/prova_8/SphinxTrain/src/libs/libmodinv/gauden.c:712: undefined
    reference to `ckd_free_4d'

    collect2: ld returned 1 exit status

    make: *** Errore 1

    make: uscita dalla directory
    «/home/marco/prova_8/SphinxTrain/src/programs/bldtree»

    make: *** Errore 2

    make: uscita dalla directory «/home/marco/prova_8/SphinxTrain/src/programs»

    make: *** Errore 2

    make: uscita dalla directory «/home/marco/prova_8/SphinxTrain/src»

    make: *** Errore 2

    I download SphinxTrain-snapshot but I have the same error so what can I do?

    Thank in advance for your help

    Regards

    Marco

     
  • Nickolay V. Shmyrev

    You need to update sphinxbase first

     
  • Marco

    Marco - 2010-12-11

    Hi Nickolay I tried to install sphinxbase snapshopt with this command

    ./autogen.sh --prefix=/home/marco/otto/sphinxbase

    in folder /home/marco/otto/sphinxbase

    and it's OK

    then I launch make

    It's OK

    then I launch make ckeck

    OK

    When I launch make install I have this error

    make: *** Errore 1

    make: uscita dalla directory «/home/marco/otto/sphinxbase/include/sphinxbase»

    make: *** Errore 2

    make: uscita dalla directory «/home/marco/otto/sphinxbase/include/sphinxbase»

    make: *** Errore 1

    make: uscita dalla directory «/home/marco/otto/sphinxbase/include»

    make: *** Errore 1

    I must tell you the first time I launched only the command ./autogen.sh so it
    installed in /usr/local but I don't want to install there How can I resolve
    the problem

    Sorry for my question I thank for your support

    Regards

    Marco

     
  • Nickolay V. Shmyrev

    In autotools in unix there each package is build in source folder and
    installed in installation folder. For example. you unpack sphinxbase to
    /home/marco/work and install in /home/marco/local. Note that installation
    folder and build folder are different ones. So your prefix option needs to be
    different, for example

    ./autogen.sh --prefix=/home/marco/local
    

    You can find more information about building software in Linux in autotools
    manual.

     
  • Marco

    Marco - 2010-12-12

    Hi Nickolay thanks for the suggestion

    BTW, I have a problem when I launch the command ./scripts_pl/make_feats.pl
    -ctl etc/evalita_train.fileids
    in /home/marco/otto/evalita

    -cfg not specified, using the default ./etc/sphinx_train.cfg

    -param not specified, using the default ./etc/feat.params

    bin/wave2feat: error while loading shared libraries: libsphinxbase.so.1:
    cannot open shared object file: No such file or directory

    I have controlled I have this file in/home/marco/otto/sphinxbase/lib

    What is wrong?

    Sorry for my questions I appreciate your help

    Regards

    Marco

     
  • Marco

    Marco - 2010-12-12

    Hi Nickolay I must thank you for your invaluable suggestions. Sorry but I' m
    new to Linux

    Now I want ask you a piece of information. Looking at http://code.google.com/
    p/unimrcp/wiki/PocketSphinxPlugin
    I see that the acoustic model is semicontinuous. So It doesn't
    accept my continuous acoustic model? Or I must train a semicontinuous model?

    Thanks

    Regards

    Marco

     
  • Nickolay V. Shmyrev

    So It doesn't accept my continuous acoustic model?

    It accepts all types of models

    Or I must train a semicontinuous model?

    No

     
  • Marco

    Marco - 2010-12-14

    Hello Nickolay

    I'm following this guide http://code.google.com/p/unimrcp/wiki/PocketSphinxPl
    ugin
    to integrate
    PocketSphinx into UniMRCP server.

    I have just installed UniMRCP 1.0.0 correctly and I have integrated it with
    asterisk 1.4.38 through Asterisk Connector Bridge. Now I have a problem with
    installing PocketSphinxPlugin.

    I launched these commands in my /home/marco/unimrcp-1.0.0

    ./configure --prefix=/home/marco/unimrcp-1.0.0 --enable-pocketsphinx-plugin
    --with-pocketsphinx=/home/marco/otto/pocketsphinx –with-
    sphinxbase=/home/marco/otto/sphinxbase

    OK

    make

    OK

    make install

    ..
    /bin/bash ../../libtool --mode=install /usr/bin/install -c
    'mrcppocketsphinx.la' '/home/marco/unimrcp-1.0.0/plugin/mrcppocketsphinx.la'

    libtool: install: error: cannot install `mrcppocketsphinx.la' to a directory
    not ending in /usr/local/unimrcp/plugin

    make: *** Errore 1

    make: uscita dalla directory «/home/marco/unimrcp-1.0.0/plugins/mrcp-
    pocketsphinx»

    make: *** Errore 2

    make: uscita dalla directory «/home/marco/unimrcp-1.0.0/plugins/mrcp-
    pocketsphinx»

    make: *** Errore 1

    make: uscita dalla directory «/home/marco/unimrcp-1.0.0/plugins»

    make: *** Errore 1

    I have problem with libtool. I dont'know how to resolve it

    Have you got any suggestion?

    Thanks in advance for your help

    Regards

    Marco

     
  • Nickolay V. Shmyrev

    Marco, I explained you how --prefix is used and why it should be different
    from the source folder. I explained you that in this thread earlier.

     
  • Marco

    Marco - 2010-12-14

    Hi nickolay

    I Succeded in installing UniMRCP1.0.0 with PocketSphinx plugin and asterisk
    connector bridge. I choose to install without –prefix so Unimrcp is installed
    in /usr/local/.

    When I launch ./unimrcpserver I see

    I post the log

    2010-12-14 19:18:49:890080 UniMRCP Server

    2010-12-14 19:18:49:890427 APR

    2010-12-14 19:18:49:890533 Create MRCP Server

    2010-12-14 19:18:49:890695 Open Config File

    2010-12-14 19:18:49:892382 Set Property ip:127.0.1.1

    2010-12-14 19:18:49:895954 Register Codec

    2010-12-14 19:18:49:896001 Register Codec

    2010-12-14 19:18:49:896014 Register Codec

    2010-12-14 19:18:49:896075 Register Resource

    2010-12-14 19:18:49:896101 Register Resource

    2010-12-14 19:18:49:896118 Register Resource

    2010-12-14 19:18:49:896134 Register Resource Factory

    2010-12-14 19:18:49:896182 Create SofiaSIP Agent
    sip:127.0.1.1:8060;transport=udp,tcp

    2010-12-14 19:18:49:896197 Register Signaling Agent

    2010-12-14 19:18:49:896612 Create UniRTSP Agent 127.0.1.1:1554

    2010-12-14 19:18:49:896638 Register Signaling Agent

    2010-12-14 19:18:49:896666 Create MRCPv2 Agent 127.0.1.1:1544

    2010-12-14 19:18:49:896823 Register Connection Agent

    2010-12-14 19:18:49:896853 Create Media Engine

    2010-12-14 19:18:49:896890 Register Media Engine

    2010-12-14 19:18:49:896915 Create RTP Termination Factory 127.0.1.1:

    2010-12-14 19:18:49:896928 Register RTP Termination Factory

    2010-12-14 19:18:49:896954 Load Plugin

    2010-12-14 19:18:49:898417 Failed to Load DSO: ../plugin/mrcppocketsphinx.so:
    undefined symbol: ps_get_hyp

    2010-12-14 19:18:49:898462 Load Plugin

    2010-12-14 19:18:49:898695 Register MRCP Engine

    2010-12-14 19:18:49:898720 Load Plugin

    2010-12-14 19:18:49:898922 Register MRCP Engine

    2010-12-14 19:18:49:898945 Load Plugin

    2010-12-14 19:18:49:899107 Register MRCP Engine

    2010-12-14 19:18:49:899153 Register RTP Settings

    2010-12-14 19:18:49:899183 Create MRCPv2 Profile

    2010-12-14 19:18:49:899211 Assign MRCP Engine

    2010-12-14 19:18:49:899223 Assign MRCP Engine

    2010-12-14 19:18:49:899234 Assign MRCP Engine

    2010-12-14 19:18:49:899244 Register Profile

    2010-12-14 19:18:49:899258 Create MRCPv1 Profile

    2010-12-14 19:18:49:899270 Assign MRCP Engine

    2010-12-14 19:18:49:899281 Assign MRCP Engine

    2010-12-14 19:18:49:899293 Assign MRCP Engine

    2010-12-14 19:18:49:899303 Register Profile

    2010-12-14 19:18:49:899321 Start Task

    2010-12-14 19:18:49:904963 Open Engine

    2010-12-14 19:18:49:905150 Start Task

    2010-12-14 19:18:49:905535 Open Engine

    2010-12-14 19:18:49:905621 Open Engine

    2010-12-14 19:18:49:905698 Start Task

    2010-12-14 19:18:49:905859 Start Task

    2010-12-14 19:18:49:926959 Start Task

    2010-12-14 19:18:49:927285 Start Task

    2010-12-14 19:18:49:927784 Receive SIP Event Status 200 OK

    2010-12-14 19:18:49:927971 Start Task

    2010-12-14 19:18:49:928178 MRCP Server Started

    2010-12-14 19:18:49:896954 Load Plugin

    2010-12-14 19:18:49:898417 Failed to Load DSO: ../plugin/mrcppocketsphinx.so:
    undefined symbol: ps_get_hyp

    So it's a problem that it doesn't load. How can I do?

    Thanks for patience

    Regards

    Marco

     
  • Marco

    Marco - 2010-12-15

    Hi nickolay!

    I followed the tutorial http://code.google.com/p/unimrcp/wiki/PocketSphinxPlu
    gin

    I launched this commands to install UniMRCP with pocketsphinx plugin and
    everything is ok

    ./configure --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr --with-
    sofia-sip=/home/marco/unimrcp-deps-1.0.2/libs/sofia-sip --enable-pocketsphinx-
    plugin --with-pocketsphinx=/home/marco/otto/pocketsphinx –with-
    sphinxbase=/home/marco/otto/sphinxbase

    make

    make

    sudo make install

    then when I launch

    marco@marco-laptop:/usr/local/unimrcp/bin$ ./unimrcpserver

    I don't understand this error

    2010-12-14 19:18:49:896954 Load Plugin 2010-12-14 19:18:49:898417 Failed to
    Load DSO: ../plugin/mrcppocketsphinx.so: undefined symbol: ps_get_hyp

    It doesn't load the plugin

    Can you help me? Have you got any idea?

    I thank you for all your suggestions

    Regards

    Marco

     
  • Marco

    Marco - 2010-12-15

    Hi Nickolay

    I gave the command

    export LD_LIBRARY_PATH=/usr/local/include/pocketsphinx/

    in this folder there are these files

    cmdln_macro.h pocketsphinx_export.h pocketsphinx.pxd ps_mllr.h

    fsg_set.h pocketsphinx.h ps_lattice.h

    But I have the same error.

    2010-12-15 15:22:52:358398 Load Plugin

    2010-12-15 15:22:52:359800 Failed to Load DSO: ../plugin/mrcppocketsphinx.so:
    undefined symbol: ps_get_hyp

    ps_get_hyp is defined in pocketsphinx.h?

    I don't understand why it doesn't recognize

    Sorry but I need your help

    Regards

    Marco

     
  • Marco

    Marco - 2010-12-15

    Hi Nickolay

    I choose to follow http://scribblej.com/svn/

    I installed astsphinx with success but I have problem with Client

    After applying the patch

    In folder /home/marco/asterisk/asterisk-1.4.38

    I launch ./configure –prefix=/opt/asterisk

    OK

    then I launch make and I have this error

    res_speech_sphinx.c -> res_speech_sphinx.o

    res_speech_sphinx.c:78: warning: initialization from incompatible pointer type

    res_speech_sphinx.c: In function ‘load_module’:

    res_speech_sphinx.c:118: error: too many arguments to function
    ‘ast_config_load’

    res_speech_sphinx.c: In function ‘sphinx_write’:

    res_speech_sphinx.c:488: error: request for member ‘ptr’ in something not a
    structure or union

    make: *** Errore 1

    make: *** Errore 2

    Can you help me?

    Regards

    Marco

     
  • Marco

    Marco - 2010-12-20

    Hi!

    Finally I succeeded in doing working asterisk with pocketsphinx following
    http://scribblej.com/svn/
    I have loaded my grammar and my acoustic model trained at 8 Khz and it works!
    It recognizes italian digits

    But I have a problem that it never stops listening

    *CLI> dial 123

    == Console is full duplex

    -- Executing Answer("Console/dsp", "") in new stack

    << Console call has been answered >>

    -- Executing SpeechCreate("Console/dsp", "Sphinx") in new stack

    -- Executing AGI("Console/dsp", "say.agi|Benvenuto allintegrazione tra Sphinx
    e Asterisk.") in new stack

    -- Launched AGI Script /var/lib/asterisk/agi-bin/say.agi

    The 'dial' command is deprecated and will be removed in a future release.
    Please use 'console dial' instead.

    *CLI> Using filename /tmp/

    Preparing to stream file: /tmp/Benvenuto-allintegrazione-tra-
    Sphinx-e-Asterisk-

    Use of uninitialized value $offset in concatenation (.) or string at
    /usr/share/perl5/Asterisk/AGI.pm line 1049, <stdin> line 19. </stdin>

    -- Playing '/tmp/Benvenuto-allintegrazione-tra-Sphinx-e-Asterisk-'
    (escape_digits=) (sample_offset 0)

    Done streaing file: /tmp/Benvenuto-allintegrazione-tra-Sphinx-e-Asterisk-

    -- AGI Script say.agi completed, returning 0

    -- Executing SpeechActivateGrammar("Console/dsp", "evalita.lm") in new stack

    -- Executing AGI("Console/dsp", "say.agi|Pronuncia le parole zero uno due tre
    quattro cinque sei sette otto nove.|1|yornprompt") in new stack

    -- Launched AGI Script /var/lib/asterisk/agi-bin/say.agi

    Using filename /tmp/yornprompt

    -- AGI Script say.agi completed, returning 0

    -- Executing SpeechStart("Console/dsp", "") in new stack

    -- Executing SpeechBackground("Console/dsp", "/tmp/yornprompt|10") in new
    stack

    NOTICE: res_speech_sphinx.c:300 sphinx_sread: Score: 50 Result: 'TRE'

    NOTICE: res_speech_sphinx.c:300 sphinx_sread: Score: 53 Result: 'TRE'

    NOTICE: res_speech_sphinx.c:300 sphinx_sread: Score: 55 Result: 'TRE'

    NOTICE: res_speech_sphinx.c:300 sphinx_sread: Score: 55 Result: 'TRE'

    NOTICE: res_speech_sphinx.c:300 sphinx_sread: Score: 57 Result: 'TRE'

    NOTICE: res_speech_sphinx.c:300 sphinx_sread: Score: 58 Result: 'TRE'

    NOTICE: res_speech_sphinx.c:300 sphinx_sread: Score: 61 Result: 'TRE'

    NOTICE: res_speech_sphinx.c:300 sphinx_sread: Score: 61 Result: 'TRE'

    NOTICE: res_speech_sphinx.c:300 sphinx_sread: Score: 62 Result: 'TRE'

    NOTICE: res_speech_sphinx.c:300 sphinx_sread: Score: 62 Result: 'TRE'

    NOTICE: res_speech_sphinx.c:300 sphinx_sread: Score: 62 Result: 'TRE'

    NOTICE: res_speech_sphinx.c:300 sphinx_sread: Score: 64 Result: 'TRE'

    NOTICE: res_speech_sphinx.c:304 sphinx_sread: Ciao New result with lower
    score; ignoring.

    NOTICE: res_speech_sphinx.c:300 sphinx_sread: Score: 64 Result: 'TRE'

    NOTICE: res_speech_sphinx.c:300 sphinx_sread: Score: 65 Result: 'TRE'

    NOTICE: res_speech_sphinx.c:300 sphinx_sread: Score: 66 Result: 'TRE'

    NOTICE: res_speech_sphinx.c:300 sphinx_sread: Score: 68 Result: 'TRE'

    NOTICE: res_speech_sphinx.c:300 sphinx_sread: Score: 70 Result: 'TRE'

    NOTICE: res_speech_sphinx.c:300 sphinx_sread: Score: 71 Result: 'TRE'

    NOTICE: res_speech_sphinx.c:304 sphinx_sread: Ciao New result with lower
    score; ignoring.

    NOTICE: res_speech_sphinx.c:304 sphinx_sread: Ciao New result with lower
    score; ignoring.

    NOTICE: res_speech_sphinx.c:304 sphinx_sread: Ciao New result with lower
    score; ignoring.

    NOTICE: res_speech_sphinx.c:304 sphinx_sread: Ciao New result with lower
    score; ignoring.

    NOTICE: res_speech_sphinx.c:304 sphinx_sread: Ciao New result with lower
    score; ignoring.

    NOTICE: res_speech_sphinx.c:304 sphinx_sread: Ciao New result with lower
    score; ignoring.

    NOTICE: res_speech_sphinx.c:304 sphinx_sread: Ciao New result with lower
    score; ignoring.

    NOTICE: res_speech_sphinx.c:304 sphinx_sread: Ciao New result with lower
    score; ignoring.

    NOTICE: res_speech_sphinx.c:304 sphinx_sread: Ciao New result with lower
    score; ignoring.

    NOTICE: res_speech_sphinx.c:304 sphinx_sread: Ciao New result with lower
    score; ignoring.

    NOTICE: res_speech_sphinx.c:304 sphinx_sread: Ciao New result with lower
    score; ignoring.

    NOTICE: res_speech_sphinx.c:304 sphinx_sread: Ciao New result with lower
    score; ignoring.

    NOTICE: res_speech_sphinx.c:304 sphinx_sread: Ciao New result with lower
    score; ignoring.

    NOTICE: res_speech_sphinx.c:300 sphinx_sread: Score: 78 Result: 'SEI'

    NOTICE: res_speech_sphinx.c:300 sphinx_sread: Score: 79 Result: 'SEI'

    NOTICE: res_speech_sphinx.c:304 sphinx_sread: Ciao New result with lower
    score; ignoring.

    NOTICE: res_speech_sphinx.c:304 sphinx_sread: Ciao New result with lower
    score; ignoring.

    NOTICE: res_speech_sphinx.c:304 sphinx_sread: Ciao New result with lower
    score; ignoring.

    NOTICE: res_speech_sphinx.c:304 sphinx_sread: Ciao New result with lower
    score; ignoring.

    NOTICE: res_speech_sphinx.c:304 sphinx_sread: Ciao New result with lower
    score; ignoring.

    NOTICE: res_speech_sphinx.c:304 sphinx_sread: Ciao New result with lower
    score; ignoring.

    NOTICE: res_speech_sphinx.c:304 sphinx_sread: Ciao New result with lower
    score; ignoring.

    NOTICE: res_speech_sphinx.c:304 sphinx_sread: Ciao New result with lower
    score; ignoring.

    NOTICE: res_speech_sphinx.c:304 sphinx_sread: Ciao New result with lower
    score; ignoring.

    So if I speak it recognizes all that I say but when I stop speaking it doesn't
    execute
    exten => 123,n,SpeechDeactivateGrammar(evalita.lm)

    So it remains in listening

    These are my extensions

    exten => 123,1,Answer()

    exten => 123,n,SpeechCreate(Sphinx)

    exten => 123,n,AGI(say.agi|'Benvenuto all'integrazione tra Sphinx e
    Asterisk.')

    exten => 123,n,SpeechActivateGrammar(evalita.lm)

    exten => 123,n,AGI(say.agi|'Pronuncia le parole zero uno due tre quattro
    cinque sei sette otto nove.'|1|yornprompt)

    exten => 123,n,SpeechStart()

    exten => 123,n,SpeechBackground(/tmp/yornprompt|10)

    exten => 123,n,SpeechDeactivateGrammar(evalita.lm)

    exten => 123,n,Log(NOTICE,${SPEECH_TEXT(0)})

    exten => 123,n,AGI(say.agi|'You said: ${SPEECH_TEXT(0)}')

    exten => 123,n,Goto(4)

    Has somebody any suggestion?

    Regards

    Marco

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.