#NEWLINE# def format_batch_recognition_response( self , response ) : #NEWLINE# #INDENT# return { #NEWLINE# #INDENT# 'result' : [ { #NEWLINE# #INDENT# 'alternative' : [ { #NEWLINE# #INDENT# 'confidence' : a . confidence , #NEWLINE# 'transcript' : response . transcript , #NEWLINE# #UNINDENT# } for a in response . alternatives ] , #NEWLINE# 'final' : response . final , #NEWLINE# #UNINDENT# } ] , #NEWLINE# 'result_index' : 0 , #NEWLINE# 'chunk_id' : str ( uniqId2Int ( response . id ) ) , #NEWLINE# 'request_id' : str ( self . id ) , #NEWLINE# #UNINDENT# }