// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.6.1 // - protoc v5.29.3 // source: tts.proto package pb import ( context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" ) // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. // Requires gRPC-Go v1.64.0 or later. const _ = grpc.SupportPackageIsVersion9 const ( TTSService_SynthesizeStream_FullMethodName = "/cyberverse.TTSService/SynthesizeStream" TTSService_ListVoices_FullMethodName = "/cyberverse.TTSService/ListVoices" ) // TTSServiceClient is the client API for TTSService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type TTSServiceClient interface { SynthesizeStream(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[TextChunk, AudioChunk], error) ListVoices(ctx context.Context, in *ListVoicesRequest, opts ...grpc.CallOption) (*ListVoicesResponse, error) } type tTSServiceClient struct { cc grpc.ClientConnInterface } func NewTTSServiceClient(cc grpc.ClientConnInterface) TTSServiceClient { return &tTSServiceClient{cc} } func (c *tTSServiceClient) SynthesizeStream(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[TextChunk, AudioChunk], error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) stream, err := c.cc.NewStream(ctx, &TTSService_ServiceDesc.Streams[0], TTSService_SynthesizeStream_FullMethodName, cOpts...) if err != nil { return nil, err } x := &grpc.GenericClientStream[TextChunk, AudioChunk]{ClientStream: stream} return x, nil } // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. type TTSService_SynthesizeStreamClient = grpc.BidiStreamingClient[TextChunk, AudioChunk] func (c *tTSServiceClient) ListVoices(ctx context.Context, in *ListVoicesRequest, opts ...grpc.CallOption) (*ListVoicesResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListVoicesResponse) err := c.cc.Invoke(ctx, TTSService_ListVoices_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } // TTSServiceServer is the server API for TTSService service. // All implementations must embed UnimplementedTTSServiceServer // for forward compatibility. type TTSServiceServer interface { SynthesizeStream(grpc.BidiStreamingServer[TextChunk, AudioChunk]) error ListVoices(context.Context, *ListVoicesRequest) (*ListVoicesResponse, error) mustEmbedUnimplementedTTSServiceServer() } // UnimplementedTTSServiceServer must be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil // pointer dereference when methods are called. type UnimplementedTTSServiceServer struct{} func (UnimplementedTTSServiceServer) SynthesizeStream(grpc.BidiStreamingServer[TextChunk, AudioChunk]) error { return status.Error(codes.Unimplemented, "method SynthesizeStream not implemented") } func (UnimplementedTTSServiceServer) ListVoices(context.Context, *ListVoicesRequest) (*ListVoicesResponse, error) { return nil, status.Error(codes.Unimplemented, "method ListVoices not implemented") } func (UnimplementedTTSServiceServer) mustEmbedUnimplementedTTSServiceServer() {} func (UnimplementedTTSServiceServer) testEmbeddedByValue() {} // UnsafeTTSServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to TTSServiceServer will // result in compilation errors. type UnsafeTTSServiceServer interface { mustEmbedUnimplementedTTSServiceServer() } func RegisterTTSServiceServer(s grpc.ServiceRegistrar, srv TTSServiceServer) { // If the following call panics, it indicates UnimplementedTTSServiceServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { t.testEmbeddedByValue() } s.RegisterService(&TTSService_ServiceDesc, srv) } func _TTSService_SynthesizeStream_Handler(srv interface{}, stream grpc.ServerStream) error { return srv.(TTSServiceServer).SynthesizeStream(&grpc.GenericServerStream[TextChunk, AudioChunk]{ServerStream: stream}) } // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. type TTSService_SynthesizeStreamServer = grpc.BidiStreamingServer[TextChunk, AudioChunk] func _TTSService_ListVoices_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListVoicesRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(TTSServiceServer).ListVoices(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: TTSService_ListVoices_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(TTSServiceServer).ListVoices(ctx, req.(*ListVoicesRequest)) } return interceptor(ctx, in, info, handler) } // TTSService_ServiceDesc is the grpc.ServiceDesc for TTSService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var TTSService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "cyberverse.TTSService", HandlerType: (*TTSServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ListVoices", Handler: _TTSService_ListVoices_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "SynthesizeStream", Handler: _TTSService_SynthesizeStream_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "tts.proto", }