Menu

pocketsphinx the function "add_word" ,it can not add new word into the dictionary

Help
junyu
2013-01-03
2013-01-14
  • junyu

    junyu - 2013-01-03

    I compliled pocketsphinx into python model,and I want to use "add_word" to add new word into the dictionary.
    From the logfile,after using that funtion "add_word",it shows:

    add
    INFO: dict2pid.c(310): Filling in left-context diphones for W(?,AH)
    INFO: dict2pid.c(330): Filling in right-context diphones for AH(W,?)
    INFO: ngram_search_fwdtree.c(99): 39 unique initial diphones
    INFO: ngram_search_fwdtree.c(147): 0 root, 0 non-root channels, 12 single-phone words
    INFO: ngram_search_fwdtree.c(186): Creating search tree
    INFO: ngram_search_fwdtree.c(191): before: 0 root, 0 non-root channels, 12 single-phone words
    INFO: ngram_search_fwdtree.c(338): after: 39 root, 172 non-root channels, 11 single-phone words
    add_word

    But ,it was not added into the dict.I don't know "Why".
    Thanks for your help.

     
    • Richard Kappler

      Richard Kappler - 2013-01-03

      A bit off topic, but can you please explain what exactly you mean by "I
      compiled pocketsphinx into python model"?

      On topic, it looks to me that add_word did add WHY. Look at the first two
      lines of your logfile (filling in left and filling in right). What is it
      that you expect to see that you are not?

      regards, Richard

      On Thu, Jan 3, 2013 at 5:11 AM, junyu applezhang@users.sf.net wrote:

      I compliled pocketsphinx into python model,and I want to use "add_word" to
      add new word into the dictionary.

      From the logfile,after using that funtion "add_word",it shows:

      add
      INFO: dict2pid.c(310): Filling in left-context diphones for W(?,AH)
      INFO: dict2pid.c(330): Filling in right-context diphones for AH(W,?)
      INFO: ngram_search_fwdtree.c(99): 39 unique initial diphones
      INFO: ngram_search_fwdtree.c(147): 0 root, 0 non-root channels, 12
      single-phone words
      INFO: ngram_search_fwdtree.c(186): Creating search tree
      INFO: ngram_search_fwdtree.c(191): before: 0 root, 0 non-root channels, 12
      single-phone words
      INFO: ngram_search_fwdtree.c(338): after: 39 root, 172 non-root channels,
      11 single-phone words
      add_word

      But ,it was not added into the dict.I don't know "Why".
      Thanks for your help.


      pocketsphinx the function "add_word" ,it can not add new word into the
      dictionary
      https://sourceforge.net/p/cmusphinx/discussion/speech-recognition/thread/cac05b93/?limit=50#764d


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/cmusphinx/discussion/speech-recognition/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/prefs/

      --

      quando omni flunkus moritati

       
      • junyu

        junyu - 2013-01-04

        OK!sorry for that.
        And I compiled a version so that I can use the function in python.The function "add_word" is:

        add_word(...)
        | Add a word to the dictionary and current language model.
        |
        | @param word: Name of the word to add.
        | @type word: str
        | @param phones: Pronunciation of the word, a space-separated list of phones.
        | @type phones: str
        | @param update: Update the decoder to recognize this new word.
        | If adding a number of words at once you may wish to pass
        | C{False} here.
        | @type update: bool

        My target:I want to use the funciton and add a new into the dictionary.
        You know ,the log shows .But I can't find the new added word in the dictionary.

         
  • Nickolay V. Shmyrev

    But ,it was not added into the dict.I don't know "Why".

    According to the log it was added, why don't you think it was not. Please provide more information.

     
    • junyu

      junyu - 2013-01-04

      Because I can't find the new added word in the dictionary.
      For example:
      I have a dictionary,and it show:
      a AH
      a(2) EY
      and AE N T
      and(2) AH N T
      are AA R
      are(2) ER
      around ER AW N
      around(2) ER AW N T
      backward B AE K W ER T
      backwards B AE K W ER D Z
      bye B AY
      centimeter S EH N T AH M IY T ER
      centimeters S EH N T AH M IY T ER Z

      And after using that fuction,I can't find the new added in this file.(The added word is 'one').

       
  • Nickolay V. Shmyrev

    can't find the new added in this file.

    This function adds word to in-memory dictionary. It doesn't modify a dictionary on the file system. You have to modify that file yourself with the stanard input-output functions.

     
    • junyu

      junyu - 2013-01-14

      yes!but I want to know that if the word is saved in-memory.Then what is the role of function.

       

Log in to post a comment.

MongoDB Logo MongoDB