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

from cogneed_protos.cogneed_ks.services import stream_audio_pb2 as cogneed__protos_dot_cogneed__ks_dot_services_dot_stream__audio__pb2


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

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

    Args:
      channel: A grpc.Channel.
    """
    self.stream_audio = channel.stream_stream(
        '/ai.cogneed.cloud.speech.v1.StreamAudioService/stream_audio',
        request_serializer=cogneed__protos_dot_cogneed__ks_dot_services_dot_stream__audio__pb2.AudioDetectRequest.SerializeToString,
        response_deserializer=cogneed__protos_dot_cogneed__ks_dot_services_dot_stream__audio__pb2.DetectionResponse.FromString,
        )


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

  def stream_audio(self, request_iterator, 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_StreamAudioServiceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'stream_audio': grpc.stream_stream_rpc_method_handler(
          servicer.stream_audio,
          request_deserializer=cogneed__protos_dot_cogneed__ks_dot_services_dot_stream__audio__pb2.AudioDetectRequest.FromString,
          response_serializer=cogneed__protos_dot_cogneed__ks_dot_services_dot_stream__audio__pb2.DetectionResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'ai.cogneed.cloud.speech.v1.StreamAudioService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))


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

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

    Args:
      channel: A grpc.Channel.
    """
    self.init_session = channel.unary_unary(
        '/ai.cogneed.cloud.speech.v1.WebAudioService/init_session',
        request_serializer=cogneed__protos_dot_cogneed__ks_dot_services_dot_stream__audio__pb2.InitSessionRequest.SerializeToString,
        response_deserializer=cogneed__protos_dot_cogneed__ks_dot_services_dot_stream__audio__pb2.InitSessionResponse.FromString,
        )
    self.audio = channel.unary_unary(
        '/ai.cogneed.cloud.speech.v1.WebAudioService/audio',
        request_serializer=cogneed__protos_dot_cogneed__ks_dot_services_dot_stream__audio__pb2.WebAudioRequest.SerializeToString,
        response_deserializer=cogneed__protos_dot_cogneed__ks_dot_services_dot_stream__audio__pb2.StatusResponse.FromString,
        )
    self.end_session = channel.unary_unary(
        '/ai.cogneed.cloud.speech.v1.WebAudioService/end_session',
        request_serializer=cogneed__protos_dot_cogneed__ks_dot_services_dot_stream__audio__pb2.EndSessionRequest.SerializeToString,
        response_deserializer=cogneed__protos_dot_cogneed__ks_dot_services_dot_stream__audio__pb2.StatusResponse.FromString,
        )
    self.subscribe = channel.unary_stream(
        '/ai.cogneed.cloud.speech.v1.WebAudioService/subscribe',
        request_serializer=cogneed__protos_dot_cogneed__ks_dot_services_dot_stream__audio__pb2.SubscribeRequest.SerializeToString,
        response_deserializer=cogneed__protos_dot_cogneed__ks_dot_services_dot_stream__audio__pb2.SubscriptionResponse.FromString,
        )


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

  def init_session(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 audio(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 end_session(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 subscribe(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_WebAudioServiceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'init_session': grpc.unary_unary_rpc_method_handler(
          servicer.init_session,
          request_deserializer=cogneed__protos_dot_cogneed__ks_dot_services_dot_stream__audio__pb2.InitSessionRequest.FromString,
          response_serializer=cogneed__protos_dot_cogneed__ks_dot_services_dot_stream__audio__pb2.InitSessionResponse.SerializeToString,
      ),
      'audio': grpc.unary_unary_rpc_method_handler(
          servicer.audio,
          request_deserializer=cogneed__protos_dot_cogneed__ks_dot_services_dot_stream__audio__pb2.WebAudioRequest.FromString,
          response_serializer=cogneed__protos_dot_cogneed__ks_dot_services_dot_stream__audio__pb2.StatusResponse.SerializeToString,
      ),
      'end_session': grpc.unary_unary_rpc_method_handler(
          servicer.end_session,
          request_deserializer=cogneed__protos_dot_cogneed__ks_dot_services_dot_stream__audio__pb2.EndSessionRequest.FromString,
          response_serializer=cogneed__protos_dot_cogneed__ks_dot_services_dot_stream__audio__pb2.StatusResponse.SerializeToString,
      ),
      'subscribe': grpc.unary_stream_rpc_method_handler(
          servicer.subscribe,
          request_deserializer=cogneed__protos_dot_cogneed__ks_dot_services_dot_stream__audio__pb2.SubscribeRequest.FromString,
          response_serializer=cogneed__protos_dot_cogneed__ks_dot_services_dot_stream__audio__pb2.SubscriptionResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'ai.cogneed.cloud.speech.v1.WebAudioService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
