text icon indicating copy to clipboard operation
text copied to clipboard

Emissions datatype mismatch

Open sindhu-2507 opened this issue 1 year ago • 0 comments

I am using lexiconfreedecoder with kenlm arpa and bin language model. The decoder is loaded but the i am unable to decode using float emission values. I get the following error. Can someone please help me with this?

decoded_output = decoder.decode(batch)
TypeError: decode(): incompatible function arguments. The following argument types are supported:
    1. (self: flashlight.lib.text.flashlight_lib_text_decoder.LexiconFreeDecoder, emissions: int, T: int, N: int) -> List[flashlight.lib.text.flashlight_lib_text_decoder.DecodeResult]

In the above lines, batch is of type float32 with shape (batch_size, T, N). The datatype of emissions in the error is specified to be int, but shouldn't it be a vector of float32?

sindhu-2507 avatar Jan 21 '25 08:01 sindhu-2507