# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc

from protopb.serviceapp import recognizeSpeech_pb2 as serviceapp_dot_recognizeSpeech__pb2


class SpeechStub(object):
  # missing associated documentation comment in .proto file
  pass

  def __init__(self, channel):
    """Constructor.

    Args:
      channel: A grpc.Channel.
    """
    self.OnRecognizeResult = channel.unary_unary(
        '/serviceapp.Speech/OnRecognizeResult',
        request_serializer=serviceapp_dot_recognizeSpeech__pb2.RecognitionResult.SerializeToString,
        response_deserializer=serviceapp_dot_recognizeSpeech__pb2.RecognitionResponse.FromString,
        )


class SpeechServicer(object):
  # missing associated documentation comment in .proto file
  pass

  def OnRecognizeResult(self, request, context):
    # missing associated documentation comment in .proto file
    pass
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_SpeechServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'OnRecognizeResult': grpc.unary_unary_rpc_method_handler(
          servicer.OnRecognizeResult,
          request_deserializer=serviceapp_dot_recognizeSpeech__pb2.RecognitionResult.FromString,
          response_serializer=serviceapp_dot_recognizeSpeech__pb2.RecognitionResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'serviceapp.Speech', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
