[SRILM User List] help with keyword spotting

NEETI SONTH neetisonth at gmail.com
Thu Jun 14 20:49:01 PDT 2012


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???
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?

On 6/14/12, Andreas Stolcke <stolcke at icsi.berkeley.edu> wrote:
>
> The lattice-tool -write-ngram-index option was created for keyword (and
> keyphrase) spotting, but would typically be used with word-based
> lattices.  However, you could write a phone ngram index (using fairly
> high -order value) and then do approximate matching of your
> pronunciation against this index.    The output format is described in
> the man page.
>
> In your case you might do better writing out a phone confusion network
> (lattice-tool -write-mesh) and then match against that.
>
> Either way, you won't find a complete ready-made solution.  You have to
> postprocess the lattice-tool output using an appropriate matching function.
>
> Andreas
>
> On 6/14/2012 2:55 AM, NEETI SONTH wrote:
>> Andreas
>> I want to do keyword-spotting in srilm. I have a lattice-file in
>> htk-format generated from a single sentence utterance. The
>> lattice-file is phonetic lattice. Now I want to search/spot a word in
>> the lattice-file. I have the phonetic decomposition of the word I am
>> spotting for. Can you brief me with the necessary steps and srilm
>> commands for the same?
>> I tried using *lattice-tool  -read-htk -in-lattice <filename1> -ppl
>> <sentence.file>* .
>>
>> *sentence.file *just contains the keyword I am spotting for. But what
>> I observed from one of your other user-mails, that *-ppl* only works
>> when the phonetic decomposition of the keyword exactly matches with
>> that of a path in the lattice. However, it is highly improbable that :
>> when I speak, the lattice file generated has a phonetic path which
>> exactly matches with the phonetic decomposition of the keyword.
>> How then would we spot a keyword?
>> I also want to know how *" -write-ngram-index" option *helps in
>> keyword spotting?
>> Please help.
>> thanks
>>
>> with regards,
>> Neeti Sonth
>>
>>
>> On Wed, Jun 13, 2012 at 11:33 AM, Andreas Stolcke
>> <stolcke at icsi.berkeley.edu <mailto:stolcke at icsi.berkeley.edu>> wrote:
>>
>>     On 6/9/2012 3:46 AM, NEETI SONTH wrote:
>>>
>>>
>>>>             Hi.
>>>
>>>     When I run the command 'lattice-tool -max-time 4 -write-ngrams
>>>     <filename> -in-lattice-list <filename2>'
>>>        the command limits the maximum time of operation for just the
>>>     first lattice file in the list of lattice files. For remaining
>>>     lattice-files, it doesnt limit the time of operation. The command
>>>     says "LIMITS THE MAXIMUM TIME OF OPERATION PER LATTICE" ... So
>>>     why isnt it doing so???
>>>
>>>     thanks.
>>>     Neeti Sonth
>>>
>>
>>     It seems that in Linux and compatible systems, unlike in Solaris,
>>     where the code was originally developed, the SIGALRM handler needs
>>     to use sigsetjmp/siglongjmp()  instead of just plain
>>     setjmp/longjmp, or else subsequent alarms won't invoke the handler
>>     due to signal mask modification. The effect was that lattice-tool
>>     -timeout would work only for the first lattice triggering the
>>     timeout on Linux and Cygwin systems.
>>
>>     The attached patch should fix the problem.
>>
>>     Andreas
>>
>>
>>
>>
>
>
>


More information about the SRILM-User mailing list