How to get the confidence level of the words during prediction?

I followed this comment, but not able to find get_beam_search_result function, also how to use them to print it during prediction time.

This is old, have you checked out the Metadata API?
https://deepspeech.readthedocs.io/en/v0.6.1/Structs.html#_CPPv48Metadata
https://deepspeech.readthedocs.io/en/v0.6.1/C-API.html#_CPPv427DS_SpeechToTextWithMetadataP10ModelStatePKsj
NB: it’s available in all bindings, not just C API.