paraformer_pb2_grpc.py 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
  2. """Client and server classes corresponding to protobuf-defined services."""
  3. import grpc
  4. import paraformer_pb2 as paraformer__pb2
  5. class ASRStub(object):
  6. """Missing associated documentation comment in .proto file."""
  7. def __init__(self, channel):
  8. """Constructor.
  9. Args:
  10. channel: A grpc.Channel.
  11. """
  12. self.Recognize = channel.stream_stream(
  13. '/paraformer.ASR/Recognize',
  14. request_serializer=paraformer__pb2.Request.SerializeToString,
  15. response_deserializer=paraformer__pb2.Response.FromString,
  16. )
  17. class ASRServicer(object):
  18. """Missing associated documentation comment in .proto file."""
  19. def Recognize(self, request_iterator, context):
  20. """Missing associated documentation comment in .proto file."""
  21. context.set_code(grpc.StatusCode.UNIMPLEMENTED)
  22. context.set_details('Method not implemented!')
  23. raise NotImplementedError('Method not implemented!')
  24. def add_ASRServicer_to_server(servicer, server):
  25. rpc_method_handlers = {
  26. 'Recognize': grpc.stream_stream_rpc_method_handler(
  27. servicer.Recognize,
  28. request_deserializer=paraformer__pb2.Request.FromString,
  29. response_serializer=paraformer__pb2.Response.SerializeToString,
  30. ),
  31. }
  32. generic_handler = grpc.method_handlers_generic_handler(
  33. 'paraformer.ASR', rpc_method_handlers)
  34. server.add_generic_rpc_handlers((generic_handler,))
  35. # This class is part of an EXPERIMENTAL API.
  36. class ASR(object):
  37. """Missing associated documentation comment in .proto file."""
  38. @staticmethod
  39. def Recognize(request_iterator,
  40. target,
  41. options=(),
  42. channel_credentials=None,
  43. call_credentials=None,
  44. insecure=False,
  45. compression=None,
  46. wait_for_ready=None,
  47. timeout=None,
  48. metadata=None):
  49. return grpc.experimental.stream_stream(request_iterator, target, '/paraformer.ASR/Recognize',
  50. paraformer__pb2.Request.SerializeToString,
  51. paraformer__pb2.Response.FromString,
  52. options, channel_credentials,
  53. insecure, call_credentials, compression, wait_for_ready, timeout, metadata)