General Discussion

How can I make new words..?
User: Visitor
Date: 2/22/2007 4:51 am
Views: 8743
Rating: 40


I'm working on a project using Julian for speechrecognition and have followed the instruction regarding the grammar, but cannot find out how, if possible, I can create new words not listed in the dictionary-file/lexicon downloaded. I have created the grammarfiles but do not know how I can recognice these words. When I make the acoustic Model I will declare the pronaunsation of them, but compiling the grammar it just complaining about errors regarding these words, how can I help this..?


--- (Edited on 2/22/2007 4:51 am [GMT-0600] by Visitor) ---

Re: How can I make new words..?
User: kmaclean
Date: 2/22/2007 8:17 am
Views: 1533
Rating: 31

Hi Daniel,

There are a few approaches: 

1. Add the new word to your pronunciation dictionary. 

One way is to simply add your 'out-of-vocabulary' grammar words to your dictionary (I am assuming you are using the voxforge_dictionary in Step 2 of the VoxForge Tutorial).  To do this, you need to look at the pronunciation of similar words in the dictionary, and then create a new pronunciation entry for your word. 

For example, if you want to add the word "winward" to your dictionary, you would look up words that are similar, such as:

WINWOOD [WINWOOD] w ih n w uh d

In this case, this gives us the pronunciation for the "win" in the word "winward".  Next, we look for words that contain "ward" in the dictionary, such as:

WOODWARD [WOODWARD] w uh d w er d
WARD [WARD] w ow r d

Notice that although the words "woodward" and "ward" contain the same sequence of letters (ward), they are pronounced differently - they have different phoneme sequences.  Next you need to make a judgment call based on your own knowledge of your English dialect. For me, the way I pronounce the word part "ward" in "winward" is closer to the sounds I make in "woodward" that in the word "ward".  Therefore, the final pronunciation dictionary entry I would use would look like this:

WINWARD [WINWARD] w ih n w er d

You then need to add this word in the Pronunciation Dictionary in Alphabetical sequence, and re-run the HDMan command in Step 2 of the VoxForge Tutorial.  You need to repeat these steps for all the "out-of-vocabulary" words in your dictionary. 

2. Use a more complete pronunciation dictionary 

The VoxForge Tutorial and How-to use a smaller pronunciation dictionary that what is used for the creation of the VoxForge Acoustic Models.  This is an inconsistency that I have not had time to address yet (see ticket #52).

The pronunciation dictionary (also called lexicon) used in the Tutorial and How-to is based on the ISIP Switchboard corpus and contains around 27,500 words.  Whereas the dictionary used in the creation of the Voxforge Lexicon used in the creation of the VoxForge Acoustic Models is based on version 0.6 of the CMU Pronunciation Dictionary, which contains around 130,000 words.   Unfortunately, the Switchboard and CMU pronunciation dictionaries use slightly different phoneme syntax.  This is enough to make then incompatible from a Grammar and Acoustic Model creation perspective.

Therefore, if you want to use the Voxforge Lexicon used in the creation of the VoxForge Acoustic Models as your dictionary (because it includes words that are missing from the one used in the Tutorial and How-to), you need to update the pronunciations used in your grammar, and re-train your Acoustic Models using this new dictionary (because the hmms in your Acoustic Models need to use the same phonemes as in your dictionary).



--- (Edited on 2/22/2007 9:17 am [GMT-0500] by kmaclean) ---

Re: How can I make new words..?
User: Visitor
Date: 2/22/2007 8:56 am
Views: 695
Rating: 34

Thank you very much for this very precise and good answer. Now I know exactly what to do.. It seems like it isn't hard to do and the links you have given me is perfect..

Thanks alot once more, I appreciate your help very much..


--- (Edited on 2/22/2007 8:56 am [GMT-0600] by Visitor) ---

Re: How can I make new words..?
User: swbluto
Date: 9/14/2010 12:30 am
Views: 128
Rating: 10

Hello, I was looking at Option number 1 listed in your post and it says to add it to the "pronunctiation dictionary" and rerun HDMan. Is this pronunciation dictionary the entire dictionary used to create the hmmdefs (And, thus, you'd have to go through all the steps again to create the hmmdefs), or just the .voca file used?

I tried just changing the voca file, and recompiled using HDMAN, but then julian complained of not finding my particular word's triphone in the dictionary. It appears the 'dictionary' it was referring to was the hmmdefs, since that was the only other input it seemed to require (Other than the tied list), and I didn't change that nor the tiedlist.

Recompiling it (A 5 minute process it seems, probably even substantially longer if I used the voxForce speech corpus which is about the only one that seems to work well for me.) seems pretty long, and it seems there should be a more streamlined way to add an arbitrary word. I looked into HTK, and they can apparently make an entire hmm for a word using Hint + Hrest (As detailed in the middle of page 18 of the HTK manual); I'm thinking once you got the individual word HMM, just add it to the HMMdefs file. Then, I just need to reload the HMMdefs within julian... but can julian recognize an abitrary word HMM? The "Quick Julian Start" seems to rely solely on monophone and triphone modes, and not whole word hmms, but according to the link at , it has...

"(Rev. 4) Rapid isolated word recognition"

Suggesting I could use an individual word HMM, and so adding an arbitrary word shouldn't necessarily be a 5+ minute recompilation process (To get the entire HMMdefs file, again.).





--- (Edited on 9/14/2010 12:31 am [GMT-0500] by Visitor) ---

Re: How can I make new words..?
User: swbluto
Date: 9/14/2010 12:35 am
Views: 1881
Rating: 8

This thread didn't seem to go up after my last "visitor post", so I'm now posting while logged in to hopefully bump it.Smile

--- (Edited on 9/14/2010 12:35 am [GMT-0500] by swbluto) ---