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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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?
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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').
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
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:
--
quando omni flunkus moritati
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.
According to the log it was added, why don't you think it was not. Please provide more information.
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').
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.
yes!but I want to know that if the word is saved in-memory.Then what is the role of function.