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

import audio_pb2 as audio__pb2


class AudioServiceGrpcStub(object):
    """定义服务,用在rpc传输中
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.setAudioAsr = channel.unary_unary(
                '/AudioPackage.AudioServiceGrpc/setAudioAsr',
                request_serializer=audio__pb2.AudioAsrRequest.SerializeToString,
                response_deserializer=audio__pb2.AudioAsrResponse.FromString,
                )
        self.setAudioTts = channel.unary_unary(
                '/AudioPackage.AudioServiceGrpc/setAudioTts',
                request_serializer=audio__pb2.AudioTtsRequest.SerializeToString,
                response_deserializer=audio__pb2.AudioCommonResponse.FromString,
                )
        self.setAudioNlp = channel.unary_unary(
                '/AudioPackage.AudioServiceGrpc/setAudioNlp',
                request_serializer=audio__pb2.AudioNlpRequest.SerializeToString,
                response_deserializer=audio__pb2.AudioNlpResponse.FromString,
                )
        self.insertAudioFile = channel.unary_unary(
                '/AudioPackage.AudioServiceGrpc/insertAudioFile',
                request_serializer=audio__pb2.AudioFileRequest.SerializeToString,
                response_deserializer=audio__pb2.AudioCommonResponse.FromString,
                )
        self.deleteAudioFile = channel.unary_unary(
                '/AudioPackage.AudioServiceGrpc/deleteAudioFile',
                request_serializer=audio__pb2.AudioFileRequest.SerializeToString,
                response_deserializer=audio__pb2.AudioCommonResponse.FromString,
                )
        self.getAudioFileList = channel.unary_unary(
                '/AudioPackage.AudioServiceGrpc/getAudioFileList',
                request_serializer=audio__pb2.AudioFileListRequest.SerializeToString,
                response_deserializer=audio__pb2.AudioFileListResponse.FromString,
                )
        self.modifyAudioFileName = channel.unary_unary(
                '/AudioPackage.AudioServiceGrpc/modifyAudioFileName',
                request_serializer=audio__pb2.ModifyAudioNameRequest.SerializeToString,
                response_deserializer=audio__pb2.AudioCommonResponse.FromString,
                )
        self.playAudioFile = channel.unary_unary(
                '/AudioPackage.AudioServiceGrpc/playAudioFile',
                request_serializer=audio__pb2.AudioPlayRequest.SerializeToString,
                response_deserializer=audio__pb2.AudioCommonResponse.FromString,
                )
        self.startRecordAudioFile = channel.unary_unary(
                '/AudioPackage.AudioServiceGrpc/startRecordAudioFile',
                request_serializer=audio__pb2.AudioEmptyRequest.SerializeToString,
                response_deserializer=audio__pb2.AudioCommonResponse.FromString,
                )
        self.stopRecordAudioFile = channel.unary_unary(
                '/AudioPackage.AudioServiceGrpc/stopRecordAudioFile',
                request_serializer=audio__pb2.AudioEmptyRequest.SerializeToString,
                response_deserializer=audio__pb2.AudioRecordResponse.FromString,
                )
        self.stopPlayAudio = channel.unary_unary(
                '/AudioPackage.AudioServiceGrpc/stopPlayAudio',
                request_serializer=audio__pb2.AudioEmptyRequest.SerializeToString,
                response_deserializer=audio__pb2.AudioCommonResponse.FromString,
                )
        self.getDirectionOfAudio = channel.unary_unary(
                '/AudioPackage.AudioServiceGrpc/getDirectionOfAudio',
                request_serializer=audio__pb2.AudioDirectionRequest.SerializeToString,
                response_deserializer=audio__pb2.AudioDirectionResponse.FromString,
                )
        self.enableAudioDirection = channel.unary_unary(
                '/AudioPackage.AudioServiceGrpc/enableAudioDirection',
                request_serializer=audio__pb2.AudioEmptyRequest.SerializeToString,
                response_deserializer=audio__pb2.AudioCommonResponse.FromString,
                )
        self.disableAudioDirection = channel.unary_unary(
                '/AudioPackage.AudioServiceGrpc/disableAudioDirection',
                request_serializer=audio__pb2.AudioEmptyRequest.SerializeToString,
                response_deserializer=audio__pb2.AudioCommonResponse.FromString,
                )
        self.getCurrentRms = channel.unary_unary(
                '/AudioPackage.AudioServiceGrpc/getCurrentRms',
                request_serializer=audio__pb2.AudioEmptyRequest.SerializeToString,
                response_deserializer=audio__pb2.AudioRmsResponse.FromString,
                )


class AudioServiceGrpcServicer(object):
    """定义服务,用在rpc传输中
    """

    def setAudioAsr(self, request, context):
        """ASR语音
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def setAudioTts(self, request, context):
        """设置TTS
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def setAudioNlp(self, request, context):
        """设置NLP
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def insertAudioFile(self, request, context):
        """添加音频文件到数据库
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def deleteAudioFile(self, request, context):
        """删除音频文件
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def getAudioFileList(self, request, context):
        """获取音频列表
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def modifyAudioFileName(self, request, context):
        """修改音频名称
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def playAudioFile(self, request, context):
        """播放音频文件
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def startRecordAudioFile(self, request, context):
        """开始录音
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def stopRecordAudioFile(self, request, context):
        """停止录音
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def stopPlayAudio(self, request, context):
        """停止播放音频
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def getDirectionOfAudio(self, request, context):
        """获取声音方向角度
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def enableAudioDirection(self, request, context):
        """开启声源定位
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def disableAudioDirection(self, request, context):
        """关闭声源定位
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def getCurrentRms(self, request, context):
        """获取声音响度(db)
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_AudioServiceGrpcServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'setAudioAsr': grpc.unary_unary_rpc_method_handler(
                    servicer.setAudioAsr,
                    request_deserializer=audio__pb2.AudioAsrRequest.FromString,
                    response_serializer=audio__pb2.AudioAsrResponse.SerializeToString,
            ),
            'setAudioTts': grpc.unary_unary_rpc_method_handler(
                    servicer.setAudioTts,
                    request_deserializer=audio__pb2.AudioTtsRequest.FromString,
                    response_serializer=audio__pb2.AudioCommonResponse.SerializeToString,
            ),
            'setAudioNlp': grpc.unary_unary_rpc_method_handler(
                    servicer.setAudioNlp,
                    request_deserializer=audio__pb2.AudioNlpRequest.FromString,
                    response_serializer=audio__pb2.AudioNlpResponse.SerializeToString,
            ),
            'insertAudioFile': grpc.unary_unary_rpc_method_handler(
                    servicer.insertAudioFile,
                    request_deserializer=audio__pb2.AudioFileRequest.FromString,
                    response_serializer=audio__pb2.AudioCommonResponse.SerializeToString,
            ),
            'deleteAudioFile': grpc.unary_unary_rpc_method_handler(
                    servicer.deleteAudioFile,
                    request_deserializer=audio__pb2.AudioFileRequest.FromString,
                    response_serializer=audio__pb2.AudioCommonResponse.SerializeToString,
            ),
            'getAudioFileList': grpc.unary_unary_rpc_method_handler(
                    servicer.getAudioFileList,
                    request_deserializer=audio__pb2.AudioFileListRequest.FromString,
                    response_serializer=audio__pb2.AudioFileListResponse.SerializeToString,
            ),
            'modifyAudioFileName': grpc.unary_unary_rpc_method_handler(
                    servicer.modifyAudioFileName,
                    request_deserializer=audio__pb2.ModifyAudioNameRequest.FromString,
                    response_serializer=audio__pb2.AudioCommonResponse.SerializeToString,
            ),
            'playAudioFile': grpc.unary_unary_rpc_method_handler(
                    servicer.playAudioFile,
                    request_deserializer=audio__pb2.AudioPlayRequest.FromString,
                    response_serializer=audio__pb2.AudioCommonResponse.SerializeToString,
            ),
            'startRecordAudioFile': grpc.unary_unary_rpc_method_handler(
                    servicer.startRecordAudioFile,
                    request_deserializer=audio__pb2.AudioEmptyRequest.FromString,
                    response_serializer=audio__pb2.AudioCommonResponse.SerializeToString,
            ),
            'stopRecordAudioFile': grpc.unary_unary_rpc_method_handler(
                    servicer.stopRecordAudioFile,
                    request_deserializer=audio__pb2.AudioEmptyRequest.FromString,
                    response_serializer=audio__pb2.AudioRecordResponse.SerializeToString,
            ),
            'stopPlayAudio': grpc.unary_unary_rpc_method_handler(
                    servicer.stopPlayAudio,
                    request_deserializer=audio__pb2.AudioEmptyRequest.FromString,
                    response_serializer=audio__pb2.AudioCommonResponse.SerializeToString,
            ),
            'getDirectionOfAudio': grpc.unary_unary_rpc_method_handler(
                    servicer.getDirectionOfAudio,
                    request_deserializer=audio__pb2.AudioDirectionRequest.FromString,
                    response_serializer=audio__pb2.AudioDirectionResponse.SerializeToString,
            ),
            'enableAudioDirection': grpc.unary_unary_rpc_method_handler(
                    servicer.enableAudioDirection,
                    request_deserializer=audio__pb2.AudioEmptyRequest.FromString,
                    response_serializer=audio__pb2.AudioCommonResponse.SerializeToString,
            ),
            'disableAudioDirection': grpc.unary_unary_rpc_method_handler(
                    servicer.disableAudioDirection,
                    request_deserializer=audio__pb2.AudioEmptyRequest.FromString,
                    response_serializer=audio__pb2.AudioCommonResponse.SerializeToString,
            ),
            'getCurrentRms': grpc.unary_unary_rpc_method_handler(
                    servicer.getCurrentRms,
                    request_deserializer=audio__pb2.AudioEmptyRequest.FromString,
                    response_serializer=audio__pb2.AudioRmsResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'AudioPackage.AudioServiceGrpc', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class AudioServiceGrpc(object):
    """定义服务,用在rpc传输中
    """

    @staticmethod
    def setAudioAsr(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, '/AudioPackage.AudioServiceGrpc/setAudioAsr',
            audio__pb2.AudioAsrRequest.SerializeToString,
            audio__pb2.AudioAsrResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def setAudioTts(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, '/AudioPackage.AudioServiceGrpc/setAudioTts',
            audio__pb2.AudioTtsRequest.SerializeToString,
            audio__pb2.AudioCommonResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def setAudioNlp(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, '/AudioPackage.AudioServiceGrpc/setAudioNlp',
            audio__pb2.AudioNlpRequest.SerializeToString,
            audio__pb2.AudioNlpResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def insertAudioFile(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, '/AudioPackage.AudioServiceGrpc/insertAudioFile',
            audio__pb2.AudioFileRequest.SerializeToString,
            audio__pb2.AudioCommonResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def deleteAudioFile(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, '/AudioPackage.AudioServiceGrpc/deleteAudioFile',
            audio__pb2.AudioFileRequest.SerializeToString,
            audio__pb2.AudioCommonResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def getAudioFileList(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, '/AudioPackage.AudioServiceGrpc/getAudioFileList',
            audio__pb2.AudioFileListRequest.SerializeToString,
            audio__pb2.AudioFileListResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def modifyAudioFileName(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, '/AudioPackage.AudioServiceGrpc/modifyAudioFileName',
            audio__pb2.ModifyAudioNameRequest.SerializeToString,
            audio__pb2.AudioCommonResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def playAudioFile(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, '/AudioPackage.AudioServiceGrpc/playAudioFile',
            audio__pb2.AudioPlayRequest.SerializeToString,
            audio__pb2.AudioCommonResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def startRecordAudioFile(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, '/AudioPackage.AudioServiceGrpc/startRecordAudioFile',
            audio__pb2.AudioEmptyRequest.SerializeToString,
            audio__pb2.AudioCommonResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def stopRecordAudioFile(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, '/AudioPackage.AudioServiceGrpc/stopRecordAudioFile',
            audio__pb2.AudioEmptyRequest.SerializeToString,
            audio__pb2.AudioRecordResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def stopPlayAudio(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, '/AudioPackage.AudioServiceGrpc/stopPlayAudio',
            audio__pb2.AudioEmptyRequest.SerializeToString,
            audio__pb2.AudioCommonResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def getDirectionOfAudio(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, '/AudioPackage.AudioServiceGrpc/getDirectionOfAudio',
            audio__pb2.AudioDirectionRequest.SerializeToString,
            audio__pb2.AudioDirectionResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def enableAudioDirection(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, '/AudioPackage.AudioServiceGrpc/enableAudioDirection',
            audio__pb2.AudioEmptyRequest.SerializeToString,
            audio__pb2.AudioCommonResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def disableAudioDirection(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, '/AudioPackage.AudioServiceGrpc/disableAudioDirection',
            audio__pb2.AudioEmptyRequest.SerializeToString,
            audio__pb2.AudioCommonResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def getCurrentRms(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, '/AudioPackage.AudioServiceGrpc/getCurrentRms',
            audio__pb2.AudioEmptyRequest.SerializeToString,
            audio__pb2.AudioRmsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
