wav2letter icon indicating copy to clipboard operation
wav2letter copied to clipboard

Past hypothesis rescoring based on future context with beam search

Open janvainer opened this issue 4 years ago • 4 comments

When I run online inference, it seems like once a part of a sentence is printed to the stdout, the part of the sentence never changes regardless of the following spoken words. I would expect that the best beam search hypothesis may change based on new input, which may alter the past transcriptions due to more informatio. Is there a way how to update the past results based on future rescorings of the beams in wav2letter? I was using the simple online asr example with docker with default settings.

janvainer avatar Jul 15 '20 06:07 janvainer

Online inference is processing data by chunks and history removed from the beam-search decoder, so we don't fix previous output on the fly as we consume more future. If you don't need online system, just use standard decoder which will construct the final transcription at the end optimizing the full path from beginning to end.

cc @vineelpratap for more details and suggestions on this.

tlikhomanenko avatar Jul 16 '20 06:07 tlikhomanenko

Well thats a shame. is there any reason for that? I specifically need to do online asr :/ The online decoder is quite fast, but it would be great if the beam search could accumulate hypotheses that overlapo between chunks. It would probably boost performance a bit.

janvainer avatar Jul 16 '20 06:07 janvainer

This would be a really useful feature. Is it possible to add this feature to the online inference module? Or is it just not possible at the moment? Ready to contribute, if necessary.

mohitsshah avatar Aug 20 '20 14:08 mohitsshah

I think that it is possible and possibly useful. @vineelpratap WDYT ?

avidov avatar Aug 28 '20 05:08 avidov