Ai
1 Star 0 Fork 0

airport/grpc_api

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
speech.pb.go 47.83 KB
一键复制 编辑 原始数据 按行查看 历史
JJ-Robot 提交于 2022-12-08 11:16 +08:00 . 修改grpc版本
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.23.0
// protoc v3.14.0
// source: proto/speech/speech.proto
package speechpb
import (
context "context"
proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
//speech事件
type SpeechEvent int32
const (
SpeechEvent_UNKNOWN_EVENT SpeechEvent = 0 // 零值
SpeechEvent_ERROR SpeechEvent = 1 // 识别错误
SpeechEvent_IAT SpeechEvent = 2 //识别结果
SpeechEvent_NLP SpeechEvent = 3 //NLP结果
SpeechEvent_TTS SpeechEvent = 4 //TTS结果
)
// Enum value maps for SpeechEvent.
var (
SpeechEvent_name = map[int32]string{
0: "UNKNOWN_EVENT",
1: "ERROR",
2: "IAT",
3: "NLP",
4: "TTS",
}
SpeechEvent_value = map[string]int32{
"UNKNOWN_EVENT": 0,
"ERROR": 1,
"IAT": 2,
"NLP": 3,
"TTS": 4,
}
)
func (x SpeechEvent) Enum() *SpeechEvent {
p := new(SpeechEvent)
*p = x
return p
}
func (x SpeechEvent) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (SpeechEvent) Descriptor() protoreflect.EnumDescriptor {
return file_proto_speech_speech_proto_enumTypes[0].Descriptor()
}
func (SpeechEvent) Type() protoreflect.EnumType {
return &file_proto_speech_speech_proto_enumTypes[0]
}
func (x SpeechEvent) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use SpeechEvent.Descriptor instead.
func (SpeechEvent) EnumDescriptor() ([]byte, []int) {
return file_proto_speech_speech_proto_rawDescGZIP(), []int{0}
}
type SetBeamRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Beam int32 `protobuf:"varint,1,opt,name=beam,proto3" json:"beam,omitempty"` //拾音波束,0为面对麦克风左边60°,1为面对麦克风中间60°,2为面对麦克风右边60度
}
func (x *SetBeamRequest) Reset() {
*x = SetBeamRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_speech_speech_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SetBeamRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SetBeamRequest) ProtoMessage() {}
func (x *SetBeamRequest) ProtoReflect() protoreflect.Message {
mi := &file_proto_speech_speech_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SetBeamRequest.ProtoReflect.Descriptor instead.
func (*SetBeamRequest) Descriptor() ([]byte, []int) {
return file_proto_speech_speech_proto_rawDescGZIP(), []int{0}
}
func (x *SetBeamRequest) GetBeam() int32 {
if x != nil {
return x.Beam
}
return 0
}
type SetBeamResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *SetBeamResponse) Reset() {
*x = SetBeamResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_speech_speech_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SetBeamResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SetBeamResponse) ProtoMessage() {}
func (x *SetBeamResponse) ProtoReflect() protoreflect.Message {
mi := &file_proto_speech_speech_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SetBeamResponse.ProtoReflect.Descriptor instead.
func (*SetBeamResponse) Descriptor() ([]byte, []int) {
return file_proto_speech_speech_proto_rawDescGZIP(), []int{1}
}
//iat获取
type GetIatRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *GetIatRequest) Reset() {
*x = GetIatRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_speech_speech_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetIatRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetIatRequest) ProtoMessage() {}
func (x *GetIatRequest) ProtoReflect() protoreflect.Message {
mi := &file_proto_speech_speech_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetIatRequest.ProtoReflect.Descriptor instead.
func (*GetIatRequest) Descriptor() ([]byte, []int) {
return file_proto_speech_speech_proto_rawDescGZIP(), []int{2}
}
type GetIatResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` //当前回话id
Text string `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"`
}
func (x *GetIatResponse) Reset() {
*x = GetIatResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_speech_speech_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetIatResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetIatResponse) ProtoMessage() {}
func (x *GetIatResponse) ProtoReflect() protoreflect.Message {
mi := &file_proto_speech_speech_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetIatResponse.ProtoReflect.Descriptor instead.
func (*GetIatResponse) Descriptor() ([]byte, []int) {
return file_proto_speech_speech_proto_rawDescGZIP(), []int{3}
}
func (x *GetIatResponse) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *GetIatResponse) GetText() string {
if x != nil {
return x.Text
}
return ""
}
//nlp获取
type GetNlpRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"` // 需要寻找nlp的文本
}
func (x *GetNlpRequest) Reset() {
*x = GetNlpRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_speech_speech_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetNlpRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetNlpRequest) ProtoMessage() {}
func (x *GetNlpRequest) ProtoReflect() protoreflect.Message {
mi := &file_proto_speech_speech_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetNlpRequest.ProtoReflect.Descriptor instead.
func (*GetNlpRequest) Descriptor() ([]byte, []int) {
return file_proto_speech_speech_proto_rawDescGZIP(), []int{4}
}
func (x *GetNlpRequest) GetText() string {
if x != nil {
return x.Text
}
return ""
}
type GetNlpResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` //当前回话id
Intent []byte `protobuf:"bytes,2,opt,name=intent,proto3" json:"intent,omitempty"` //aiui nlp详细信息,参考:https://aiui.xfyun.cn/doc/aiui/4_skill_develop/8_agreement/semantic_agreement.html#%E6%B6%88%E6%81%AF%E6%A0%BC%E5%BC%8F%E6%A6%82%E8%A7%88
}
func (x *GetNlpResponse) Reset() {
*x = GetNlpResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_speech_speech_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetNlpResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetNlpResponse) ProtoMessage() {}
func (x *GetNlpResponse) ProtoReflect() protoreflect.Message {
mi := &file_proto_speech_speech_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetNlpResponse.ProtoReflect.Descriptor instead.
func (*GetNlpResponse) Descriptor() ([]byte, []int) {
return file_proto_speech_speech_proto_rawDescGZIP(), []int{5}
}
func (x *GetNlpResponse) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *GetNlpResponse) GetIntent() []byte {
if x != nil {
return x.Intent
}
return nil
}
//tts获取
type GetTtsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"` // 需要合成的文本
Volume int32 `protobuf:"varint,2,opt,name=volume,proto3" json:"volume,omitempty"` //合成的音量,默认是50
}
func (x *GetTtsRequest) Reset() {
*x = GetTtsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_speech_speech_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetTtsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetTtsRequest) ProtoMessage() {}
func (x *GetTtsRequest) ProtoReflect() protoreflect.Message {
mi := &file_proto_speech_speech_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetTtsRequest.ProtoReflect.Descriptor instead.
func (*GetTtsRequest) Descriptor() ([]byte, []int) {
return file_proto_speech_speech_proto_rawDescGZIP(), []int{6}
}
func (x *GetTtsRequest) GetText() string {
if x != nil {
return x.Text
}
return ""
}
func (x *GetTtsRequest) GetVolume() int32 {
if x != nil {
return x.Volume
}
return 0
}
type GetTtsResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` //当前回话id
Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"`
}
func (x *GetTtsResponse) Reset() {
*x = GetTtsResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_speech_speech_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetTtsResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetTtsResponse) ProtoMessage() {}
func (x *GetTtsResponse) ProtoReflect() protoreflect.Message {
mi := &file_proto_speech_speech_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetTtsResponse.ProtoReflect.Descriptor instead.
func (*GetTtsResponse) Descriptor() ([]byte, []int) {
return file_proto_speech_speech_proto_rawDescGZIP(), []int{7}
}
func (x *GetTtsResponse) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *GetTtsResponse) GetUrl() string {
if x != nil {
return x.Url
}
return ""
}
type StartIat struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Start bool `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"`
WithNlp bool `protobuf:"varint,2,opt,name=with_nlp,json=withNlp,proto3" json:"with_nlp,omitempty"`
}
func (x *StartIat) Reset() {
*x = StartIat{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_speech_speech_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *StartIat) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StartIat) ProtoMessage() {}
func (x *StartIat) ProtoReflect() protoreflect.Message {
mi := &file_proto_speech_speech_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use StartIat.ProtoReflect.Descriptor instead.
func (*StartIat) Descriptor() ([]byte, []int) {
return file_proto_speech_speech_proto_rawDescGZIP(), []int{8}
}
func (x *StartIat) GetStart() bool {
if x != nil {
return x.Start
}
return false
}
func (x *StartIat) GetWithNlp() bool {
if x != nil {
return x.WithNlp
}
return false
}
type StopIat struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Stop bool `protobuf:"varint,1,opt,name=stop,proto3" json:"stop,omitempty"`
}
func (x *StopIat) Reset() {
*x = StopIat{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_speech_speech_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *StopIat) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StopIat) ProtoMessage() {}
func (x *StopIat) ProtoReflect() protoreflect.Message {
mi := &file_proto_speech_speech_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use StopIat.ProtoReflect.Descriptor instead.
func (*StopIat) Descriptor() ([]byte, []int) {
return file_proto_speech_speech_proto_rawDescGZIP(), []int{9}
}
func (x *StopIat) GetStop() bool {
if x != nil {
return x.Stop
}
return false
}
type OnSpeechEventRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Start bool `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"`
WithNlp bool `protobuf:"varint,2,opt,name=with_nlp,json=withNlp,proto3" json:"with_nlp,omitempty"`
Stop bool `protobuf:"varint,3,opt,name=stop,proto3" json:"stop,omitempty"`
}
func (x *OnSpeechEventRequest) Reset() {
*x = OnSpeechEventRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_speech_speech_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *OnSpeechEventRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*OnSpeechEventRequest) ProtoMessage() {}
func (x *OnSpeechEventRequest) ProtoReflect() protoreflect.Message {
mi := &file_proto_speech_speech_proto_msgTypes[10]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use OnSpeechEventRequest.ProtoReflect.Descriptor instead.
func (*OnSpeechEventRequest) Descriptor() ([]byte, []int) {
return file_proto_speech_speech_proto_rawDescGZIP(), []int{10}
}
func (x *OnSpeechEventRequest) GetStart() bool {
if x != nil {
return x.Start
}
return false
}
func (x *OnSpeechEventRequest) GetWithNlp() bool {
if x != nil {
return x.WithNlp
}
return false
}
func (x *OnSpeechEventRequest) GetStop() bool {
if x != nil {
return x.Stop
}
return false
}
//错误信息
type ErrorInfo struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Info string `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"` // 错误描述
Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` // 错误码
}
func (x *ErrorInfo) Reset() {
*x = ErrorInfo{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_speech_speech_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ErrorInfo) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ErrorInfo) ProtoMessage() {}
func (x *ErrorInfo) ProtoReflect() protoreflect.Message {
mi := &file_proto_speech_speech_proto_msgTypes[11]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ErrorInfo.ProtoReflect.Descriptor instead.
func (*ErrorInfo) Descriptor() ([]byte, []int) {
return file_proto_speech_speech_proto_rawDescGZIP(), []int{11}
}
func (x *ErrorInfo) GetInfo() string {
if x != nil {
return x.Info
}
return ""
}
func (x *ErrorInfo) GetCode() string {
if x != nil {
return x.Code
}
return ""
}
type Iat struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` //当前回话id
Text string `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"` //识别的文本
IsLast bool `protobuf:"varint,3,opt,name=is_last,json=isLast,proto3" json:"is_last,omitempty"` // 是否为完整句
}
func (x *Iat) Reset() {
*x = Iat{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_speech_speech_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Iat) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Iat) ProtoMessage() {}
func (x *Iat) ProtoReflect() protoreflect.Message {
mi := &file_proto_speech_speech_proto_msgTypes[12]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Iat.ProtoReflect.Descriptor instead.
func (*Iat) Descriptor() ([]byte, []int) {
return file_proto_speech_speech_proto_rawDescGZIP(), []int{12}
}
func (x *Iat) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *Iat) GetText() string {
if x != nil {
return x.Text
}
return ""
}
func (x *Iat) GetIsLast() bool {
if x != nil {
return x.IsLast
}
return false
}
type Nlp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` //当前回话id
Intent []byte `protobuf:"bytes,2,opt,name=intent,proto3" json:"intent,omitempty"` //aiui nlp详细信息,参考:https://aiui.xfyun.cn/doc/aiui/4_skill_develop/8_agreement/semantic_agreement.html#%E6%B6%88%E6%81%AF%E6%A0%BC%E5%BC%8F%E6%A6%82%E8%A7%88
}
func (x *Nlp) Reset() {
*x = Nlp{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_speech_speech_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Nlp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Nlp) ProtoMessage() {}
func (x *Nlp) ProtoReflect() protoreflect.Message {
mi := &file_proto_speech_speech_proto_msgTypes[13]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Nlp.ProtoReflect.Descriptor instead.
func (*Nlp) Descriptor() ([]byte, []int) {
return file_proto_speech_speech_proto_rawDescGZIP(), []int{13}
}
func (x *Nlp) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *Nlp) GetIntent() []byte {
if x != nil {
return x.Intent
}
return nil
}
type OnSpeechEventResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
EventType SpeechEvent `protobuf:"varint,1,opt,name=event_type,json=eventType,proto3,enum=speechpb.SpeechEvent" json:"event_type,omitempty"`
// Types that are assignable to EventOneof:
// *OnSpeechEventResponse_ErrorInfo
// *OnSpeechEventResponse_Iat
// *OnSpeechEventResponse_Nlp
EventOneof isOnSpeechEventResponse_EventOneof `protobuf_oneof:"event_oneof"`
}
func (x *OnSpeechEventResponse) Reset() {
*x = OnSpeechEventResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_speech_speech_proto_msgTypes[14]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *OnSpeechEventResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*OnSpeechEventResponse) ProtoMessage() {}
func (x *OnSpeechEventResponse) ProtoReflect() protoreflect.Message {
mi := &file_proto_speech_speech_proto_msgTypes[14]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use OnSpeechEventResponse.ProtoReflect.Descriptor instead.
func (*OnSpeechEventResponse) Descriptor() ([]byte, []int) {
return file_proto_speech_speech_proto_rawDescGZIP(), []int{14}
}
func (x *OnSpeechEventResponse) GetEventType() SpeechEvent {
if x != nil {
return x.EventType
}
return SpeechEvent_UNKNOWN_EVENT
}
func (m *OnSpeechEventResponse) GetEventOneof() isOnSpeechEventResponse_EventOneof {
if m != nil {
return m.EventOneof
}
return nil
}
func (x *OnSpeechEventResponse) GetErrorInfo() *ErrorInfo {
if x, ok := x.GetEventOneof().(*OnSpeechEventResponse_ErrorInfo); ok {
return x.ErrorInfo
}
return nil
}
func (x *OnSpeechEventResponse) GetIat() *Iat {
if x, ok := x.GetEventOneof().(*OnSpeechEventResponse_Iat); ok {
return x.Iat
}
return nil
}
func (x *OnSpeechEventResponse) GetNlp() *Nlp {
if x, ok := x.GetEventOneof().(*OnSpeechEventResponse_Nlp); ok {
return x.Nlp
}
return nil
}
type isOnSpeechEventResponse_EventOneof interface {
isOnSpeechEventResponse_EventOneof()
}
type OnSpeechEventResponse_ErrorInfo struct {
ErrorInfo *ErrorInfo `protobuf:"bytes,2,opt,name=error_info,json=errorInfo,proto3,oneof"` // 错误结果
}
type OnSpeechEventResponse_Iat struct {
Iat *Iat `protobuf:"bytes,3,opt,name=iat,proto3,oneof"` // asr识别结果
}
type OnSpeechEventResponse_Nlp struct {
Nlp *Nlp `protobuf:"bytes,4,opt,name=nlp,proto3,oneof"` //nlp结果
}
func (*OnSpeechEventResponse_ErrorInfo) isOnSpeechEventResponse_EventOneof() {}
func (*OnSpeechEventResponse_Iat) isOnSpeechEventResponse_EventOneof() {}
func (*OnSpeechEventResponse_Nlp) isOnSpeechEventResponse_EventOneof() {}
var File_proto_speech_speech_proto protoreflect.FileDescriptor
var file_proto_speech_speech_proto_rawDesc = []byte{
0x0a, 0x19, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x70, 0x65, 0x65, 0x63, 0x68, 0x2f, 0x73,
0x70, 0x65, 0x65, 0x63, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x73, 0x70, 0x65,
0x65, 0x63, 0x68, 0x70, 0x62, 0x22, 0x24, 0x0a, 0x0e, 0x53, 0x65, 0x74, 0x42, 0x65, 0x61, 0x6d,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x65, 0x61, 0x6d, 0x18,
0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x62, 0x65, 0x61, 0x6d, 0x22, 0x11, 0x0a, 0x0f, 0x53,
0x65, 0x74, 0x42, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0f,
0x0a, 0x0d, 0x47, 0x65, 0x74, 0x49, 0x61, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22,
0x34, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x49, 0x61, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69,
0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x04, 0x74, 0x65, 0x78, 0x74, 0x22, 0x23, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4e, 0x6c, 0x70, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x65, 0x78, 0x74, 0x22, 0x38, 0x0a, 0x0e, 0x47, 0x65,
0x74, 0x4e, 0x6c, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02,
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06,
0x69, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x69, 0x6e,
0x74, 0x65, 0x6e, 0x74, 0x22, 0x3b, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x54, 0x74, 0x73, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x65, 0x78, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x6f, 0x6c,
0x75, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x76, 0x6f, 0x6c, 0x75, 0x6d,
0x65, 0x22, 0x32, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x54, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0x3b, 0x0a, 0x08, 0x53, 0x74, 0x61, 0x72, 0x74, 0x49, 0x61,
0x74, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08,
0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x77, 0x69, 0x74, 0x68, 0x5f,
0x6e, 0x6c, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x77, 0x69, 0x74, 0x68, 0x4e,
0x6c, 0x70, 0x22, 0x1d, 0x0a, 0x07, 0x53, 0x74, 0x6f, 0x70, 0x49, 0x61, 0x74, 0x12, 0x12, 0x0a,
0x04, 0x73, 0x74, 0x6f, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x73, 0x74, 0x6f,
0x70, 0x22, 0x5b, 0x0a, 0x14, 0x4f, 0x6e, 0x53, 0x70, 0x65, 0x65, 0x63, 0x68, 0x45, 0x76, 0x65,
0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61,
0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12,
0x19, 0x0a, 0x08, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x6e, 0x6c, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28,
0x08, 0x52, 0x07, 0x77, 0x69, 0x74, 0x68, 0x4e, 0x6c, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x74,
0x6f, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x73, 0x74, 0x6f, 0x70, 0x22, 0x33,
0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x69,
0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12,
0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63,
0x6f, 0x64, 0x65, 0x22, 0x42, 0x0a, 0x03, 0x49, 0x61, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x65,
0x78, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x65, 0x78, 0x74, 0x12, 0x17,
0x0a, 0x07, 0x69, 0x73, 0x5f, 0x6c, 0x61, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52,
0x06, 0x69, 0x73, 0x4c, 0x61, 0x73, 0x74, 0x22, 0x2d, 0x0a, 0x03, 0x4e, 0x6c, 0x70, 0x12, 0x0e,
0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16,
0x0a, 0x06, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06,
0x69, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0xd8, 0x01, 0x0a, 0x15, 0x4f, 0x6e, 0x53, 0x70, 0x65,
0x65, 0x63, 0x68, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x34, 0x0a, 0x0a, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x73, 0x70, 0x65, 0x65, 0x63, 0x68, 0x70, 0x62, 0x2e,
0x53, 0x70, 0x65, 0x65, 0x63, 0x68, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x09, 0x65, 0x76, 0x65,
0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x34, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f,
0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x73, 0x70, 0x65,
0x65, 0x63, 0x68, 0x70, 0x62, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x48,
0x00, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x21, 0x0a, 0x03,
0x69, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x73, 0x70, 0x65, 0x65,
0x63, 0x68, 0x70, 0x62, 0x2e, 0x49, 0x61, 0x74, 0x48, 0x00, 0x52, 0x03, 0x69, 0x61, 0x74, 0x12,
0x21, 0x0a, 0x03, 0x6e, 0x6c, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x73,
0x70, 0x65, 0x65, 0x63, 0x68, 0x70, 0x62, 0x2e, 0x4e, 0x6c, 0x70, 0x48, 0x00, 0x52, 0x03, 0x6e,
0x6c, 0x70, 0x42, 0x0d, 0x0a, 0x0b, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x6f, 0x6e, 0x65, 0x6f,
0x66, 0x2a, 0x46, 0x0a, 0x0b, 0x53, 0x70, 0x65, 0x65, 0x63, 0x68, 0x45, 0x76, 0x65, 0x6e, 0x74,
0x12, 0x11, 0x0a, 0x0d, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x45, 0x56, 0x45, 0x4e,
0x54, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x01, 0x12, 0x07,
0x0a, 0x03, 0x49, 0x41, 0x54, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x4e, 0x4c, 0x50, 0x10, 0x03,
0x12, 0x07, 0x0a, 0x03, 0x54, 0x54, 0x53, 0x10, 0x04, 0x32, 0xdf, 0x02, 0x0a, 0x06, 0x53, 0x70,
0x65, 0x65, 0x63, 0x68, 0x12, 0x40, 0x0a, 0x07, 0x53, 0x65, 0x74, 0x42, 0x65, 0x61, 0x6d, 0x12,
0x18, 0x2e, 0x73, 0x70, 0x65, 0x65, 0x63, 0x68, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x74, 0x42, 0x65,
0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x73, 0x70, 0x65, 0x65,
0x63, 0x68, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x74, 0x42, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3d, 0x0a, 0x06, 0x47, 0x65, 0x74, 0x49, 0x61, 0x74,
0x12, 0x17, 0x2e, 0x73, 0x70, 0x65, 0x65, 0x63, 0x68, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x49,
0x61, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x73, 0x70, 0x65, 0x65,
0x63, 0x68, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x61, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3d, 0x0a, 0x06, 0x47, 0x65, 0x74, 0x4e, 0x6c, 0x70, 0x12,
0x17, 0x2e, 0x73, 0x70, 0x65, 0x65, 0x63, 0x68, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6c,
0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x73, 0x70, 0x65, 0x65, 0x63,
0x68, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6c, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x22, 0x00, 0x12, 0x3d, 0x0a, 0x06, 0x47, 0x65, 0x74, 0x54, 0x74, 0x73, 0x12, 0x17,
0x2e, 0x73, 0x70, 0x65, 0x65, 0x63, 0x68, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x74, 0x73,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x73, 0x70, 0x65, 0x65, 0x63, 0x68,
0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x22, 0x00, 0x12, 0x56, 0x0a, 0x0d, 0x4f, 0x6e, 0x53, 0x70, 0x65, 0x65, 0x63, 0x68, 0x45,
0x76, 0x65, 0x6e, 0x74, 0x12, 0x1e, 0x2e, 0x73, 0x70, 0x65, 0x65, 0x63, 0x68, 0x70, 0x62, 0x2e,
0x4f, 0x6e, 0x53, 0x70, 0x65, 0x65, 0x63, 0x68, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x73, 0x70, 0x65, 0x65, 0x63, 0x68, 0x70, 0x62, 0x2e,
0x4f, 0x6e, 0x53, 0x70, 0x65, 0x65, 0x63, 0x68, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x42, 0x0c, 0x5a, 0x0a, 0x2e,
0x3b, 0x73, 0x70, 0x65, 0x65, 0x63, 0x68, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x33,
}
var (
file_proto_speech_speech_proto_rawDescOnce sync.Once
file_proto_speech_speech_proto_rawDescData = file_proto_speech_speech_proto_rawDesc
)
func file_proto_speech_speech_proto_rawDescGZIP() []byte {
file_proto_speech_speech_proto_rawDescOnce.Do(func() {
file_proto_speech_speech_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_speech_speech_proto_rawDescData)
})
return file_proto_speech_speech_proto_rawDescData
}
var file_proto_speech_speech_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_proto_speech_speech_proto_msgTypes = make([]protoimpl.MessageInfo, 15)
var file_proto_speech_speech_proto_goTypes = []interface{}{
(SpeechEvent)(0), // 0: speechpb.SpeechEvent
(*SetBeamRequest)(nil), // 1: speechpb.SetBeamRequest
(*SetBeamResponse)(nil), // 2: speechpb.SetBeamResponse
(*GetIatRequest)(nil), // 3: speechpb.GetIatRequest
(*GetIatResponse)(nil), // 4: speechpb.GetIatResponse
(*GetNlpRequest)(nil), // 5: speechpb.GetNlpRequest
(*GetNlpResponse)(nil), // 6: speechpb.GetNlpResponse
(*GetTtsRequest)(nil), // 7: speechpb.GetTtsRequest
(*GetTtsResponse)(nil), // 8: speechpb.GetTtsResponse
(*StartIat)(nil), // 9: speechpb.StartIat
(*StopIat)(nil), // 10: speechpb.StopIat
(*OnSpeechEventRequest)(nil), // 11: speechpb.OnSpeechEventRequest
(*ErrorInfo)(nil), // 12: speechpb.ErrorInfo
(*Iat)(nil), // 13: speechpb.Iat
(*Nlp)(nil), // 14: speechpb.Nlp
(*OnSpeechEventResponse)(nil), // 15: speechpb.OnSpeechEventResponse
}
var file_proto_speech_speech_proto_depIdxs = []int32{
0, // 0: speechpb.OnSpeechEventResponse.event_type:type_name -> speechpb.SpeechEvent
12, // 1: speechpb.OnSpeechEventResponse.error_info:type_name -> speechpb.ErrorInfo
13, // 2: speechpb.OnSpeechEventResponse.iat:type_name -> speechpb.Iat
14, // 3: speechpb.OnSpeechEventResponse.nlp:type_name -> speechpb.Nlp
1, // 4: speechpb.Speech.SetBeam:input_type -> speechpb.SetBeamRequest
3, // 5: speechpb.Speech.GetIat:input_type -> speechpb.GetIatRequest
5, // 6: speechpb.Speech.GetNlp:input_type -> speechpb.GetNlpRequest
7, // 7: speechpb.Speech.GetTts:input_type -> speechpb.GetTtsRequest
11, // 8: speechpb.Speech.OnSpeechEvent:input_type -> speechpb.OnSpeechEventRequest
2, // 9: speechpb.Speech.SetBeam:output_type -> speechpb.SetBeamResponse
4, // 10: speechpb.Speech.GetIat:output_type -> speechpb.GetIatResponse
6, // 11: speechpb.Speech.GetNlp:output_type -> speechpb.GetNlpResponse
8, // 12: speechpb.Speech.GetTts:output_type -> speechpb.GetTtsResponse
15, // 13: speechpb.Speech.OnSpeechEvent:output_type -> speechpb.OnSpeechEventResponse
9, // [9:14] is the sub-list for method output_type
4, // [4:9] is the sub-list for method input_type
4, // [4:4] is the sub-list for extension type_name
4, // [4:4] is the sub-list for extension extendee
0, // [0:4] is the sub-list for field type_name
}
func init() { file_proto_speech_speech_proto_init() }
func file_proto_speech_speech_proto_init() {
if File_proto_speech_speech_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_proto_speech_speech_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SetBeamRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_proto_speech_speech_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SetBeamResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_proto_speech_speech_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetIatRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_proto_speech_speech_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetIatResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_proto_speech_speech_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetNlpRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_proto_speech_speech_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetNlpResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_proto_speech_speech_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetTtsRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_proto_speech_speech_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetTtsResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_proto_speech_speech_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*StartIat); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_proto_speech_speech_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*StopIat); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_proto_speech_speech_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*OnSpeechEventRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_proto_speech_speech_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ErrorInfo); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_proto_speech_speech_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Iat); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_proto_speech_speech_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Nlp); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_proto_speech_speech_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*OnSpeechEventResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_proto_speech_speech_proto_msgTypes[14].OneofWrappers = []interface{}{
(*OnSpeechEventResponse_ErrorInfo)(nil),
(*OnSpeechEventResponse_Iat)(nil),
(*OnSpeechEventResponse_Nlp)(nil),
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_proto_speech_speech_proto_rawDesc,
NumEnums: 1,
NumMessages: 15,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_proto_speech_speech_proto_goTypes,
DependencyIndexes: file_proto_speech_speech_proto_depIdxs,
EnumInfos: file_proto_speech_speech_proto_enumTypes,
MessageInfos: file_proto_speech_speech_proto_msgTypes,
}.Build()
File_proto_speech_speech_proto = out.File
file_proto_speech_speech_proto_rawDesc = nil
file_proto_speech_speech_proto_goTypes = nil
file_proto_speech_speech_proto_depIdxs = nil
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConnInterface
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion6
// SpeechClient is the client API for Speech service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type SpeechClient interface {
SetBeam(ctx context.Context, in *SetBeamRequest, opts ...grpc.CallOption) (*SetBeamResponse, error)
GetIat(ctx context.Context, in *GetIatRequest, opts ...grpc.CallOption) (*GetIatResponse, error)
GetNlp(ctx context.Context, in *GetNlpRequest, opts ...grpc.CallOption) (*GetNlpResponse, error)
GetTts(ctx context.Context, in *GetTtsRequest, opts ...grpc.CallOption) (*GetTtsResponse, error)
OnSpeechEvent(ctx context.Context, opts ...grpc.CallOption) (Speech_OnSpeechEventClient, error)
}
type speechClient struct {
cc grpc.ClientConnInterface
}
func NewSpeechClient(cc grpc.ClientConnInterface) SpeechClient {
return &speechClient{cc}
}
func (c *speechClient) SetBeam(ctx context.Context, in *SetBeamRequest, opts ...grpc.CallOption) (*SetBeamResponse, error) {
out := new(SetBeamResponse)
err := c.cc.Invoke(ctx, "/speechpb.Speech/SetBeam", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *speechClient) GetIat(ctx context.Context, in *GetIatRequest, opts ...grpc.CallOption) (*GetIatResponse, error) {
out := new(GetIatResponse)
err := c.cc.Invoke(ctx, "/speechpb.Speech/GetIat", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *speechClient) GetNlp(ctx context.Context, in *GetNlpRequest, opts ...grpc.CallOption) (*GetNlpResponse, error) {
out := new(GetNlpResponse)
err := c.cc.Invoke(ctx, "/speechpb.Speech/GetNlp", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *speechClient) GetTts(ctx context.Context, in *GetTtsRequest, opts ...grpc.CallOption) (*GetTtsResponse, error) {
out := new(GetTtsResponse)
err := c.cc.Invoke(ctx, "/speechpb.Speech/GetTts", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *speechClient) OnSpeechEvent(ctx context.Context, opts ...grpc.CallOption) (Speech_OnSpeechEventClient, error) {
stream, err := c.cc.NewStream(ctx, &_Speech_serviceDesc.Streams[0], "/speechpb.Speech/OnSpeechEvent", opts...)
if err != nil {
return nil, err
}
x := &speechOnSpeechEventClient{stream}
return x, nil
}
type Speech_OnSpeechEventClient interface {
Send(*OnSpeechEventRequest) error
Recv() (*OnSpeechEventResponse, error)
grpc.ClientStream
}
type speechOnSpeechEventClient struct {
grpc.ClientStream
}
func (x *speechOnSpeechEventClient) Send(m *OnSpeechEventRequest) error {
return x.ClientStream.SendMsg(m)
}
func (x *speechOnSpeechEventClient) Recv() (*OnSpeechEventResponse, error) {
m := new(OnSpeechEventResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
// SpeechServer is the server API for Speech service.
type SpeechServer interface {
SetBeam(context.Context, *SetBeamRequest) (*SetBeamResponse, error)
GetIat(context.Context, *GetIatRequest) (*GetIatResponse, error)
GetNlp(context.Context, *GetNlpRequest) (*GetNlpResponse, error)
GetTts(context.Context, *GetTtsRequest) (*GetTtsResponse, error)
OnSpeechEvent(Speech_OnSpeechEventServer) error
}
// UnimplementedSpeechServer can be embedded to have forward compatible implementations.
type UnimplementedSpeechServer struct {
}
func (*UnimplementedSpeechServer) SetBeam(context.Context, *SetBeamRequest) (*SetBeamResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method SetBeam not implemented")
}
func (*UnimplementedSpeechServer) GetIat(context.Context, *GetIatRequest) (*GetIatResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetIat not implemented")
}
func (*UnimplementedSpeechServer) GetNlp(context.Context, *GetNlpRequest) (*GetNlpResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetNlp not implemented")
}
func (*UnimplementedSpeechServer) GetTts(context.Context, *GetTtsRequest) (*GetTtsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetTts not implemented")
}
func (*UnimplementedSpeechServer) OnSpeechEvent(Speech_OnSpeechEventServer) error {
return status.Errorf(codes.Unimplemented, "method OnSpeechEvent not implemented")
}
func RegisterSpeechServer(s *grpc.Server, srv SpeechServer) {
s.RegisterService(&_Speech_serviceDesc, srv)
}
func _Speech_SetBeam_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SetBeamRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SpeechServer).SetBeam(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/speechpb.Speech/SetBeam",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SpeechServer).SetBeam(ctx, req.(*SetBeamRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Speech_GetIat_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetIatRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SpeechServer).GetIat(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/speechpb.Speech/GetIat",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SpeechServer).GetIat(ctx, req.(*GetIatRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Speech_GetNlp_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetNlpRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SpeechServer).GetNlp(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/speechpb.Speech/GetNlp",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SpeechServer).GetNlp(ctx, req.(*GetNlpRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Speech_GetTts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetTtsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SpeechServer).GetTts(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/speechpb.Speech/GetTts",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SpeechServer).GetTts(ctx, req.(*GetTtsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Speech_OnSpeechEvent_Handler(srv interface{}, stream grpc.ServerStream) error {
return srv.(SpeechServer).OnSpeechEvent(&speechOnSpeechEventServer{stream})
}
type Speech_OnSpeechEventServer interface {
Send(*OnSpeechEventResponse) error
Recv() (*OnSpeechEventRequest, error)
grpc.ServerStream
}
type speechOnSpeechEventServer struct {
grpc.ServerStream
}
func (x *speechOnSpeechEventServer) Send(m *OnSpeechEventResponse) error {
return x.ServerStream.SendMsg(m)
}
func (x *speechOnSpeechEventServer) Recv() (*OnSpeechEventRequest, error) {
m := new(OnSpeechEventRequest)
if err := x.ServerStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
var _Speech_serviceDesc = grpc.ServiceDesc{
ServiceName: "speechpb.Speech",
HandlerType: (*SpeechServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "SetBeam",
Handler: _Speech_SetBeam_Handler,
},
{
MethodName: "GetIat",
Handler: _Speech_GetIat_Handler,
},
{
MethodName: "GetNlp",
Handler: _Speech_GetNlp_Handler,
},
{
MethodName: "GetTts",
Handler: _Speech_GetTts_Handler,
},
},
Streams: []grpc.StreamDesc{
{
StreamName: "OnSpeechEvent",
Handler: _Speech_OnSpeechEvent_Handler,
ServerStreams: true,
ClientStreams: true,
},
},
Metadata: "proto/speech/speech.proto",
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/airport_dev/grpc_api.git
git@gitee.com:airport_dev/grpc_api.git
airport_dev
grpc_api
grpc_api
v1.0.3

搜索帮助