Menu

asterisk+pocketsphinx

Help
coolrakib
2010-09-08
2012-09-22
1 2 3 > >> (Page 1 of 3)
  • coolrakib

    coolrakib - 2010-09-08

    hi,
    i cannot install the pocketsphinx in CentOS which i need to integrate with
    asterisk. i tried the link
    http://scribblej.com/svn/ . But no luck. is there
    any other way of doing this??????
    actually i need to convert Voices (some names and numbers) to text as output.
    and then using the text to dial an extension of asterisk!!

     
  • Nickolay V. Shmyrev

    But no luck. is there any other way of doing this??????

    You have two ways to solve this issue:

    1. Explain what failed with http://scribblej.com/svn/ in very detail. Remember, the more detailed description you'll get the faster the problem will be solved.
    2. Use UniMRCP with pocketsphinx plugin and asterisk MRCP extension
     
  • coolrakib

    coolrakib - 2010-09-08

    thanks for the reply ..............
    i would like to go with the no 1 procedure....

    1) Successfully compiled the asterisk with sphinx.patch

    2) sphinxbase-0.6.1 & pocketsphinx-0.6.1 are also installed successfully

    3) astphinx is installed with CPPFLAGS & LDFLAGS as described at the link.

    4) lib files are also created with "echo "/opt/sphinx/lib/" >
    etc/ld.so.conf.d/sphinx.conf " .

    5) then i created a file named sphinx.conf under /etc/asterisk directory for
    client configuration in which the stated lines are copied.

    Now i dont understand what is the server configuration file look like!!!!

    & what i have to do next????

     
  • Nickolay V. Shmyrev

    Now i dont understand what is the server configuration file look like!!!!

    Server configuration file should be the following text file:

    -hmm /home/chris/ast/sphinx/Communicator_semi_40.cd_semi_6000
    -dict mydict
    -lm yesno
    -samprate 8000
    

    Here -hmm points to the acoustic model -dict to the dictionary and -lm to the
    language model

    & what i have to do next????

    After you run the server and asterisk you can dial the extension and test
    recognition

     
  • coolrakib

    coolrakib - 2010-09-08

    where should i put this file ???

    what will be the name of the file ???

    and should i add the (#!/bin/bash) at the top & make it executable or just the
    lines you stated???

    and what will be the command to run the server????

    again thanks for replying...........

     
  • Nickolay V. Shmyrev

    where should i put this file ???

    In the same folder with astsphinx. You point this file as the second argument
    to astsphinx

    $ astsphinx 10069 ./[b]configfile[/b] yesno phonetree compass 2>/dev/null
    

    what will be the name of the file ???

    Any name you like. configfile for example

    and should i add the (#!/bin/bash) at the top & make it executable or just
    the lines you stated???

    No

     
  • coolrakib

    coolrakib - 2010-09-08

    when i try to create grammar it says

    ./lmgen.pl cmudict.txt mydict phonetree

    Creating /tmp/text

    Creating /tmp/wfreq

    Creating /tmp/vocab

    Dictionary mydict exists, so preserving existing entries.

    Outputting new dictionary mydict

    Cannot open for writing: mydict

    and asterisk cannot execute this prioroty and later ones in the dialplan .....

    exten => s,n,SpeechActivateGrammar(yesno)

     
  • Nickolay V. Shmyrev

    Cannot open for writing: mydict

    This is the problem with file permissions. Remove the file mydict and try
    again.

     
  • coolrakib

    coolrakib - 2010-09-14

    still asterisk cannot execute this prioroty and later ones in the dialplan
    .....

    exten => s,n,SpeechActivateGrammar(yesno)

    what to do???????????
    does it mean yesno is not created?????

     
  • coolrakib

    coolrakib - 2010-09-14

    the verbose of asterisk are given below :::

    #########################################################

    -- Launched AGI Script /opt/asterisk/var/lib/asterisk/agi-bin/say.pl
    -- <sip faisal-00000004="">AGI Script say.pl completed, returning 0
    -- Executing SpeechActivateGrammar("SIP/XXXX", "yesno") in new stack
    == Spawn extension (ivr, s, 4) exited non-zero on 'SIPXXXX' </sip>

     
  • Nickolay V. Shmyrev

    Try to dump astsphinx log into a file. To do that run

    astsphinx 10069 ./configfile yesno phonetree compass 2> logfile
    

    post the log here or check yourself.

     
  • coolrakib

    coolrakib - 2010-09-14

    the logfile says::

    ERROR: "ngram_model_arpa.c", line 465: File
    /opt/sphinx/share/pocketsphinx/model/lm/yesno not found
    ERROR: "ngram_model_dmp.c", line 105: Dump file
    /opt/sphinx/share/pocketsphinx/model/lm/yesno not found
    ERROR: "ngram_search.c", line 210: Failed to read language model file:
    /opt/sphinx/share/pocketsphinx/model/lm/yesno
    ..............................................................................
    ..............................................................................
    ...................................

    so there is no yesno file. where can i get that file????

     
  • Nickolay V. Shmyrev

    Yesno is generated with this command

    $ lmgen.pl yesno.txt mydict yesno
    

    Please read the documentation again carefully

     
  • coolrakib

    coolrakib - 2010-09-14

    but i dont have yesno.txt

     
  • coolrakib

    coolrakib - 2010-09-14

    but i have phonetree.txt so i ran the following command & it says as
    below....... is this right ??

    ./lmgen.pl phonetree.txt mydict phonetree

    Creating /tmp/text
    Creating /tmp/ccs.css
    Creating /tmp/wfreq
    Creating /tmp/vocab
    Dictionary mydict exists, so preserving existing entries.
    Outputting new dictionary mydict
    'annot parse dictionary line: '
    Creating /tmp/wngram
    Creating /tmp/idngram
    Creating phonetree
    Deleting: /tmp/ccs.ccs
    Deleting: /tmp/text
    Deleting: /tmp/wngram
    Deleting: /tmp/vocab
    Deleting: /tmp/idngram
    Deleting: /tmp/wfreq

    ..............................................................
    after that i ran the server but the verbose says::::

    ./astsphinx 10069 ./configfile phonetree 2> logfile

    Listening on port: 10069
    256x12 256x24 256x3 256x12
    256x12 256x24 256x3 256x12
    256x12 256x24 256x3 256x12
    256x12 256x24 256x3 256x12
    Initializing grammars.
    Loading grammar 'phonetree'
    Unable to set grammar.
    Waiting on connection.
    Initializing grammars.
    Loading grammar 'phonetree'
    Unable to set grammar.
    Waiting on connection.

    ...............
    & the log says

    INFO: ngram_model_arpa.c(476): ngrams 1=5, 2=4, 3=4
    INFO: ngram_model_arpa.c(135): Reading unigrams
    INFO: ngram_model_arpa.c(515): 5 = #unigrams created
    INFO: ngram_model_arpa.c(194): Reading bigrams
    INFO: ngram_model_arpa.c(531): 4 = #bigrams created
    INFO: ngram_model_arpa.c(532): 3 = #prob2 entries
    INFO: ngram_model_arpa.c(539): 4 = #bo_wt2 entries
    INFO: ngram_model_arpa.c(291): Reading trigrams
    INFO: ngram_model_arpa.c(552): 4 = #trigrams created
    INFO: ngram_model_arpa.c(553): 2 = #prob3 entries
    INFO: ngram_search_fwdtree.c(99): 0 unique initial diphones
    INFO: ngram_search_fwdtree.c(147): 0 root, 0 non-root channels, 21 single-
    phone words
    INFO: ngram_search_fwdtree.c(186): Creating search tree

     
  • Nickolay V. Shmyrev

    Yes, it's good. And you can do the same with yesno.txt

    # cat>yesno.txt
    yes
    no
    

    there is already a variant of yestno language model in one of the tarballs.

     
  • coolrakib

    coolrakib - 2010-09-15

    but it says when i run server

    Initializing grammars.
    Loading grammar 'yesno'
    Adding yesno to lmset.
    Loading grammar 'phonetree'
    Unable to set grammar.
    Waiting on connection.

    so it cant load grammar. what is the prob ???

     
  • coolrakib

    coolrakib - 2010-09-15

    & logfile says

    ERROR: "ngram_model_arpa.c", line 465: File phonetree not found
    ERROR: "ngram_model_dmp.c", line 105: Dump file phonetree not found

    but in that directory the phonetree.txt file is created.

     
  • coolrakib

    coolrakib - 2010-09-15

    hey what is cmuclmtk how can i install this?????

     
  • coolrakib

    coolrakib - 2010-09-15

    & just to let you know... when i run lmgen.pl command it does not create
    anything in mydict file. it is always empty.

     
  • Nickolay V. Shmyrev

    Hello

    hey what is cmuclmtk how can i install this?????

    You can find a link to cmuclmtk on downloads page http://cmusphinx.sourceforg
    e.net/wiki/download

    & just to let you know... when i run lmgen.pl command it does not create
    anything in mydict file. it is always empty.

    Sorry, that's another reason for your troubles. It should be more
    straightforward. Actually lmgen has path to CMUSphinx hardcoded inside, you
    need to open this script with a text editor and edit it to make sure it takes
    correct files as an input

    There are actually other way to build language model. One of them is online
    lmtool. Please see our tutorial for more explanations

    http://cmusphinx.sourceforge.net/wiki/tutoriallm

     
  • coolrakib

    coolrakib - 2010-09-17

    now i think i can load the grammer but it waits for connection to asterisk i
    guess!!!
    the verbose of the server is given below::

    Listening on port: 10069
    256x12 256x24 256x3 256x12
    256x12 256x24 256x3 256x12
    Initializing grammars.
    Loading grammar 'yesno'
    Adding yesno to lmset.
    Loading grammar 'phonetree'
    Unable to set grammar.
    Loading grammar 'compass'
    Adding compass to lmset.
    Waiting on connection.
    256x12 256x24 256x3 256x12
    256x12 256x24 256x3 256x12
    Initializing grammars.
    Loading grammar 'yesno'
    Adding yesno to lmset.
    Loading grammar 'phonetree'
    Unable to set grammar.
    Loading grammar 'compass'
    Adding compass to lmset.
    Waiting on connection.

     
  • Nickolay V. Shmyrev

    I think that too

     
  • coolrakib

    coolrakib - 2010-09-17

    so is there any solution of this problem????

     
  • Nickolay V. Shmyrev

    so is there any solution of this problem????

    Is there a problem? I think it's ok, it's waiting for connection.

     
1 2 3 > >> (Page 1 of 3)

Log in to post a comment.