Beam search for handwritten text recognition

As in the title, I was wondering if there is a function to perform beam search over characters for handwritten text recognition task (image to text).