# 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.init = channel.unary_unary(
        '/ai.cogneed.cloud.speech.v1.StreamAudioService/init',
        request_serializer=cogneed__protos_dot_cogneed__ks_dot_services_dot_stream__audio__pb2.InitAudioStreamRequest.SerializeToString,
        response_deserializer=cogneed__protos_dot_cogneed__ks_dot_services_dot_stream__audio__pb2.InitAudioStreamResponse.FromString,
        )
    self.stream = channel.unary_unary(
        '/ai.cogneed.cloud.speech.v1.StreamAudioService/stream',
        request_serializer=cogneed__protos_dot_cogneed__ks_dot_services_dot_stream__audio__pb2.StreamAudioRequest.SerializeToString,
        response_deserializer=cogneed__protos_dot_cogneed__ks_dot_services_dot_stream__audio__pb2.StreamAudioResponse.FromString,
        )
    self.finalize = channel.unary_unary(
        '/ai.cogneed.cloud.speech.v1.StreamAudioService/finalize',
        request_serializer=cogneed__protos_dot_cogneed__ks_dot_services_dot_stream__audio__pb2.EndAudioStreamRequest.SerializeToString,
        response_deserializer=cogneed__protos_dot_cogneed__ks_dot_services_dot_stream__audio__pb2.StreamAudioResponse.FromString,
        )


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

  def init(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 stream(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 finalize(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_StreamAudioServiceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'init': grpc.unary_unary_rpc_method_handler(
          servicer.init,
          request_deserializer=cogneed__protos_dot_cogneed__ks_dot_services_dot_stream__audio__pb2.InitAudioStreamRequest.FromString,
          response_serializer=cogneed__protos_dot_cogneed__ks_dot_services_dot_stream__audio__pb2.InitAudioStreamResponse.SerializeToString,
      ),
      'stream': grpc.unary_unary_rpc_method_handler(
          servicer.stream,
          request_deserializer=cogneed__protos_dot_cogneed__ks_dot_services_dot_stream__audio__pb2.StreamAudioRequest.FromString,
          response_serializer=cogneed__protos_dot_cogneed__ks_dot_services_dot_stream__audio__pb2.StreamAudioResponse.SerializeToString,
      ),
      'finalize': grpc.unary_unary_rpc_method_handler(
          servicer.finalize,
          request_deserializer=cogneed__protos_dot_cogneed__ks_dot_services_dot_stream__audio__pb2.EndAudioStreamRequest.FromString,
          response_serializer=cogneed__protos_dot_cogneed__ks_dot_services_dot_stream__audio__pb2.StreamAudioResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'ai.cogneed.cloud.speech.v1.StreamAudioService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
