grpc

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 14, 2022 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_grpc_asrt_proto protoreflect.FileDescriptor

Functions

func RegisterAsrtGrpcServiceServer

func RegisterAsrtGrpcServiceServer(s *grpc.Server, srv AsrtGrpcServiceServer)

Types

type AsrtGrpcServiceClient

type AsrtGrpcServiceClient interface {
	Speech(ctx context.Context, in *SpeechRequest, opts ...grpc.CallOption) (*SpeechResponse, error)
	Language(ctx context.Context, in *LanguageRequest, opts ...grpc.CallOption) (*TextResponse, error)
	All(ctx context.Context, in *SpeechRequest, opts ...grpc.CallOption) (*TextResponse, error)
	Stream(ctx context.Context, opts ...grpc.CallOption) (AsrtGrpcService_StreamClient, error)
}

AsrtGrpcServiceClient is the client API for AsrtGrpcService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

type AsrtGrpcServiceServer

AsrtGrpcServiceServer is the server API for AsrtGrpcService service.

type AsrtGrpcService_StreamClient

type AsrtGrpcService_StreamClient interface {
	Send(*SpeechRequest) error
	Recv() (*TextResponse, error)
	grpc.ClientStream
}

type AsrtGrpcService_StreamServer

type AsrtGrpcService_StreamServer interface {
	Send(*TextResponse) error
	Recv() (*SpeechRequest, error)
	grpc.ServerStream
}

type LanguageRequest

type LanguageRequest struct {
	Pinyins []string `protobuf:"bytes,1,rep,name=pinyins,proto3" json:"pinyins,omitempty"`
	// contains filtered or unexported fields
}

func (*LanguageRequest) Descriptor deprecated

func (*LanguageRequest) Descriptor() ([]byte, []int)

Deprecated: Use LanguageRequest.ProtoReflect.Descriptor instead.

func (*LanguageRequest) GetPinyins

func (x *LanguageRequest) GetPinyins() []string

func (*LanguageRequest) ProtoMessage

func (*LanguageRequest) ProtoMessage()

func (*LanguageRequest) ProtoReflect

func (x *LanguageRequest) ProtoReflect() protoreflect.Message

func (*LanguageRequest) Reset

func (x *LanguageRequest) Reset()

func (*LanguageRequest) String

func (x *LanguageRequest) String() string

type SpeechRequest

type SpeechRequest struct {
	WavData *WavData `protobuf:"bytes,1,opt,name=wav_data,json=wavData,proto3" json:"wav_data,omitempty"`
	// contains filtered or unexported fields
}

func (*SpeechRequest) Descriptor deprecated

func (*SpeechRequest) Descriptor() ([]byte, []int)

Deprecated: Use SpeechRequest.ProtoReflect.Descriptor instead.

func (*SpeechRequest) GetWavData

func (x *SpeechRequest) GetWavData() *WavData

func (*SpeechRequest) ProtoMessage

func (*SpeechRequest) ProtoMessage()

func (*SpeechRequest) ProtoReflect

func (x *SpeechRequest) ProtoReflect() protoreflect.Message

func (*SpeechRequest) Reset

func (x *SpeechRequest) Reset()

func (*SpeechRequest) String

func (x *SpeechRequest) String() string

type SpeechResponse

type SpeechResponse struct {
	StatusCode    int32    `protobuf:"varint,1,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"`
	StatusMessage string   `protobuf:"bytes,2,opt,name=status_message,json=statusMessage,proto3" json:"status_message,omitempty"`
	ResultData    []string `protobuf:"bytes,3,rep,name=result_data,json=resultData,proto3" json:"result_data,omitempty"` // 拼音结果
	// contains filtered or unexported fields
}

func (*SpeechResponse) Descriptor deprecated

func (*SpeechResponse) Descriptor() ([]byte, []int)

Deprecated: Use SpeechResponse.ProtoReflect.Descriptor instead.

func (*SpeechResponse) GetResultData

func (x *SpeechResponse) GetResultData() []string

func (*SpeechResponse) GetStatusCode

func (x *SpeechResponse) GetStatusCode() int32

func (*SpeechResponse) GetStatusMessage

func (x *SpeechResponse) GetStatusMessage() string

func (*SpeechResponse) ProtoMessage

func (*SpeechResponse) ProtoMessage()

func (*SpeechResponse) ProtoReflect

func (x *SpeechResponse) ProtoReflect() protoreflect.Message

func (*SpeechResponse) Reset

func (x *SpeechResponse) Reset()

func (*SpeechResponse) String

func (x *SpeechResponse) String() string

type TextResponse

type TextResponse struct {
	StatusCode    int32  `protobuf:"varint,1,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"`
	StatusMessage string `protobuf:"bytes,2,opt,name=status_message,json=statusMessage,proto3" json:"status_message,omitempty"`
	TextResult    string `protobuf:"bytes,3,opt,name=text_result,json=textResult,proto3" json:"text_result,omitempty"`
	// contains filtered or unexported fields
}

func (*TextResponse) Descriptor deprecated

func (*TextResponse) Descriptor() ([]byte, []int)

Deprecated: Use TextResponse.ProtoReflect.Descriptor instead.

func (*TextResponse) GetStatusCode

func (x *TextResponse) GetStatusCode() int32

func (*TextResponse) GetStatusMessage

func (x *TextResponse) GetStatusMessage() string

func (*TextResponse) GetTextResult

func (x *TextResponse) GetTextResult() string

func (*TextResponse) ProtoMessage

func (*TextResponse) ProtoMessage()

func (*TextResponse) ProtoReflect

func (x *TextResponse) ProtoReflect() protoreflect.Message

func (*TextResponse) Reset

func (x *TextResponse) Reset()

func (*TextResponse) String

func (x *TextResponse) String() string

type UnimplementedAsrtGrpcServiceServer

type UnimplementedAsrtGrpcServiceServer struct{}

UnimplementedAsrtGrpcServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedAsrtGrpcServiceServer) All

func (*UnimplementedAsrtGrpcServiceServer) Language

func (*UnimplementedAsrtGrpcServiceServer) Speech

func (*UnimplementedAsrtGrpcServiceServer) Stream

type WavData

type WavData struct {
	Samples    []byte `protobuf:"bytes,1,opt,name=samples,proto3" json:"samples,omitempty"`                          // wav样本点字节
	SampleRate int32  `protobuf:"varint,2,opt,name=sample_rate,json=sampleRate,proto3" json:"sample_rate,omitempty"` // wav采样率
	Channels   int32  `protobuf:"varint,3,opt,name=channels,proto3" json:"channels,omitempty"`                       // wav通道数
	ByteWidth  int32  `protobuf:"varint,4,opt,name=byte_width,json=byteWidth,proto3" json:"byte_width,omitempty"`    // wav样本字节宽度
	// contains filtered or unexported fields
}

func (*WavData) Descriptor deprecated

func (*WavData) Descriptor() ([]byte, []int)

Deprecated: Use WavData.ProtoReflect.Descriptor instead.

func (*WavData) GetByteWidth

func (x *WavData) GetByteWidth() int32

func (*WavData) GetChannels

func (x *WavData) GetChannels() int32

func (*WavData) GetSampleRate

func (x *WavData) GetSampleRate() int32

func (*WavData) GetSamples

func (x *WavData) GetSamples() []byte

func (*WavData) ProtoMessage

func (*WavData) ProtoMessage()

func (*WavData) ProtoReflect

func (x *WavData) ProtoReflect() protoreflect.Message

func (*WavData) Reset

func (x *WavData) Reset()

func (*WavData) String

func (x *WavData) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL