Confidence on the Partial Hypothesis?

280 views
Skip to first unread message

Yi Sun

unread,
Jun 19, 2019, 6:24:21 PM6/19/19
to kaldi-help
Hi,

I am wondering whether it is possible to get a reasonable confidence measure very quickly on the partial result produced by online lattice fast decoder.

From my understanding, to get word level confidence, one need to

1. Copy raw lattice out (no const accessor)

2. Convert raw lattice into a compact lattice (determinization, etc.)

3. Calculate MBR on the compact lattice.

This process seems to be quite expensive if we want to use it on partial results. In our use case, we produce partial result every 0.1 to 0.2s (using GetBestPath)

Thanks

Yi

Daniel Povey

unread,
Jun 19, 2019, 6:33:00 PM6/19/19
to kaldi-help
You could try doing MBR on the non-determinized lattice (just convert to CompactLattice without determinizing) and see what it gives you.
At some point in the next few weeks I hope to merge some work done mostly by Zhehuai Chen on incremental determinization, which will make it much cheaper to get the determinized lattice incrementally.



--
Go to http://kaldi-asr.org/forums.html find out how to join
---
You received this message because you are subscribed to the Google Groups "kaldi-help" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kaldi-help+...@googlegroups.com.
To post to this group, send email to kaldi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kaldi-help/fc86a3d5-207b-4726-941d-25d52def0840%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Yi Sun

unread,
Jun 19, 2019, 6:49:20 PM6/19/19
to kaldi-help
Quickly experimented with the idea

Code snippet

  // decoder_ is SingleUtteranceNnet3Decoder
  decoder_->Decoder().GetRawLattice(&partial_lat_);
  // Convert to compact lattice as MBR (sausage) likes it.
  ::fst::ConvertLattice(partial_lat_, &compact_lat_);
  PopulateBestHypothesisFromCompactLattice(compact_lat_, &hypothesis_);  // this does the MBR computation

The RTF (with partial result checking interval) goes up from 0.1 to 0.5, where 0.1 is when we call decoder_->GetBestPath(&partial_lat_); It seems the speed degradation is significant.

On Wednesday, June 19, 2019 at 3:33:00 PM UTC-7, Dan Povey wrote:
You could try doing MBR on the non-determinized lattice (just convert to CompactLattice without determinizing) and see what it gives you.
At some point in the next few weeks I hope to merge some work done mostly by Zhehuai Chen on incremental determinization, which will make it much cheaper to get the determinized lattice incrementally.



On Wed, Jun 19, 2019 at 6:24 PM Yi Sun <ros...@gmail.com> wrote:
Hi,

I am wondering whether it is possible to get a reasonable confidence measure very quickly on the partial result produced by online lattice fast decoder.

From my understanding, to get word level confidence, one need to

1. Copy raw lattice out (no const accessor)

2. Convert raw lattice into a compact lattice (determinization, etc.)

3. Calculate MBR on the compact lattice.

This process seems to be quite expensive if we want to use it on partial results. In our use case, we produce partial result every 0.1 to 0.2s (using GetBestPath)

Thanks

Yi

--
Go to http://kaldi-asr.org/forums.html find out how to join
---
You received this message because you are subscribed to the Google Groups "kaldi-help" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kaldi...@googlegroups.com.

Daniel Povey

unread,
Jun 19, 2019, 6:55:15 PM6/19/19
to kaldi-help
A narrower lattice beam might help.

To unsubscribe from this group and stop receiving emails from it, send an email to kaldi-help+...@googlegroups.com.

To post to this group, send email to kaldi...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages