ctcdecode icon indicating copy to clipboard operation
ctcdecode copied to clipboard

problem with CTCBeamDecoder.decode() when using a big (.arpa / .binary) file

Open aybberrada opened this issue 3 years ago • 1 comments

i'm interested in using the kenlm LM to decode/score outputs of my speech recognition model.

when I initiate my CTCBeamDecoder with model_path='./test.arpa', which is a pretty small .arpa file just for testing, ~4kb, i encounter no problem and CTCBeamDecoder.decode() outputs with no issue at all.

but when I try using the correct .arpa file for my project ( 3-gram.pruned.1e-7.arpa.gz ) which is ~90mb, it either crashes instantly or takes forever and doesn't output anything. I built a .binary file for this .arpa file to use it , but I encounter the same problem.

i tracked the problem and the issue is in ctc_decode.paddle_beam_decode_lm

is it simply because it requires a LOT of RAM to do inference with a big .arpa file ? (i got 8gb) if it's the case how much ram i need to do inference with such file?

aybberrada avatar May 11 '22 20:05 aybberrada

I am facing the same problem. Have you solve it?

afmsaif avatar Feb 25 '23 21:02 afmsaif