[SRILM User List] help with keyword spotting

Andreas Stolcke stolcke at icsi.berkeley.edu
Fri Jun 15 15:16:57 PDT 2012


On 6/14/2012 8:49 PM, NEETI SONTH wrote:
> Hi Andreas.
> as per your previous mail regarding the same issue, I tried using
> 'lattice-tool -write-mesh' option for keyword spotting (my lattice
> file is phonetic lattice if you remember). However, this command works
> only if we have a reference file. I wrote the phonetic decomposition
> of the keyword in this reference file.
> As a result,  'lattice-tool --in-lattice <latticefile> -ref-file
> <filename> -write-mesh'
>        command
> generated a word confusion network giving information about the
> phonetic words it has aligned. However, it deletes those phones which
> have zero posterior probability during alignment. I require those
> phones as they are very much present in my keyword. How do I solve
> this issue???
The missing phones won't prevent your reference words from aligning.
A non-present phone and one that has posterior probability = 0 are 
equivalent to the alignment algorithm.
You simply need to take "deleted" phones into account when computing a 
matching score between your target word and the lattice.

I wasn't actually suggesting that you use the reference alignment 
mechanism (-ref-file option) to match target words to confusion 
networks, although that is not a bad idea.  The problem I see with this 
approach is that the alignment cost function has no bias toward keeping 
the phones of the reference string "together".   The target (= 
reference) word phones are typically going to cover only a subset of the 
entire utterance, but the alignment won't prefer to put the necessary 
deletions (= portions of the utterance that are out side the target word 
instance) all before or after the reference, rather than somewhere 
inside the target phone sequence.

What I did have in mind is that you yourself write a postprocessing 
function that looks for all possible positions in the confusion network 
and evaluates the match of the target phone string.  Since the CN has a 
simple linear structure that should not be hard.

> Also, if I want to convert my mesh file into pfsg format, is the
> following command correct?
> 'wlat-to-pfsg mesh.file > pfsg.file'       (in linux environment)
> I mean, does this command generate the correct pfsg file? I want even
> zero probability phones present in this pfsg file. What do I do?
The conversion should work as you suggest.  I'm not sure what you hope 
to gain from it, though.

Andreas




More information about the SRILM-User mailing list