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

from cogneed_protos.ai.cogneed.api.audio import common_pb2 as cogneed__protos_dot_ai_dot_cogneed_dot_api_dot_audio_dot_common__pb2
from cogneed_protos.ai.cogneed.api.audio.stream import audio_stream_pb2 as cogneed__protos_dot_ai_dot_cogneed_dot_api_dot_audio_dot_stream_dot_audio__stream__pb2
from cogneed_protos.ai.cogneed.api import common_pb2 as cogneed__protos_dot_ai_dot_cogneed_dot_api_dot_common__pb2


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

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

    Args:
      channel: A grpc.Channel.
    """
    self.InitSession = channel.unary_unary(
        '/ai.cogneed.api.audio.stream.StreamAudioService/InitSession',
        request_serializer=cogneed__protos_dot_ai_dot_cogneed_dot_api_dot_audio_dot_common__pb2.UserInfo.SerializeToString,
        response_deserializer=cogneed__protos_dot_ai_dot_cogneed_dot_api_dot_audio_dot_stream_dot_audio__stream__pb2.InitSessionResponse.FromString,
        )
    self.SendAudio = channel.unary_unary(
        '/ai.cogneed.api.audio.stream.StreamAudioService/SendAudio',
        request_serializer=cogneed__protos_dot_ai_dot_cogneed_dot_api_dot_audio_dot_stream_dot_audio__stream__pb2.SendAudioRequest.SerializeToString,
        response_deserializer=cogneed__protos_dot_ai_dot_cogneed_dot_api_dot_audio_dot_common__pb2.OptionalDetectionResponse.FromString,
        )
    self.EndSession = channel.unary_unary(
        '/ai.cogneed.api.audio.stream.StreamAudioService/EndSession',
        request_serializer=cogneed__protos_dot_ai_dot_cogneed_dot_api_dot_audio_dot_stream_dot_audio__stream__pb2.EndSessionRequest.SerializeToString,
        response_deserializer=cogneed__protos_dot_ai_dot_cogneed_dot_api_dot_common__pb2.AckResponse.FromString,
        )


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

  def InitSession(self, request, context):
    """Create a new session.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def SendAudio(self, request, context):
    """Send an audio blob to check if it contain a keyword.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def EndSession(self, request, context):
    """Kill the session with the given uuid.
    """
    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 = {
      'InitSession': grpc.unary_unary_rpc_method_handler(
          servicer.InitSession,
          request_deserializer=cogneed__protos_dot_ai_dot_cogneed_dot_api_dot_audio_dot_common__pb2.UserInfo.FromString,
          response_serializer=cogneed__protos_dot_ai_dot_cogneed_dot_api_dot_audio_dot_stream_dot_audio__stream__pb2.InitSessionResponse.SerializeToString,
      ),
      'SendAudio': grpc.unary_unary_rpc_method_handler(
          servicer.SendAudio,
          request_deserializer=cogneed__protos_dot_ai_dot_cogneed_dot_api_dot_audio_dot_stream_dot_audio__stream__pb2.SendAudioRequest.FromString,
          response_serializer=cogneed__protos_dot_ai_dot_cogneed_dot_api_dot_audio_dot_common__pb2.OptionalDetectionResponse.SerializeToString,
      ),
      'EndSession': grpc.unary_unary_rpc_method_handler(
          servicer.EndSession,
          request_deserializer=cogneed__protos_dot_ai_dot_cogneed_dot_api_dot_audio_dot_stream_dot_audio__stream__pb2.EndSessionRequest.FromString,
          response_serializer=cogneed__protos_dot_ai_dot_cogneed_dot_api_dot_common__pb2.AckResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'ai.cogneed.api.audio.stream.StreamAudioService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
