Documentation ¶
Index ¶
- Variables
- func RegisterAsrtGrpcServiceServer(s *grpc.Server, srv AsrtGrpcServiceServer)
- type AsrtGrpcServiceClient
- type AsrtGrpcServiceServer
- type AsrtGrpcService_StreamClient
- type AsrtGrpcService_StreamServer
- type LanguageRequest
- type SpeechRequest
- type SpeechResponse
- func (*SpeechResponse) Descriptor() ([]byte, []int)deprecated
- func (x *SpeechResponse) GetResultData() []string
- func (x *SpeechResponse) GetStatusCode() int32
- func (x *SpeechResponse) GetStatusMessage() string
- func (*SpeechResponse) ProtoMessage()
- func (x *SpeechResponse) ProtoReflect() protoreflect.Message
- func (x *SpeechResponse) Reset()
- func (x *SpeechResponse) String() string
- type TextResponse
- func (*TextResponse) Descriptor() ([]byte, []int)deprecated
- func (x *TextResponse) GetStatusCode() int32
- func (x *TextResponse) GetStatusMessage() string
- func (x *TextResponse) GetTextResult() string
- func (*TextResponse) ProtoMessage()
- func (x *TextResponse) ProtoReflect() protoreflect.Message
- func (x *TextResponse) Reset()
- func (x *TextResponse) String() string
- type UnimplementedAsrtGrpcServiceServer
- func (*UnimplementedAsrtGrpcServiceServer) All(context.Context, *SpeechRequest) (*TextResponse, error)
- func (*UnimplementedAsrtGrpcServiceServer) Language(context.Context, *LanguageRequest) (*TextResponse, error)
- func (*UnimplementedAsrtGrpcServiceServer) Speech(context.Context, *SpeechRequest) (*SpeechResponse, error)
- func (*UnimplementedAsrtGrpcServiceServer) Stream(AsrtGrpcService_StreamServer) error
- type WavData
- func (*WavData) Descriptor() ([]byte, []int)deprecated
- func (x *WavData) GetByteWidth() int32
- func (x *WavData) GetChannels() int32
- func (x *WavData) GetSampleRate() int32
- func (x *WavData) GetSamples() []byte
- func (*WavData) ProtoMessage()
- func (x *WavData) ProtoReflect() protoreflect.Message
- func (x *WavData) Reset()
- func (x *WavData) String() string
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.
func NewAsrtGrpcServiceClient ¶
func NewAsrtGrpcServiceClient(cc grpc.ClientConnInterface) AsrtGrpcServiceClient
type AsrtGrpcServiceServer ¶
type AsrtGrpcServiceServer interface { Speech(context.Context, *SpeechRequest) (*SpeechResponse, error) Language(context.Context, *LanguageRequest) (*TextResponse, error) All(context.Context, *SpeechRequest) (*TextResponse, error) Stream(AsrtGrpcService_StreamServer) error }
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) All(context.Context, *SpeechRequest) (*TextResponse, error)
func (*UnimplementedAsrtGrpcServiceServer) Language ¶
func (*UnimplementedAsrtGrpcServiceServer) Language(context.Context, *LanguageRequest) (*TextResponse, error)
func (*UnimplementedAsrtGrpcServiceServer) Speech ¶
func (*UnimplementedAsrtGrpcServiceServer) Speech(context.Context, *SpeechRequest) (*SpeechResponse, error)
func (*UnimplementedAsrtGrpcServiceServer) Stream ¶
func (*UnimplementedAsrtGrpcServiceServer) Stream(AsrtGrpcService_StreamServer) error
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) GetByteWidth ¶
func (*WavData) GetChannels ¶
func (*WavData) GetSampleRate ¶
func (*WavData) GetSamples ¶
func (*WavData) ProtoMessage ¶
func (*WavData) ProtoMessage()
func (*WavData) ProtoReflect ¶
func (x *WavData) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.