2025-11-13 03:01:00 +08:00
|
|
|
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
|
|
|
|
"""Client and server classes corresponding to protobuf-defined services."""
|
|
|
|
|
import grpc
|
2026-03-16 09:23:56 +08:00
|
|
|
import warnings
|
2025-11-13 03:01:00 +08:00
|
|
|
|
|
|
|
|
from cmvr.api import microphone_command_pb2 as cmvr_dot_api_dot_microphone__command__pb2
|
|
|
|
|
|
2026-03-16 09:23:56 +08:00
|
|
|
GRPC_GENERATED_VERSION = '1.76.0'
|
|
|
|
|
GRPC_VERSION = grpc.__version__
|
|
|
|
|
_version_not_supported = False
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
|
from grpc._utilities import first_version_is_lower
|
|
|
|
|
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
|
|
|
|
|
except ImportError:
|
|
|
|
|
_version_not_supported = True
|
|
|
|
|
|
|
|
|
|
if _version_not_supported:
|
|
|
|
|
raise RuntimeError(
|
|
|
|
|
f'The grpc package installed is at version {GRPC_VERSION},'
|
|
|
|
|
+ ' but the generated code in cmvr/api/microphone_service_pb2_grpc.py depends on'
|
|
|
|
|
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
|
|
|
|
|
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
|
|
|
|
|
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
|
|
|
|
|
)
|
|
|
|
|
|
2025-11-13 03:01:00 +08:00
|
|
|
|
|
|
|
|
class MicPhoneServiceStub(object):
|
|
|
|
|
"""Missing associated documentation comment in .proto file."""
|
|
|
|
|
|
|
|
|
|
def __init__(self, channel):
|
|
|
|
|
"""Constructor.
|
|
|
|
|
|
|
|
|
|
Args:
|
|
|
|
|
channel: A grpc.Channel.
|
|
|
|
|
"""
|
|
|
|
|
self.GetStatus = channel.unary_unary(
|
|
|
|
|
'/cmvr.api.MicPhoneService/GetStatus',
|
|
|
|
|
request_serializer=cmvr_dot_api_dot_microphone__command__pb2.GetMicStateCommand.Request.SerializeToString,
|
|
|
|
|
response_deserializer=cmvr_dot_api_dot_microphone__command__pb2.GetMicStateCommand.Feedback.FromString,
|
2026-03-16 09:23:56 +08:00
|
|
|
_registered_method=True)
|
2025-11-13 03:01:00 +08:00
|
|
|
self.StartRecord = channel.unary_unary(
|
|
|
|
|
'/cmvr.api.MicPhoneService/StartRecord',
|
|
|
|
|
request_serializer=cmvr_dot_api_dot_microphone__command__pb2.StartMicRecordingCommand.Request.SerializeToString,
|
|
|
|
|
response_deserializer=cmvr_dot_api_dot_microphone__command__pb2.StartMicRecordingCommand.Feedback.FromString,
|
2026-03-16 09:23:56 +08:00
|
|
|
_registered_method=True)
|
2025-11-13 03:01:00 +08:00
|
|
|
self.StopRecord = channel.unary_unary(
|
|
|
|
|
'/cmvr.api.MicPhoneService/StopRecord',
|
|
|
|
|
request_serializer=cmvr_dot_api_dot_microphone__command__pb2.StopMicRecordingCommand.Request.SerializeToString,
|
|
|
|
|
response_deserializer=cmvr_dot_api_dot_microphone__command__pb2.StopMicRecordingCommand.Feedback.FromString,
|
2026-03-16 09:23:56 +08:00
|
|
|
_registered_method=True)
|
2025-11-13 03:01:00 +08:00
|
|
|
self.PauseRecord = channel.unary_unary(
|
|
|
|
|
'/cmvr.api.MicPhoneService/PauseRecord',
|
|
|
|
|
request_serializer=cmvr_dot_api_dot_microphone__command__pb2.PauseMicRecordingCommand.Request.SerializeToString,
|
|
|
|
|
response_deserializer=cmvr_dot_api_dot_microphone__command__pb2.PauseMicRecordingCommand.Feedback.FromString,
|
2026-03-16 09:23:56 +08:00
|
|
|
_registered_method=True)
|
2025-11-13 03:01:00 +08:00
|
|
|
self.ResumeRecord = channel.unary_unary(
|
|
|
|
|
'/cmvr.api.MicPhoneService/ResumeRecord',
|
|
|
|
|
request_serializer=cmvr_dot_api_dot_microphone__command__pb2.ResumeMicRecordingCommand.Request.SerializeToString,
|
|
|
|
|
response_deserializer=cmvr_dot_api_dot_microphone__command__pb2.ResumeMicRecordingCommand.Feedback.FromString,
|
2026-03-16 09:23:56 +08:00
|
|
|
_registered_method=True)
|
2025-11-13 03:01:00 +08:00
|
|
|
self.SetVolume = channel.unary_unary(
|
|
|
|
|
'/cmvr.api.MicPhoneService/SetVolume',
|
|
|
|
|
request_serializer=cmvr_dot_api_dot_microphone__command__pb2.SetMicPhoneVolumeCommand.Request.SerializeToString,
|
|
|
|
|
response_deserializer=cmvr_dot_api_dot_microphone__command__pb2.SetMicPhoneVolumeCommand.Feedback.FromString,
|
2026-03-16 09:23:56 +08:00
|
|
|
_registered_method=True)
|
2025-11-13 03:01:00 +08:00
|
|
|
self.GetVolume = channel.unary_unary(
|
|
|
|
|
'/cmvr.api.MicPhoneService/GetVolume',
|
|
|
|
|
request_serializer=cmvr_dot_api_dot_microphone__command__pb2.GetMicPhoneVolumeCommand.Request.SerializeToString,
|
|
|
|
|
response_deserializer=cmvr_dot_api_dot_microphone__command__pb2.GetMicPhoneVolumeCommand.Feedback.FromString,
|
2026-03-16 09:23:56 +08:00
|
|
|
_registered_method=True)
|
2025-11-13 03:01:00 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
class MicPhoneServiceServicer(object):
|
|
|
|
|
"""Missing associated documentation comment in .proto file."""
|
|
|
|
|
|
|
|
|
|
def GetStatus(self, request, context):
|
|
|
|
|
"""基本控制
|
|
|
|
|
"""
|
|
|
|
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
|
|
|
context.set_details('Method not implemented!')
|
|
|
|
|
raise NotImplementedError('Method not implemented!')
|
|
|
|
|
|
|
|
|
|
def StartRecord(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 StopRecord(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 PauseRecord(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 ResumeRecord(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 SetVolume(self, request, context):
|
|
|
|
|
"""音量控制
|
|
|
|
|
"""
|
|
|
|
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
|
|
|
context.set_details('Method not implemented!')
|
|
|
|
|
raise NotImplementedError('Method not implemented!')
|
|
|
|
|
|
|
|
|
|
def GetVolume(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_MicPhoneServiceServicer_to_server(servicer, server):
|
|
|
|
|
rpc_method_handlers = {
|
|
|
|
|
'GetStatus': grpc.unary_unary_rpc_method_handler(
|
|
|
|
|
servicer.GetStatus,
|
|
|
|
|
request_deserializer=cmvr_dot_api_dot_microphone__command__pb2.GetMicStateCommand.Request.FromString,
|
|
|
|
|
response_serializer=cmvr_dot_api_dot_microphone__command__pb2.GetMicStateCommand.Feedback.SerializeToString,
|
|
|
|
|
),
|
|
|
|
|
'StartRecord': grpc.unary_unary_rpc_method_handler(
|
|
|
|
|
servicer.StartRecord,
|
|
|
|
|
request_deserializer=cmvr_dot_api_dot_microphone__command__pb2.StartMicRecordingCommand.Request.FromString,
|
|
|
|
|
response_serializer=cmvr_dot_api_dot_microphone__command__pb2.StartMicRecordingCommand.Feedback.SerializeToString,
|
|
|
|
|
),
|
|
|
|
|
'StopRecord': grpc.unary_unary_rpc_method_handler(
|
|
|
|
|
servicer.StopRecord,
|
|
|
|
|
request_deserializer=cmvr_dot_api_dot_microphone__command__pb2.StopMicRecordingCommand.Request.FromString,
|
|
|
|
|
response_serializer=cmvr_dot_api_dot_microphone__command__pb2.StopMicRecordingCommand.Feedback.SerializeToString,
|
|
|
|
|
),
|
|
|
|
|
'PauseRecord': grpc.unary_unary_rpc_method_handler(
|
|
|
|
|
servicer.PauseRecord,
|
|
|
|
|
request_deserializer=cmvr_dot_api_dot_microphone__command__pb2.PauseMicRecordingCommand.Request.FromString,
|
|
|
|
|
response_serializer=cmvr_dot_api_dot_microphone__command__pb2.PauseMicRecordingCommand.Feedback.SerializeToString,
|
|
|
|
|
),
|
|
|
|
|
'ResumeRecord': grpc.unary_unary_rpc_method_handler(
|
|
|
|
|
servicer.ResumeRecord,
|
|
|
|
|
request_deserializer=cmvr_dot_api_dot_microphone__command__pb2.ResumeMicRecordingCommand.Request.FromString,
|
|
|
|
|
response_serializer=cmvr_dot_api_dot_microphone__command__pb2.ResumeMicRecordingCommand.Feedback.SerializeToString,
|
|
|
|
|
),
|
|
|
|
|
'SetVolume': grpc.unary_unary_rpc_method_handler(
|
|
|
|
|
servicer.SetVolume,
|
|
|
|
|
request_deserializer=cmvr_dot_api_dot_microphone__command__pb2.SetMicPhoneVolumeCommand.Request.FromString,
|
|
|
|
|
response_serializer=cmvr_dot_api_dot_microphone__command__pb2.SetMicPhoneVolumeCommand.Feedback.SerializeToString,
|
|
|
|
|
),
|
|
|
|
|
'GetVolume': grpc.unary_unary_rpc_method_handler(
|
|
|
|
|
servicer.GetVolume,
|
|
|
|
|
request_deserializer=cmvr_dot_api_dot_microphone__command__pb2.GetMicPhoneVolumeCommand.Request.FromString,
|
|
|
|
|
response_serializer=cmvr_dot_api_dot_microphone__command__pb2.GetMicPhoneVolumeCommand.Feedback.SerializeToString,
|
|
|
|
|
),
|
|
|
|
|
}
|
|
|
|
|
generic_handler = grpc.method_handlers_generic_handler(
|
|
|
|
|
'cmvr.api.MicPhoneService', rpc_method_handlers)
|
|
|
|
|
server.add_generic_rpc_handlers((generic_handler,))
|
2026-03-16 09:23:56 +08:00
|
|
|
server.add_registered_method_handlers('cmvr.api.MicPhoneService', rpc_method_handlers)
|
2025-11-13 03:01:00 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
# This class is part of an EXPERIMENTAL API.
|
|
|
|
|
class MicPhoneService(object):
|
|
|
|
|
"""Missing associated documentation comment in .proto file."""
|
|
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
|
def GetStatus(request,
|
|
|
|
|
target,
|
|
|
|
|
options=(),
|
|
|
|
|
channel_credentials=None,
|
|
|
|
|
call_credentials=None,
|
|
|
|
|
insecure=False,
|
|
|
|
|
compression=None,
|
|
|
|
|
wait_for_ready=None,
|
|
|
|
|
timeout=None,
|
|
|
|
|
metadata=None):
|
2026-03-16 09:23:56 +08:00
|
|
|
return grpc.experimental.unary_unary(
|
|
|
|
|
request,
|
|
|
|
|
target,
|
|
|
|
|
'/cmvr.api.MicPhoneService/GetStatus',
|
2025-11-13 03:01:00 +08:00
|
|
|
cmvr_dot_api_dot_microphone__command__pb2.GetMicStateCommand.Request.SerializeToString,
|
|
|
|
|
cmvr_dot_api_dot_microphone__command__pb2.GetMicStateCommand.Feedback.FromString,
|
2026-03-16 09:23:56 +08:00
|
|
|
options,
|
|
|
|
|
channel_credentials,
|
|
|
|
|
insecure,
|
|
|
|
|
call_credentials,
|
|
|
|
|
compression,
|
|
|
|
|
wait_for_ready,
|
|
|
|
|
timeout,
|
|
|
|
|
metadata,
|
|
|
|
|
_registered_method=True)
|
2025-11-13 03:01:00 +08:00
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
|
def StartRecord(request,
|
|
|
|
|
target,
|
|
|
|
|
options=(),
|
|
|
|
|
channel_credentials=None,
|
|
|
|
|
call_credentials=None,
|
|
|
|
|
insecure=False,
|
|
|
|
|
compression=None,
|
|
|
|
|
wait_for_ready=None,
|
|
|
|
|
timeout=None,
|
|
|
|
|
metadata=None):
|
2026-03-16 09:23:56 +08:00
|
|
|
return grpc.experimental.unary_unary(
|
|
|
|
|
request,
|
|
|
|
|
target,
|
|
|
|
|
'/cmvr.api.MicPhoneService/StartRecord',
|
2025-11-13 03:01:00 +08:00
|
|
|
cmvr_dot_api_dot_microphone__command__pb2.StartMicRecordingCommand.Request.SerializeToString,
|
|
|
|
|
cmvr_dot_api_dot_microphone__command__pb2.StartMicRecordingCommand.Feedback.FromString,
|
2026-03-16 09:23:56 +08:00
|
|
|
options,
|
|
|
|
|
channel_credentials,
|
|
|
|
|
insecure,
|
|
|
|
|
call_credentials,
|
|
|
|
|
compression,
|
|
|
|
|
wait_for_ready,
|
|
|
|
|
timeout,
|
|
|
|
|
metadata,
|
|
|
|
|
_registered_method=True)
|
2025-11-13 03:01:00 +08:00
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
|
def StopRecord(request,
|
|
|
|
|
target,
|
|
|
|
|
options=(),
|
|
|
|
|
channel_credentials=None,
|
|
|
|
|
call_credentials=None,
|
|
|
|
|
insecure=False,
|
|
|
|
|
compression=None,
|
|
|
|
|
wait_for_ready=None,
|
|
|
|
|
timeout=None,
|
|
|
|
|
metadata=None):
|
2026-03-16 09:23:56 +08:00
|
|
|
return grpc.experimental.unary_unary(
|
|
|
|
|
request,
|
|
|
|
|
target,
|
|
|
|
|
'/cmvr.api.MicPhoneService/StopRecord',
|
2025-11-13 03:01:00 +08:00
|
|
|
cmvr_dot_api_dot_microphone__command__pb2.StopMicRecordingCommand.Request.SerializeToString,
|
|
|
|
|
cmvr_dot_api_dot_microphone__command__pb2.StopMicRecordingCommand.Feedback.FromString,
|
2026-03-16 09:23:56 +08:00
|
|
|
options,
|
|
|
|
|
channel_credentials,
|
|
|
|
|
insecure,
|
|
|
|
|
call_credentials,
|
|
|
|
|
compression,
|
|
|
|
|
wait_for_ready,
|
|
|
|
|
timeout,
|
|
|
|
|
metadata,
|
|
|
|
|
_registered_method=True)
|
2025-11-13 03:01:00 +08:00
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
|
def PauseRecord(request,
|
|
|
|
|
target,
|
|
|
|
|
options=(),
|
|
|
|
|
channel_credentials=None,
|
|
|
|
|
call_credentials=None,
|
|
|
|
|
insecure=False,
|
|
|
|
|
compression=None,
|
|
|
|
|
wait_for_ready=None,
|
|
|
|
|
timeout=None,
|
|
|
|
|
metadata=None):
|
2026-03-16 09:23:56 +08:00
|
|
|
return grpc.experimental.unary_unary(
|
|
|
|
|
request,
|
|
|
|
|
target,
|
|
|
|
|
'/cmvr.api.MicPhoneService/PauseRecord',
|
2025-11-13 03:01:00 +08:00
|
|
|
cmvr_dot_api_dot_microphone__command__pb2.PauseMicRecordingCommand.Request.SerializeToString,
|
|
|
|
|
cmvr_dot_api_dot_microphone__command__pb2.PauseMicRecordingCommand.Feedback.FromString,
|
2026-03-16 09:23:56 +08:00
|
|
|
options,
|
|
|
|
|
channel_credentials,
|
|
|
|
|
insecure,
|
|
|
|
|
call_credentials,
|
|
|
|
|
compression,
|
|
|
|
|
wait_for_ready,
|
|
|
|
|
timeout,
|
|
|
|
|
metadata,
|
|
|
|
|
_registered_method=True)
|
2025-11-13 03:01:00 +08:00
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
|
def ResumeRecord(request,
|
|
|
|
|
target,
|
|
|
|
|
options=(),
|
|
|
|
|
channel_credentials=None,
|
|
|
|
|
call_credentials=None,
|
|
|
|
|
insecure=False,
|
|
|
|
|
compression=None,
|
|
|
|
|
wait_for_ready=None,
|
|
|
|
|
timeout=None,
|
|
|
|
|
metadata=None):
|
2026-03-16 09:23:56 +08:00
|
|
|
return grpc.experimental.unary_unary(
|
|
|
|
|
request,
|
|
|
|
|
target,
|
|
|
|
|
'/cmvr.api.MicPhoneService/ResumeRecord',
|
2025-11-13 03:01:00 +08:00
|
|
|
cmvr_dot_api_dot_microphone__command__pb2.ResumeMicRecordingCommand.Request.SerializeToString,
|
|
|
|
|
cmvr_dot_api_dot_microphone__command__pb2.ResumeMicRecordingCommand.Feedback.FromString,
|
2026-03-16 09:23:56 +08:00
|
|
|
options,
|
|
|
|
|
channel_credentials,
|
|
|
|
|
insecure,
|
|
|
|
|
call_credentials,
|
|
|
|
|
compression,
|
|
|
|
|
wait_for_ready,
|
|
|
|
|
timeout,
|
|
|
|
|
metadata,
|
|
|
|
|
_registered_method=True)
|
2025-11-13 03:01:00 +08:00
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
|
def SetVolume(request,
|
|
|
|
|
target,
|
|
|
|
|
options=(),
|
|
|
|
|
channel_credentials=None,
|
|
|
|
|
call_credentials=None,
|
|
|
|
|
insecure=False,
|
|
|
|
|
compression=None,
|
|
|
|
|
wait_for_ready=None,
|
|
|
|
|
timeout=None,
|
|
|
|
|
metadata=None):
|
2026-03-16 09:23:56 +08:00
|
|
|
return grpc.experimental.unary_unary(
|
|
|
|
|
request,
|
|
|
|
|
target,
|
|
|
|
|
'/cmvr.api.MicPhoneService/SetVolume',
|
2025-11-13 03:01:00 +08:00
|
|
|
cmvr_dot_api_dot_microphone__command__pb2.SetMicPhoneVolumeCommand.Request.SerializeToString,
|
|
|
|
|
cmvr_dot_api_dot_microphone__command__pb2.SetMicPhoneVolumeCommand.Feedback.FromString,
|
2026-03-16 09:23:56 +08:00
|
|
|
options,
|
|
|
|
|
channel_credentials,
|
|
|
|
|
insecure,
|
|
|
|
|
call_credentials,
|
|
|
|
|
compression,
|
|
|
|
|
wait_for_ready,
|
|
|
|
|
timeout,
|
|
|
|
|
metadata,
|
|
|
|
|
_registered_method=True)
|
2025-11-13 03:01:00 +08:00
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
|
def GetVolume(request,
|
|
|
|
|
target,
|
|
|
|
|
options=(),
|
|
|
|
|
channel_credentials=None,
|
|
|
|
|
call_credentials=None,
|
|
|
|
|
insecure=False,
|
|
|
|
|
compression=None,
|
|
|
|
|
wait_for_ready=None,
|
|
|
|
|
timeout=None,
|
|
|
|
|
metadata=None):
|
2026-03-16 09:23:56 +08:00
|
|
|
return grpc.experimental.unary_unary(
|
|
|
|
|
request,
|
|
|
|
|
target,
|
|
|
|
|
'/cmvr.api.MicPhoneService/GetVolume',
|
2025-11-13 03:01:00 +08:00
|
|
|
cmvr_dot_api_dot_microphone__command__pb2.GetMicPhoneVolumeCommand.Request.SerializeToString,
|
|
|
|
|
cmvr_dot_api_dot_microphone__command__pb2.GetMicPhoneVolumeCommand.Feedback.FromString,
|
2026-03-16 09:23:56 +08:00
|
|
|
options,
|
|
|
|
|
channel_credentials,
|
|
|
|
|
insecure,
|
|
|
|
|
call_credentials,
|
|
|
|
|
compression,
|
|
|
|
|
wait_for_ready,
|
|
|
|
|
timeout,
|
|
|
|
|
metadata,
|
|
|
|
|
_registered_method=True)
|