<reponame>aswinpradeep/inference_service_wrapper
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc

import grpc_stubs.audio_to_text_pb2 as audio__to__text__pb2


class RecognizeStub(object):
    """Missing associated documentation comment in .proto file."""

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

        Args:
            channel: A grpc.Channel.
        """
        self.recognize_audio = channel.stream_stream(
                '/recognize.Recognize/recognize_audio',
                request_serializer=audio__to__text__pb2.Message.SerializeToString,
                response_deserializer=audio__to__text__pb2.Response.FromString,
                )
        self.recognize_audio_file_mode = channel.stream_stream(
                '/recognize.Recognize/recognize_audio_file_mode',
                request_serializer=audio__to__text__pb2.FileUploadMessage.SerializeToString,
                response_deserializer=audio__to__text__pb2.Response.FromString,
                )
        self.recognize_srt = channel.unary_unary(
                '/recognize.Recognize/recognize_srt',
                request_serializer=audio__to__text__pb2.SRTRequest.SerializeToString,
                response_deserializer=audio__to__text__pb2.SRTResponse.FromString,
                )
        self.punctuate = channel.unary_unary(
                '/recognize.Recognize/punctuate',
                request_serializer=audio__to__text__pb2.PunctuateRequest.SerializeToString,
                response_deserializer=audio__to__text__pb2.PunctuateResponse.FromString,
                )


class RecognizeServicer(object):
    """Missing associated documentation comment in .proto file."""

    def recognize_audio(self, request_iterator, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def recognize_audio_file_mode(self, request_iterator, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def recognize_srt(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def punctuate(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_RecognizeServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'recognize_audio': grpc.stream_stream_rpc_method_handler(
                    servicer.recognize_audio,
                    request_deserializer=audio__to__text__pb2.Message.FromString,
                    response_serializer=audio__to__text__pb2.Response.SerializeToString,
            ),
            'recognize_audio_file_mode': grpc.stream_stream_rpc_method_handler(
                    servicer.recognize_audio_file_mode,
                    request_deserializer=audio__to__text__pb2.FileUploadMessage.FromString,
                    response_serializer=audio__to__text__pb2.Response.SerializeToString,
            ),
            'recognize_srt': grpc.unary_unary_rpc_method_handler(
                    servicer.recognize_srt,
                    request_deserializer=audio__to__text__pb2.SRTRequest.FromString,
                    response_serializer=audio__to__text__pb2.SRTResponse.SerializeToString,
            ),
            'punctuate': grpc.unary_unary_rpc_method_handler(
                    servicer.punctuate,
                    request_deserializer=audio__to__text__pb2.PunctuateRequest.FromString,
                    response_serializer=audio__to__text__pb2.PunctuateResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'recognize.Recognize', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class Recognize(object):
    """Missing associated documentation comment in .proto file."""

    @staticmethod
    def recognize_audio(request_iterator,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.stream_stream(request_iterator, target, '/recognize.Recognize/recognize_audio',
            audio__to__text__pb2.Message.SerializeToString,
            audio__to__text__pb2.Response.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def recognize_audio_file_mode(request_iterator,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.stream_stream(request_iterator, target, '/recognize.Recognize/recognize_audio_file_mode',
            audio__to__text__pb2.FileUploadMessage.SerializeToString,
            audio__to__text__pb2.Response.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def recognize_srt(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/recognize.Recognize/recognize_srt',
            audio__to__text__pb2.SRTRequest.SerializeToString,
            audio__to__text__pb2.SRTResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def punctuate(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/recognize.Recognize/punctuate',
            audio__to__text__pb2.PunctuateRequest.SerializeToString,
            audio__to__text__pb2.PunctuateResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc

import grpc_stubs.audio_to_text_pb2 as audio__to__text__pb2


class RecognizeStub(object):
    """Missing associated documentation comment in .proto file."""

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

        Args:
            channel: A grpc.Channel.
        """
        self.recognize_audio = channel.stream_stream(
                '/recognize.Recognize/recognize_audio',
                request_serializer=audio__to__text__pb2.Message.SerializeToString,
                response_deserializer=audio__to__text__pb2.Response.FromString,
                )
        self.recognize_audio_file_mode = channel.stream_stream(
                '/recognize.Recognize/recognize_audio_file_mode',
                request_serializer=audio__to__text__pb2.FileUploadMessage.SerializeToString,
                response_deserializer=audio__to__text__pb2.Response.FromString,
                )
        self.recognize_srt = channel.unary_unary(
                '/recognize.Recognize/recognize_srt',
                request_serializer=audio__to__text__pb2.SRTRequest.SerializeToString,
                response_deserializer=audio__to__text__pb2.SRTResponse.FromString,
                )
        self.punctuate = channel.unary_unary(
                '/recognize.Recognize/punctuate',
                request_serializer=audio__to__text__pb2.PunctuateRequest.SerializeToString,
                response_deserializer=audio__to__text__pb2.PunctuateResponse.FromString,
                )


class RecognizeServicer(object):
    """Missing associated documentation comment in .proto file."""

    def recognize_audio(self, request_iterator, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def recognize_audio_file_mode(self, request_iterator, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def recognize_srt(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def punctuate(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_RecognizeServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'recognize_audio': grpc.stream_stream_rpc_method_handler(
                    servicer.recognize_audio,
                    request_deserializer=audio__to__text__pb2.Message.FromString,
                    response_serializer=audio__to__text__pb2.Response.SerializeToString,
            ),
            'recognize_audio_file_mode': grpc.stream_stream_rpc_method_handler(
                    servicer.recognize_audio_file_mode,
                    request_deserializer=audio__to__text__pb2.FileUploadMessage.FromString,
                    response_serializer=audio__to__text__pb2.Response.SerializeToString,
            ),
            'recognize_srt': grpc.unary_unary_rpc_method_handler(
                    servicer.recognize_srt,
                    request_deserializer=audio__to__text__pb2.SRTRequest.FromString,
                    response_serializer=audio__to__text__pb2.SRTResponse.SerializeToString,
            ),
            'punctuate': grpc.unary_unary_rpc_method_handler(
                    servicer.punctuate,
                    request_deserializer=audio__to__text__pb2.PunctuateRequest.FromString,
                    response_serializer=audio__to__text__pb2.PunctuateResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'recognize.Recognize', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class Recognize(object):
    """Missing associated documentation comment in .proto file."""

    @staticmethod
    def recognize_audio(request_iterator,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.stream_stream(request_iterator, target, '/recognize.Recognize/recognize_audio',
            audio__to__text__pb2.Message.SerializeToString,
            audio__to__text__pb2.Response.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def recognize_audio_file_mode(request_iterator,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.stream_stream(request_iterator, target, '/recognize.Recognize/recognize_audio_file_mode',
            audio__to__text__pb2.FileUploadMessage.SerializeToString,
            audio__to__text__pb2.Response.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def recognize_srt(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/recognize.Recognize/recognize_srt',
            audio__to__text__pb2.SRTRequest.SerializeToString,
            audio__to__text__pb2.SRTResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def punctuate(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/recognize.Recognize/punctuate',
            audio__to__text__pb2.PunctuateRequest.SerializeToString,
            audio__to__text__pb2.PunctuateResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! Client and server classes corresponding to protobuf-defined services. Missing associated documentation comment in .proto file. Constructor.          Args:             channel: A grpc.Channel. Missing associated documentation comment in .proto file. Missing associated documentation comment in .proto file. Missing associated documentation comment in .proto file. Missing associated documentation comment in .proto file. Missing associated documentation comment in .proto file. # This class is part of an EXPERIMENTAL API. Missing associated documentation comment in .proto file.