tts_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 tts_pb2 as tts__pb2
  5. class TtsStub(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.createRec = channel.stream_stream(
  13. '/tts.Tts/createRec',
  14. request_serializer=tts__pb2.TtsRequest.SerializeToString,
  15. response_deserializer=tts__pb2.TtsResult.FromString,
  16. )
  17. class TtsServicer(object):
  18. """Missing associated documentation comment in .proto file."""
  19. def createRec(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_TtsServicer_to_server(servicer, server):
  25. rpc_method_handlers = {
  26. 'createRec': grpc.stream_stream_rpc_method_handler(
  27. servicer.createRec,
  28. request_deserializer=tts__pb2.TtsRequest.FromString,
  29. response_serializer=tts__pb2.TtsResult.SerializeToString,
  30. ),
  31. }
  32. generic_handler = grpc.method_handlers_generic_handler(
  33. 'tts.Tts', rpc_method_handlers)
  34. server.add_generic_rpc_handlers((generic_handler,))
  35. # This class is part of an EXPERIMENTAL API.
  36. class Tts(object):
  37. """Missing associated documentation comment in .proto file."""
  38. @staticmethod
  39. def createRec(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, '/tts.Tts/createRec',
  50. tts__pb2.TtsRequest.SerializeToString,
  51. tts__pb2.TtsResult.FromString,
  52. options, channel_credentials,
  53. insecure, call_credentials, compression, wait_for_ready, timeout, metadata)