Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterBatchAPIServer(s grpc.ServiceRegistrar, srv BatchAPIServer)
- func RegisterSLUServer(s grpc.ServiceRegistrar, srv SLUServer)
- func RegisterWLUServer(s grpc.ServiceRegistrar, srv WLUServer)
- type AudioConfiguration
- func (*AudioConfiguration) Descriptor() ([]byte, []int)deprecated
- func (x *AudioConfiguration) GetChannels() int32
- func (x *AudioConfiguration) GetEncoding() AudioConfiguration_Encoding
- func (x *AudioConfiguration) GetLanguageCodes() []string
- func (x *AudioConfiguration) GetSampleRateHertz() int32
- func (*AudioConfiguration) ProtoMessage()
- func (x *AudioConfiguration) ProtoReflect() protoreflect.Message
- func (x *AudioConfiguration) Reset()
- func (x *AudioConfiguration) String() string
- type AudioConfiguration_Encoding
- func (AudioConfiguration_Encoding) Descriptor() protoreflect.EnumDescriptor
- func (x AudioConfiguration_Encoding) Enum() *AudioConfiguration_Encoding
- func (AudioConfiguration_Encoding) EnumDescriptor() ([]byte, []int)deprecated
- func (x AudioConfiguration_Encoding) Number() protoreflect.EnumNumber
- func (x AudioConfiguration_Encoding) String() string
- func (AudioConfiguration_Encoding) Type() protoreflect.EnumType
- type BatchAPIClient
- type BatchAPIServer
- type BatchAPI_ProcessAudioClient
- type BatchAPI_ProcessAudioServer
- type HttpResource
- func (*HttpResource) Descriptor() ([]byte, []int)deprecated
- func (x *HttpResource) GetHeaders() []*HttpResource_Header
- func (x *HttpResource) GetMethod() HttpResource_Method
- func (x *HttpResource) GetUrl() string
- func (*HttpResource) ProtoMessage()
- func (x *HttpResource) ProtoReflect() protoreflect.Message
- func (x *HttpResource) Reset()
- func (x *HttpResource) String() string
- type HttpResource_Header
- func (*HttpResource_Header) Descriptor() ([]byte, []int)deprecated
- func (x *HttpResource_Header) GetName() string
- func (x *HttpResource_Header) GetValue() string
- func (*HttpResource_Header) ProtoMessage()
- func (x *HttpResource_Header) ProtoReflect() protoreflect.Message
- func (x *HttpResource_Header) Reset()
- func (x *HttpResource_Header) String() string
- type HttpResource_Method
- func (HttpResource_Method) Descriptor() protoreflect.EnumDescriptor
- func (x HttpResource_Method) Enum() *HttpResource_Method
- func (HttpResource_Method) EnumDescriptor() ([]byte, []int)deprecated
- func (x HttpResource_Method) Number() protoreflect.EnumNumber
- func (x HttpResource_Method) String() string
- func (HttpResource_Method) Type() protoreflect.EnumType
- type Operation
- func (*Operation) Descriptor() ([]byte, []int)deprecated
- func (x *Operation) GetAppId() string
- func (x *Operation) GetDeviceId() string
- func (x *Operation) GetDuration() *durationpb.Duration
- func (x *Operation) GetError() string
- func (x *Operation) GetId() string
- func (x *Operation) GetLanguageCode() string
- func (x *Operation) GetReference() string
- func (x *Operation) GetStatus() Operation_Status
- func (x *Operation) GetTranscripts() []*Transcript
- func (*Operation) ProtoMessage()
- func (x *Operation) ProtoReflect() protoreflect.Message
- func (x *Operation) Reset()
- func (x *Operation) String() string
- type Operation_Status
- func (Operation_Status) Descriptor() protoreflect.EnumDescriptor
- func (x Operation_Status) Enum() *Operation_Status
- func (Operation_Status) EnumDescriptor() ([]byte, []int)deprecated
- func (x Operation_Status) Number() protoreflect.EnumNumber
- func (x Operation_Status) String() string
- func (Operation_Status) Type() protoreflect.EnumType
- type Option
- type ProcessAudioRequest
- func (*ProcessAudioRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ProcessAudioRequest) GetAppId() string
- func (x *ProcessAudioRequest) GetAudio() []byte
- func (x *ProcessAudioRequest) GetConfig() *AudioConfiguration
- func (m *ProcessAudioRequest) GetDestination() isProcessAudioRequest_Destination
- func (x *ProcessAudioRequest) GetDeviceId() string
- func (x *ProcessAudioRequest) GetHttpResult() *HttpResource
- func (x *ProcessAudioRequest) GetHttpSource() *HttpResource
- func (x *ProcessAudioRequest) GetOptions() []*Option
- func (x *ProcessAudioRequest) GetReference() string
- func (x *ProcessAudioRequest) GetResultsUri() string
- func (m *ProcessAudioRequest) GetSource() isProcessAudioRequest_Source
- func (x *ProcessAudioRequest) GetUri() string
- func (*ProcessAudioRequest) ProtoMessage()
- func (x *ProcessAudioRequest) ProtoReflect() protoreflect.Message
- func (x *ProcessAudioRequest) Reset()
- func (x *ProcessAudioRequest) String() string
- type ProcessAudioRequest_Audio
- type ProcessAudioRequest_HttpResult
- type ProcessAudioRequest_HttpSource
- type ProcessAudioRequest_ResultsUri
- type ProcessAudioRequest_Uri
- type ProcessAudioResponse
- func (*ProcessAudioResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ProcessAudioResponse) GetOperation() *Operation
- func (*ProcessAudioResponse) ProtoMessage()
- func (x *ProcessAudioResponse) ProtoReflect() protoreflect.Message
- func (x *ProcessAudioResponse) Reset()
- func (x *ProcessAudioResponse) String() string
- type QueryStatusRequest
- func (*QueryStatusRequest) Descriptor() ([]byte, []int)deprecated
- func (x *QueryStatusRequest) GetId() string
- func (x *QueryStatusRequest) GetReference() string
- func (*QueryStatusRequest) ProtoMessage()
- func (x *QueryStatusRequest) ProtoReflect() protoreflect.Message
- func (x *QueryStatusRequest) Reset()
- func (x *QueryStatusRequest) String() string
- type QueryStatusResponse
- func (*QueryStatusResponse) Descriptor() ([]byte, []int)deprecated
- func (x *QueryStatusResponse) GetOperation() *Operation
- func (*QueryStatusResponse) ProtoMessage()
- func (x *QueryStatusResponse) ProtoReflect() protoreflect.Message
- func (x *QueryStatusResponse) Reset()
- func (x *QueryStatusResponse) String() string
- type RoundTripMeasurementRequest
- func (*RoundTripMeasurementRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RoundTripMeasurementRequest) GetId() int32
- func (*RoundTripMeasurementRequest) ProtoMessage()
- func (x *RoundTripMeasurementRequest) ProtoReflect() protoreflect.Message
- func (x *RoundTripMeasurementRequest) Reset()
- func (x *RoundTripMeasurementRequest) String() string
- type RoundTripMeasurementResponse
- func (*RoundTripMeasurementResponse) Descriptor() ([]byte, []int)deprecated
- func (x *RoundTripMeasurementResponse) GetId() int32
- func (*RoundTripMeasurementResponse) ProtoMessage()
- func (x *RoundTripMeasurementResponse) ProtoReflect() protoreflect.Message
- func (x *RoundTripMeasurementResponse) Reset()
- func (x *RoundTripMeasurementResponse) String() string
- type SLUClient
- type SLUConfig
- func (*SLUConfig) Descriptor() ([]byte, []int)deprecated
- func (x *SLUConfig) GetChannels() int32
- func (x *SLUConfig) GetEncoding() SLUConfig_Encoding
- func (x *SLUConfig) GetLanguageCode() string
- func (x *SLUConfig) GetOptions() []*SLUConfig_Option
- func (x *SLUConfig) GetSampleRateHertz() int32
- func (*SLUConfig) ProtoMessage()
- func (x *SLUConfig) ProtoReflect() protoreflect.Message
- func (x *SLUConfig) Reset()
- func (x *SLUConfig) String() string
- type SLUConfig_Encoding
- func (SLUConfig_Encoding) Descriptor() protoreflect.EnumDescriptor
- func (x SLUConfig_Encoding) Enum() *SLUConfig_Encoding
- func (SLUConfig_Encoding) EnumDescriptor() ([]byte, []int)deprecated
- func (x SLUConfig_Encoding) Number() protoreflect.EnumNumber
- func (x SLUConfig_Encoding) String() string
- func (SLUConfig_Encoding) Type() protoreflect.EnumType
- type SLUConfig_Option
- func (*SLUConfig_Option) Descriptor() ([]byte, []int)deprecated
- func (x *SLUConfig_Option) GetKey() string
- func (x *SLUConfig_Option) GetValue() []string
- func (*SLUConfig_Option) ProtoMessage()
- func (x *SLUConfig_Option) ProtoReflect() protoreflect.Message
- func (x *SLUConfig_Option) Reset()
- func (x *SLUConfig_Option) String() string
- type SLUEntity
- func (*SLUEntity) Descriptor() ([]byte, []int)deprecated
- func (x *SLUEntity) GetEndPosition() int32
- func (x *SLUEntity) GetEntity() string
- func (x *SLUEntity) GetStartPosition() int32
- func (x *SLUEntity) GetValue() string
- func (*SLUEntity) ProtoMessage()
- func (x *SLUEntity) ProtoReflect() protoreflect.Message
- func (x *SLUEntity) Reset()
- func (x *SLUEntity) String() string
- type SLUError
- type SLUEvent
- type SLUEvent_Event
- func (SLUEvent_Event) Descriptor() protoreflect.EnumDescriptor
- func (x SLUEvent_Event) Enum() *SLUEvent_Event
- func (SLUEvent_Event) EnumDescriptor() ([]byte, []int)deprecated
- func (x SLUEvent_Event) Number() protoreflect.EnumNumber
- func (x SLUEvent_Event) String() string
- func (SLUEvent_Event) Type() protoreflect.EnumType
- type SLUFinished
- type SLUIntent
- type SLURequest
- func (*SLURequest) Descriptor() ([]byte, []int)deprecated
- func (x *SLURequest) GetAudio() []byte
- func (x *SLURequest) GetConfig() *SLUConfig
- func (x *SLURequest) GetEvent() *SLUEventdeprecated
- func (x *SLURequest) GetRttResponse() *RoundTripMeasurementResponse
- func (x *SLURequest) GetStart() *SLUStart
- func (x *SLURequest) GetStop() *SLUStop
- func (m *SLURequest) GetStreamingRequest() isSLURequest_StreamingRequest
- func (*SLURequest) ProtoMessage()
- func (x *SLURequest) ProtoReflect() protoreflect.Message
- func (x *SLURequest) Reset()
- func (x *SLURequest) String() string
- type SLURequest_Audio
- type SLURequest_Config
- type SLURequest_Event
- type SLURequest_RttResponse
- type SLURequest_Start
- type SLURequest_Stop
- type SLUResponse
- func (*SLUResponse) Descriptor() ([]byte, []int)deprecated
- func (x *SLUResponse) GetAudioContext() string
- func (x *SLUResponse) GetEntity() *SLUEntity
- func (x *SLUResponse) GetFinished() *SLUFinished
- func (x *SLUResponse) GetIntent() *SLUIntent
- func (x *SLUResponse) GetRttRequest() *RoundTripMeasurementRequest
- func (x *SLUResponse) GetSegmentEnd() *SLUSegmentEnd
- func (x *SLUResponse) GetSegmentId() int32
- func (x *SLUResponse) GetStarted() *SLUStarted
- func (m *SLUResponse) GetStreamingResponse() isSLUResponse_StreamingResponse
- func (x *SLUResponse) GetTentativeEntities() *SLUTentativeEntities
- func (x *SLUResponse) GetTentativeIntent() *SLUIntent
- func (x *SLUResponse) GetTentativeTranscript() *SLUTentativeTranscript
- func (x *SLUResponse) GetTranscript() *SLUTranscript
- func (*SLUResponse) ProtoMessage()
- func (x *SLUResponse) ProtoReflect() protoreflect.Message
- func (x *SLUResponse) Reset()
- func (x *SLUResponse) String() string
- type SLUResponse_Entity
- type SLUResponse_Finished
- type SLUResponse_Intent
- type SLUResponse_RttRequest
- type SLUResponse_SegmentEnd
- type SLUResponse_Started
- type SLUResponse_TentativeEntities
- type SLUResponse_TentativeIntent
- type SLUResponse_TentativeTranscript
- type SLUResponse_Transcript
- type SLUSegmentEnd
- type SLUServer
- type SLUStart
- type SLUStart_Option
- func (*SLUStart_Option) Descriptor() ([]byte, []int)deprecated
- func (x *SLUStart_Option) GetKey() string
- func (x *SLUStart_Option) GetValue() []string
- func (*SLUStart_Option) ProtoMessage()
- func (x *SLUStart_Option) ProtoReflect() protoreflect.Message
- func (x *SLUStart_Option) Reset()
- func (x *SLUStart_Option) String() string
- type SLUStarted
- type SLUStop
- type SLUTentativeEntities
- func (*SLUTentativeEntities) Descriptor() ([]byte, []int)deprecated
- func (x *SLUTentativeEntities) GetTentativeEntities() []*SLUEntity
- func (*SLUTentativeEntities) ProtoMessage()
- func (x *SLUTentativeEntities) ProtoReflect() protoreflect.Message
- func (x *SLUTentativeEntities) Reset()
- func (x *SLUTentativeEntities) String() string
- type SLUTentativeTranscript
- func (*SLUTentativeTranscript) Descriptor() ([]byte, []int)deprecated
- func (x *SLUTentativeTranscript) GetTentativeTranscript() string
- func (x *SLUTentativeTranscript) GetTentativeWords() []*SLUTranscript
- func (*SLUTentativeTranscript) ProtoMessage()
- func (x *SLUTentativeTranscript) ProtoReflect() protoreflect.Message
- func (x *SLUTentativeTranscript) Reset()
- func (x *SLUTentativeTranscript) String() string
- type SLUTranscript
- func (*SLUTranscript) Descriptor() ([]byte, []int)deprecated
- func (x *SLUTranscript) GetEndTime() int32
- func (x *SLUTranscript) GetIndex() int32
- func (x *SLUTranscript) GetStartTime() int32
- func (x *SLUTranscript) GetWord() string
- func (*SLUTranscript) ProtoMessage()
- func (x *SLUTranscript) ProtoReflect() protoreflect.Message
- func (x *SLUTranscript) Reset()
- func (x *SLUTranscript) String() string
- type SLU_StreamClient
- type SLU_StreamServer
- type TextsRequest
- func (*TextsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *TextsRequest) GetAppId() string
- func (x *TextsRequest) GetRequests() []*WLURequest
- func (*TextsRequest) ProtoMessage()
- func (x *TextsRequest) ProtoReflect() protoreflect.Message
- func (x *TextsRequest) Reset()
- func (x *TextsRequest) String() string
- type TextsResponse
- type Transcript
- func (*Transcript) Descriptor() ([]byte, []int)deprecated
- func (x *Transcript) GetEndTime() int32
- func (x *Transcript) GetIndex() int32
- func (x *Transcript) GetStartTime() int32
- func (x *Transcript) GetWord() string
- func (*Transcript) ProtoMessage()
- func (x *Transcript) ProtoReflect() protoreflect.Message
- func (x *Transcript) Reset()
- func (x *Transcript) String() string
- type UnimplementedBatchAPIServer
- type UnimplementedSLUServer
- type UnimplementedWLUServer
- type UnsafeBatchAPIServer
- type UnsafeSLUServer
- type UnsafeWLUServer
- type WLUClient
- type WLUEntity
- func (*WLUEntity) Descriptor() ([]byte, []int)deprecated
- func (x *WLUEntity) GetEndPosition() int32
- func (x *WLUEntity) GetEntity() string
- func (x *WLUEntity) GetStartPosition() int32
- func (x *WLUEntity) GetValue() string
- func (*WLUEntity) ProtoMessage()
- func (x *WLUEntity) ProtoReflect() protoreflect.Message
- func (x *WLUEntity) Reset()
- func (x *WLUEntity) String() string
- type WLUIntent
- type WLURequest
- func (*WLURequest) Descriptor() ([]byte, []int)deprecated
- func (x *WLURequest) GetLanguageCode() string
- func (x *WLURequest) GetReferenceTime() *timestamppb.Timestamp
- func (x *WLURequest) GetText() string
- func (*WLURequest) ProtoMessage()
- func (x *WLURequest) ProtoReflect() protoreflect.Message
- func (x *WLURequest) Reset()
- func (x *WLURequest) String() string
- type WLUResponse
- type WLUSegment
- func (*WLUSegment) Descriptor() ([]byte, []int)deprecated
- func (x *WLUSegment) GetAnnotatedText() string
- func (x *WLUSegment) GetEntities() []*WLUEntity
- func (x *WLUSegment) GetIntent() *WLUIntent
- func (x *WLUSegment) GetText() string
- func (x *WLUSegment) GetTokens() []*WLUToken
- func (*WLUSegment) ProtoMessage()
- func (x *WLUSegment) ProtoReflect() protoreflect.Message
- func (x *WLUSegment) Reset()
- func (x *WLUSegment) String() string
- type WLUServer
- type WLUToken
Constants ¶
const ( BatchAPI_ProcessAudio_FullMethodName = "/speechly.slu.v1.BatchAPI/ProcessAudio" BatchAPI_QueryStatus_FullMethodName = "/speechly.slu.v1.BatchAPI/QueryStatus" )
const ( WLU_Text_FullMethodName = "/speechly.slu.v1.WLU/Text" WLU_Texts_FullMethodName = "/speechly.slu.v1.WLU/Texts" )
const (
SLU_Stream_FullMethodName = "/speechly.slu.v1.SLU/Stream"
)
Variables ¶
var ( AudioConfiguration_Encoding_name = map[int32]string{ 0: "ENCODING_INVALID", 1: "ENCODING_LINEAR16", } AudioConfiguration_Encoding_value = map[string]int32{ "ENCODING_INVALID": 0, "ENCODING_LINEAR16": 1, } )
Enum value maps for AudioConfiguration_Encoding.
var ( HttpResource_Method_name = map[int32]string{ 0: "METHOD_INVALID", 1: "METHOD_GET", 2: "METHOD_POST", 3: "METHOD_PUT", } HttpResource_Method_value = map[string]int32{ "METHOD_INVALID": 0, "METHOD_GET": 1, "METHOD_POST": 2, "METHOD_PUT": 3, } )
Enum value maps for HttpResource_Method.
var ( Operation_Status_name = map[int32]string{ 0: "STATUS_INVALID", 1: "STATUS_QUEUED", 2: "STATUS_PROCESSING", 3: "STATUS_DONE", 4: "STATUS_ERROR", 5: "STATUS_ANALYSING", 6: "STATUS_WAITING_DECODER", } Operation_Status_value = map[string]int32{ "STATUS_INVALID": 0, "STATUS_QUEUED": 1, "STATUS_PROCESSING": 2, "STATUS_DONE": 3, "STATUS_ERROR": 4, "STATUS_ANALYSING": 5, "STATUS_WAITING_DECODER": 6, } )
Enum value maps for Operation_Status.
var ( SLUConfig_Encoding_name = map[int32]string{ 0: "LINEAR16", } SLUConfig_Encoding_value = map[string]int32{ "LINEAR16": 0, } )
Enum value maps for SLUConfig_Encoding.
var ( SLUEvent_Event_name = map[int32]string{ 0: "START", 1: "STOP", } SLUEvent_Event_value = map[string]int32{ "START": 0, "STOP": 1, } )
Enum value maps for SLUEvent_Event.
var BatchAPI_ServiceDesc = grpc.ServiceDesc{ ServiceName: "speechly.slu.v1.BatchAPI", HandlerType: (*BatchAPIServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "QueryStatus", Handler: _BatchAPI_QueryStatus_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "ProcessAudio", Handler: _BatchAPI_ProcessAudio_Handler, ClientStreams: true, }, }, Metadata: "speechly/slu/v1/batch_api.proto", }
BatchAPI_ServiceDesc is the grpc.ServiceDesc for BatchAPI service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_speechly_slu_v1_batch_api_proto protoreflect.FileDescriptor
var File_speechly_slu_v1_batch_proto protoreflect.FileDescriptor
var File_speechly_slu_v1_slu_proto protoreflect.FileDescriptor
var File_speechly_slu_v1_wlu_proto protoreflect.FileDescriptor
var SLU_ServiceDesc = grpc.ServiceDesc{ ServiceName: "speechly.slu.v1.SLU", HandlerType: (*SLUServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "Stream", Handler: _SLU_Stream_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "speechly/slu/v1/slu.proto", }
SLU_ServiceDesc is the grpc.ServiceDesc for SLU service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var WLU_ServiceDesc = grpc.ServiceDesc{ ServiceName: "speechly.slu.v1.WLU", HandlerType: (*WLUServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Text", Handler: _WLU_Text_Handler, }, { MethodName: "Texts", Handler: _WLU_Texts_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "speechly/slu/v1/wlu.proto", }
WLU_ServiceDesc is the grpc.ServiceDesc for WLU service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterBatchAPIServer ¶
func RegisterBatchAPIServer(s grpc.ServiceRegistrar, srv BatchAPIServer)
func RegisterSLUServer ¶
func RegisterSLUServer(s grpc.ServiceRegistrar, srv SLUServer)
func RegisterWLUServer ¶
func RegisterWLUServer(s grpc.ServiceRegistrar, srv WLUServer)
Types ¶
type AudioConfiguration ¶
type AudioConfiguration struct { // The encoding of the audio data sent in the stream. // Required. Encoding AudioConfiguration_Encoding `protobuf:"varint,1,opt,name=encoding,proto3,enum=speechly.slu.v1.AudioConfiguration_Encoding" json:"encoding,omitempty"` // The number of channels in the input audio data. // Required. Channels int32 `protobuf:"varint,2,opt,name=channels,proto3" json:"channels,omitempty"` // Sample rate in Hertz of the audio data sent in the stream (e.g. 16000). // Required. SampleRateHertz int32 `protobuf:"varint,3,opt,name=sample_rate_hertz,json=sampleRateHertz,proto3" json:"sample_rate_hertz,omitempty"` // The language(s) of the audio sent in the stream as a BCP-47 language tag // (e.g. "en-US"). Defaults to the target application language. // Optional. LanguageCodes []string `protobuf:"bytes,4,rep,name=language_codes,json=languageCodes,proto3" json:"language_codes,omitempty"` // contains filtered or unexported fields }
Describes the audio content of the batch operation.
func (*AudioConfiguration) Descriptor
deprecated
func (*AudioConfiguration) Descriptor() ([]byte, []int)
Deprecated: Use AudioConfiguration.ProtoReflect.Descriptor instead.
func (*AudioConfiguration) GetChannels ¶
func (x *AudioConfiguration) GetChannels() int32
func (*AudioConfiguration) GetEncoding ¶
func (x *AudioConfiguration) GetEncoding() AudioConfiguration_Encoding
func (*AudioConfiguration) GetLanguageCodes ¶
func (x *AudioConfiguration) GetLanguageCodes() []string
func (*AudioConfiguration) GetSampleRateHertz ¶
func (x *AudioConfiguration) GetSampleRateHertz() int32
func (*AudioConfiguration) ProtoMessage ¶
func (*AudioConfiguration) ProtoMessage()
func (*AudioConfiguration) ProtoReflect ¶
func (x *AudioConfiguration) ProtoReflect() protoreflect.Message
func (*AudioConfiguration) Reset ¶
func (x *AudioConfiguration) Reset()
func (*AudioConfiguration) String ¶
func (x *AudioConfiguration) String() string
type AudioConfiguration_Encoding ¶
type AudioConfiguration_Encoding int32
The encoding of the audio data sent in the stream.
const ( AudioConfiguration_ENCODING_INVALID AudioConfiguration_Encoding = 0 // Uncompressed 16-bit signed little-endian samples (Linear PCM). AudioConfiguration_ENCODING_LINEAR16 AudioConfiguration_Encoding = 1 )
func (AudioConfiguration_Encoding) Descriptor ¶
func (AudioConfiguration_Encoding) Descriptor() protoreflect.EnumDescriptor
func (AudioConfiguration_Encoding) Enum ¶
func (x AudioConfiguration_Encoding) Enum() *AudioConfiguration_Encoding
func (AudioConfiguration_Encoding) EnumDescriptor
deprecated
func (AudioConfiguration_Encoding) EnumDescriptor() ([]byte, []int)
Deprecated: Use AudioConfiguration_Encoding.Descriptor instead.
func (AudioConfiguration_Encoding) Number ¶
func (x AudioConfiguration_Encoding) Number() protoreflect.EnumNumber
func (AudioConfiguration_Encoding) String ¶
func (x AudioConfiguration_Encoding) String() string
func (AudioConfiguration_Encoding) Type ¶
func (AudioConfiguration_Encoding) Type() protoreflect.EnumType
type BatchAPIClient ¶
type BatchAPIClient interface { // Create a new background SLU operation for a single audio source. // An audio source can be // - audio chunks sent via repeated ProcessAudioRequests, or // - URI of a file, reachable from the API // The response includes an `id` that is used to match the operation to the // results. A `reference` identifier can also be set. // The destination can be a webhook URL, in which case the results are posted // there when they are ready. The payload is an instance of `Operation`. ProcessAudio(ctx context.Context, opts ...grpc.CallOption) (BatchAPI_ProcessAudioClient, error) // Query the status of a given batch operation. // If the `ProcessAudioRequest` did not define a `results_uri` as a // destination, the results are returned in the `QueryStatusResponse`. QueryStatus(ctx context.Context, in *QueryStatusRequest, opts ...grpc.CallOption) (*QueryStatusResponse, error) }
BatchAPIClient is the client API for BatchAPI 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.
func NewBatchAPIClient ¶
func NewBatchAPIClient(cc grpc.ClientConnInterface) BatchAPIClient
type BatchAPIServer ¶
type BatchAPIServer interface { // Create a new background SLU operation for a single audio source. // An audio source can be // - audio chunks sent via repeated ProcessAudioRequests, or // - URI of a file, reachable from the API // The response includes an `id` that is used to match the operation to the // results. A `reference` identifier can also be set. // The destination can be a webhook URL, in which case the results are posted // there when they are ready. The payload is an instance of `Operation`. ProcessAudio(BatchAPI_ProcessAudioServer) error // Query the status of a given batch operation. // If the `ProcessAudioRequest` did not define a `results_uri` as a // destination, the results are returned in the `QueryStatusResponse`. QueryStatus(context.Context, *QueryStatusRequest) (*QueryStatusResponse, error) // contains filtered or unexported methods }
BatchAPIServer is the server API for BatchAPI service. All implementations must embed UnimplementedBatchAPIServer for forward compatibility
type BatchAPI_ProcessAudioClient ¶
type BatchAPI_ProcessAudioClient interface { Send(*ProcessAudioRequest) error CloseAndRecv() (*ProcessAudioResponse, error) grpc.ClientStream }
type BatchAPI_ProcessAudioServer ¶
type BatchAPI_ProcessAudioServer interface { SendAndClose(*ProcessAudioResponse) error Recv() (*ProcessAudioRequest, error) grpc.ServerStream }
type HttpResource ¶
type HttpResource struct { // URL of the endpoint (protocol://server/path) // Required. Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` // method to use in connection. // Required. Method HttpResource_Method `protobuf:"varint,2,opt,name=method,proto3,enum=speechly.slu.v1.HttpResource_Method" json:"method,omitempty"` // Possible additional headers to include in the connection. // Optional. Headers []*HttpResource_Header `protobuf:"bytes,3,rep,name=headers,proto3" json:"headers,omitempty"` // contains filtered or unexported fields }
Describes full properties of an HTTP endpoint.
func (*HttpResource) Descriptor
deprecated
func (*HttpResource) Descriptor() ([]byte, []int)
Deprecated: Use HttpResource.ProtoReflect.Descriptor instead.
func (*HttpResource) GetHeaders ¶
func (x *HttpResource) GetHeaders() []*HttpResource_Header
func (*HttpResource) GetMethod ¶
func (x *HttpResource) GetMethod() HttpResource_Method
func (*HttpResource) GetUrl ¶
func (x *HttpResource) GetUrl() string
func (*HttpResource) ProtoMessage ¶
func (*HttpResource) ProtoMessage()
func (*HttpResource) ProtoReflect ¶
func (x *HttpResource) ProtoReflect() protoreflect.Message
func (*HttpResource) Reset ¶
func (x *HttpResource) Reset()
func (*HttpResource) String ¶
func (x *HttpResource) String() string
type HttpResource_Header ¶
type HttpResource_Header struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
A single header value.
func (*HttpResource_Header) Descriptor
deprecated
func (*HttpResource_Header) Descriptor() ([]byte, []int)
Deprecated: Use HttpResource_Header.ProtoReflect.Descriptor instead.
func (*HttpResource_Header) GetName ¶
func (x *HttpResource_Header) GetName() string
func (*HttpResource_Header) GetValue ¶
func (x *HttpResource_Header) GetValue() string
func (*HttpResource_Header) ProtoMessage ¶
func (*HttpResource_Header) ProtoMessage()
func (*HttpResource_Header) ProtoReflect ¶
func (x *HttpResource_Header) ProtoReflect() protoreflect.Message
func (*HttpResource_Header) Reset ¶
func (x *HttpResource_Header) Reset()
func (*HttpResource_Header) String ¶
func (x *HttpResource_Header) String() string
type HttpResource_Method ¶
type HttpResource_Method int32
The HTTP method to use.
const ( HttpResource_METHOD_INVALID HttpResource_Method = 0 HttpResource_METHOD_GET HttpResource_Method = 1 HttpResource_METHOD_POST HttpResource_Method = 2 HttpResource_METHOD_PUT HttpResource_Method = 3 )
func (HttpResource_Method) Descriptor ¶
func (HttpResource_Method) Descriptor() protoreflect.EnumDescriptor
func (HttpResource_Method) Enum ¶
func (x HttpResource_Method) Enum() *HttpResource_Method
func (HttpResource_Method) EnumDescriptor
deprecated
func (HttpResource_Method) EnumDescriptor() ([]byte, []int)
Deprecated: Use HttpResource_Method.Descriptor instead.
func (HttpResource_Method) Number ¶
func (x HttpResource_Method) Number() protoreflect.EnumNumber
func (HttpResource_Method) String ¶
func (x HttpResource_Method) String() string
func (HttpResource_Method) Type ¶
func (HttpResource_Method) Type() protoreflect.EnumType
type Operation ¶
type Operation struct { // The id of the operation. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // The reference id of the operation, if given. Reference string `protobuf:"bytes,2,opt,name=reference,proto3" json:"reference,omitempty"` // The current status of the operation. Status Operation_Status `protobuf:"varint,3,opt,name=status,proto3,enum=speechly.slu.v1.Operation_Status" json:"status,omitempty"` // The language code of the detected language. LanguageCode string `protobuf:"bytes,4,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"` // The application context for the operation. AppId string `protobuf:"bytes,5,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"` // The device or microphone id for the audio, if applicable. DeviceId string `protobuf:"bytes,6,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"` // If the operation status is STATUS_DONE and the destination is not set, // the results of the operation. Transcripts []*Transcript `protobuf:"bytes,7,rep,name=transcripts,proto3" json:"transcripts,omitempty"` // Contains a description of the error if the operation status is // STATUS_ERROR. Error string `protobuf:"bytes,8,opt,name=error,proto3" json:"error,omitempty"` // The duration of the audio. Duration *durationpb.Duration `protobuf:"bytes,9,opt,name=duration,proto3" json:"duration,omitempty"` // contains filtered or unexported fields }
Describes a single batch operation.
func (*Operation) Descriptor
deprecated
func (*Operation) GetDeviceId ¶
func (*Operation) GetDuration ¶
func (x *Operation) GetDuration() *durationpb.Duration
func (*Operation) GetLanguageCode ¶
func (*Operation) GetReference ¶
func (*Operation) GetStatus ¶
func (x *Operation) GetStatus() Operation_Status
func (*Operation) GetTranscripts ¶
func (x *Operation) GetTranscripts() []*Transcript
func (*Operation) ProtoMessage ¶
func (*Operation) ProtoMessage()
func (*Operation) ProtoReflect ¶
func (x *Operation) ProtoReflect() protoreflect.Message
type Operation_Status ¶
type Operation_Status int32
The status of the operation.
const ( // Default status is empty. Operation_STATUS_INVALID Operation_Status = 0 // The operation is queued for processing. Operation_STATUS_QUEUED Operation_Status = 1 // Audio is being decoded. Operation_STATUS_PROCESSING Operation_Status = 2 // The operation is ready and transcript is available. Operation_STATUS_DONE Operation_Status = 3 // The processing failed. Error reason is available. Operation_STATUS_ERROR Operation_Status = 4 // Audio is being analysed, eg. language is detected. Operation_STATUS_ANALYSING Operation_Status = 5 // Audio has been analysed, the operation is waiting for a free decoder. Operation_STATUS_WAITING_DECODER Operation_Status = 6 )
func (Operation_Status) Descriptor ¶
func (Operation_Status) Descriptor() protoreflect.EnumDescriptor
func (Operation_Status) Enum ¶
func (x Operation_Status) Enum() *Operation_Status
func (Operation_Status) EnumDescriptor
deprecated
func (Operation_Status) EnumDescriptor() ([]byte, []int)
Deprecated: Use Operation_Status.Descriptor instead.
func (Operation_Status) Number ¶
func (x Operation_Status) Number() protoreflect.EnumNumber
func (Operation_Status) String ¶
func (x Operation_Status) String() string
func (Operation_Status) Type ¶
func (Operation_Status) Type() protoreflect.EnumType
type Option ¶
type Option struct { // The key of the option to be set. Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // The values to set the option to. Value []string `protobuf:"bytes,2,rep,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
Option to change the default behaviour of the SLU.
func (*Option) Descriptor
deprecated
func (*Option) ProtoMessage ¶
func (*Option) ProtoMessage()
func (*Option) ProtoReflect ¶
func (x *Option) ProtoReflect() protoreflect.Message
type ProcessAudioRequest ¶
type ProcessAudioRequest struct { // The processing context, Speechly application ID. // Required. AppId string `protobuf:"bytes,1,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"` // The device ID of the audio source, for example a microphone // identifier as UUID. // Optional. DeviceId string `protobuf:"bytes,8,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"` // Audio configuration. // Required. Config *AudioConfiguration `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"` // The data (audio) source for the operation. // Required. // // Types that are assignable to Source: // // *ProcessAudioRequest_Audio // *ProcessAudioRequest_Uri // *ProcessAudioRequest_HttpSource Source isProcessAudioRequest_Source `protobuf_oneof:"source"` // The target for the results of the operation. If not given, the results // must be fetched using `QueryStatus`. // Optional. // // Types that are assignable to Destination: // // *ProcessAudioRequest_ResultsUri // *ProcessAudioRequest_HttpResult Destination isProcessAudioRequest_Destination `protobuf_oneof:"destination"` // Reference id for the operation. For example an identifier of the source // system. // Optional. Reference string `protobuf:"bytes,6,opt,name=reference,proto3" json:"reference,omitempty"` // Additional operation specific options. // Optional. Options []*Option `protobuf:"bytes,7,rep,name=options,proto3" json:"options,omitempty"` // contains filtered or unexported fields }
If sending a stream of `ProcessAudioRequest` messages, the first one must contain the `AudioConfiguration` for the audio data. The `config` is ignored in the following messages.
func (*ProcessAudioRequest) Descriptor
deprecated
func (*ProcessAudioRequest) Descriptor() ([]byte, []int)
Deprecated: Use ProcessAudioRequest.ProtoReflect.Descriptor instead.
func (*ProcessAudioRequest) GetAppId ¶
func (x *ProcessAudioRequest) GetAppId() string
func (*ProcessAudioRequest) GetAudio ¶
func (x *ProcessAudioRequest) GetAudio() []byte
func (*ProcessAudioRequest) GetConfig ¶
func (x *ProcessAudioRequest) GetConfig() *AudioConfiguration
func (*ProcessAudioRequest) GetDestination ¶
func (m *ProcessAudioRequest) GetDestination() isProcessAudioRequest_Destination
func (*ProcessAudioRequest) GetDeviceId ¶
func (x *ProcessAudioRequest) GetDeviceId() string
func (*ProcessAudioRequest) GetHttpResult ¶
func (x *ProcessAudioRequest) GetHttpResult() *HttpResource
func (*ProcessAudioRequest) GetHttpSource ¶
func (x *ProcessAudioRequest) GetHttpSource() *HttpResource
func (*ProcessAudioRequest) GetOptions ¶
func (x *ProcessAudioRequest) GetOptions() []*Option
func (*ProcessAudioRequest) GetReference ¶
func (x *ProcessAudioRequest) GetReference() string
func (*ProcessAudioRequest) GetResultsUri ¶
func (x *ProcessAudioRequest) GetResultsUri() string
func (*ProcessAudioRequest) GetSource ¶
func (m *ProcessAudioRequest) GetSource() isProcessAudioRequest_Source
func (*ProcessAudioRequest) GetUri ¶
func (x *ProcessAudioRequest) GetUri() string
func (*ProcessAudioRequest) ProtoMessage ¶
func (*ProcessAudioRequest) ProtoMessage()
func (*ProcessAudioRequest) ProtoReflect ¶
func (x *ProcessAudioRequest) ProtoReflect() protoreflect.Message
func (*ProcessAudioRequest) Reset ¶
func (x *ProcessAudioRequest) Reset()
func (*ProcessAudioRequest) String ¶
func (x *ProcessAudioRequest) String() string
type ProcessAudioRequest_Audio ¶
type ProcessAudioRequest_Audio struct { // Raw audio data. Audio []byte `protobuf:"bytes,3,opt,name=audio,proto3,oneof"` }
type ProcessAudioRequest_HttpResult ¶
type ProcessAudioRequest_HttpResult struct { // A more fine-grained result target, supporting HTTP method and HTTP headers. // The payload will be `Operation` as JSON. HttpResult *HttpResource `protobuf:"bytes,10,opt,name=http_result,json=httpResult,proto3,oneof"` }
type ProcessAudioRequest_HttpSource ¶
type ProcessAudioRequest_HttpSource struct { // Detailed HTTP source data. HttpSource *HttpResource `protobuf:"bytes,9,opt,name=http_source,json=httpSource,proto3,oneof"` }
type ProcessAudioRequest_ResultsUri ¶
type ProcessAudioRequest_ResultsUri struct { // Basic HTTP POST destination. // The payload will be `Operation` as JSON. ResultsUri string `protobuf:"bytes,5,opt,name=results_uri,json=resultsUri,proto3,oneof"` }
type ProcessAudioRequest_Uri ¶
type ProcessAudioRequest_Uri struct { // URI of audio data. Can be http or GCS. Uri string `protobuf:"bytes,4,opt,name=uri,proto3,oneof"` }
type ProcessAudioResponse ¶
type ProcessAudioResponse struct { // The details of the created operation. Operation *Operation `protobuf:"bytes,1,opt,name=operation,proto3" json:"operation,omitempty"` // contains filtered or unexported fields }
func (*ProcessAudioResponse) Descriptor
deprecated
func (*ProcessAudioResponse) Descriptor() ([]byte, []int)
Deprecated: Use ProcessAudioResponse.ProtoReflect.Descriptor instead.
func (*ProcessAudioResponse) GetOperation ¶
func (x *ProcessAudioResponse) GetOperation() *Operation
func (*ProcessAudioResponse) ProtoMessage ¶
func (*ProcessAudioResponse) ProtoMessage()
func (*ProcessAudioResponse) ProtoReflect ¶
func (x *ProcessAudioResponse) ProtoReflect() protoreflect.Message
func (*ProcessAudioResponse) Reset ¶
func (x *ProcessAudioResponse) Reset()
func (*ProcessAudioResponse) String ¶
func (x *ProcessAudioResponse) String() string
type QueryStatusRequest ¶
type QueryStatusRequest struct { // ID of an audio processing operation. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Reference ID of an operation. Reference string `protobuf:"bytes,2,opt,name=reference,proto3" json:"reference,omitempty"` // contains filtered or unexported fields }
Query the status of an operation. Either `id` or `reference` must be given.
func (*QueryStatusRequest) Descriptor
deprecated
func (*QueryStatusRequest) Descriptor() ([]byte, []int)
Deprecated: Use QueryStatusRequest.ProtoReflect.Descriptor instead.
func (*QueryStatusRequest) GetId ¶
func (x *QueryStatusRequest) GetId() string
func (*QueryStatusRequest) GetReference ¶
func (x *QueryStatusRequest) GetReference() string
func (*QueryStatusRequest) ProtoMessage ¶
func (*QueryStatusRequest) ProtoMessage()
func (*QueryStatusRequest) ProtoReflect ¶
func (x *QueryStatusRequest) ProtoReflect() protoreflect.Message
func (*QueryStatusRequest) Reset ¶
func (x *QueryStatusRequest) Reset()
func (*QueryStatusRequest) String ¶
func (x *QueryStatusRequest) String() string
type QueryStatusResponse ¶
type QueryStatusResponse struct { // The details of the audio processing operation. Operation *Operation `protobuf:"bytes,1,opt,name=operation,proto3" json:"operation,omitempty"` // contains filtered or unexported fields }
func (*QueryStatusResponse) Descriptor
deprecated
func (*QueryStatusResponse) Descriptor() ([]byte, []int)
Deprecated: Use QueryStatusResponse.ProtoReflect.Descriptor instead.
func (*QueryStatusResponse) GetOperation ¶
func (x *QueryStatusResponse) GetOperation() *Operation
func (*QueryStatusResponse) ProtoMessage ¶
func (*QueryStatusResponse) ProtoMessage()
func (*QueryStatusResponse) ProtoReflect ¶
func (x *QueryStatusResponse) ProtoReflect() protoreflect.Message
func (*QueryStatusResponse) Reset ¶
func (x *QueryStatusResponse) Reset()
func (*QueryStatusResponse) String ¶
func (x *QueryStatusResponse) String() string
type RoundTripMeasurementRequest ¶
type RoundTripMeasurementRequest struct { // Measurement id. Multiple measurements can be sent during one connection, so the response should contain // the same `id` as in the request. Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
Network latency measurement request. Sent from the server to measure the time it takes for the client to receive a message and the server to receive the client's response. Also known as RTT.
func (*RoundTripMeasurementRequest) Descriptor
deprecated
func (*RoundTripMeasurementRequest) Descriptor() ([]byte, []int)
Deprecated: Use RoundTripMeasurementRequest.ProtoReflect.Descriptor instead.
func (*RoundTripMeasurementRequest) GetId ¶
func (x *RoundTripMeasurementRequest) GetId() int32
func (*RoundTripMeasurementRequest) ProtoMessage ¶
func (*RoundTripMeasurementRequest) ProtoMessage()
func (*RoundTripMeasurementRequest) ProtoReflect ¶
func (x *RoundTripMeasurementRequest) ProtoReflect() protoreflect.Message
func (*RoundTripMeasurementRequest) Reset ¶
func (x *RoundTripMeasurementRequest) Reset()
func (*RoundTripMeasurementRequest) String ¶
func (x *RoundTripMeasurementRequest) String() string
type RoundTripMeasurementResponse ¶
type RoundTripMeasurementResponse struct { // `id` should match the request's id. Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
Response sent from the client immediately after seeing the RoundTripMeasurementRequest.
func (*RoundTripMeasurementResponse) Descriptor
deprecated
func (*RoundTripMeasurementResponse) Descriptor() ([]byte, []int)
Deprecated: Use RoundTripMeasurementResponse.ProtoReflect.Descriptor instead.
func (*RoundTripMeasurementResponse) GetId ¶
func (x *RoundTripMeasurementResponse) GetId() int32
func (*RoundTripMeasurementResponse) ProtoMessage ¶
func (*RoundTripMeasurementResponse) ProtoMessage()
func (*RoundTripMeasurementResponse) ProtoReflect ¶
func (x *RoundTripMeasurementResponse) ProtoReflect() protoreflect.Message
func (*RoundTripMeasurementResponse) Reset ¶
func (x *RoundTripMeasurementResponse) Reset()
func (*RoundTripMeasurementResponse) String ¶
func (x *RoundTripMeasurementResponse) String() string
type SLUClient ¶
type SLUClient interface { // Performs bidirectional streaming speech recognition: receive results while sending audio. // // First request MUST be an SLUConfig message with the configuration that describes the audio format being sent. // // This RPC can handle multiple logical audio segments with the use of `SLUEvent_START` and `SLUEvent_STOP` messages, // which are used to indicate the beginning and the end of a segment. // // A typical call timeline will look like this: // // 1. Client starts the RPC. // 2. Client sends `SLUConfig` message with audio configuration. // 3. Client sends `SLUEvent.START`. // 4. Client sends audio and receives responses from the server. // 5. Client sends `SLUEvent.STOP`. // 6. Client sends `SLUEvent.START`. // 7. Client sends audio and receives responses from the server. // 8. Client sends `SLUEvent.STOP`. // 9. Client closes the stream and receives responses from the server until EOF is received. // // NB: the client does not have to wait until the server acknowledges the start / stop events, // this is done asynchronously. The client can deduplicate responses based on the audio context ID, // which will be present in every response message. Stream(ctx context.Context, opts ...grpc.CallOption) (SLU_StreamClient, error) }
SLUClient is the client API for SLU 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.
func NewSLUClient ¶
func NewSLUClient(cc grpc.ClientConnInterface) SLUClient
type SLUConfig ¶
type SLUConfig struct { // The encoding of the audio data sent in the stream. // Required. Encoding SLUConfig_Encoding `protobuf:"varint,1,opt,name=encoding,proto3,enum=speechly.slu.v1.SLUConfig_Encoding" json:"encoding,omitempty"` // The number of channels in the input audio data. // Required. Channels int32 `protobuf:"varint,2,opt,name=channels,proto3" json:"channels,omitempty"` // Sample rate in Hertz of the audio data sent in the stream. // Required. SampleRateHertz int32 `protobuf:"varint,3,opt,name=sample_rate_hertz,json=sampleRateHertz,proto3" json:"sample_rate_hertz,omitempty"` // The language of the audio sent in the stream as a BCP-47 language tag (e.g. "en-US"). // Defaults to the target application language. LanguageCode string `protobuf:"bytes,4,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"` // Special options to change the default behaviour of the SLU for all logical audio segment. Options []*SLUConfig_Option `protobuf:"bytes,5,rep,name=options,proto3" json:"options,omitempty"` // contains filtered or unexported fields }
Describes the configuration of the audio sent by the client. Currently the API only supports single-channel Linear PCM with sample rate of 16 kHz.
func (*SLUConfig) Descriptor
deprecated
func (*SLUConfig) GetChannels ¶
func (*SLUConfig) GetEncoding ¶
func (x *SLUConfig) GetEncoding() SLUConfig_Encoding
func (*SLUConfig) GetLanguageCode ¶
func (*SLUConfig) GetOptions ¶
func (x *SLUConfig) GetOptions() []*SLUConfig_Option
func (*SLUConfig) GetSampleRateHertz ¶
func (*SLUConfig) ProtoMessage ¶
func (*SLUConfig) ProtoMessage()
func (*SLUConfig) ProtoReflect ¶
func (x *SLUConfig) ProtoReflect() protoreflect.Message
type SLUConfig_Encoding ¶
type SLUConfig_Encoding int32
The encoding of the audio data sent in the stream.
const ( // Uncompressed 16-bit signed little-endian samples (Linear PCM). SLUConfig_LINEAR16 SLUConfig_Encoding = 0 )
func (SLUConfig_Encoding) Descriptor ¶
func (SLUConfig_Encoding) Descriptor() protoreflect.EnumDescriptor
func (SLUConfig_Encoding) Enum ¶
func (x SLUConfig_Encoding) Enum() *SLUConfig_Encoding
func (SLUConfig_Encoding) EnumDescriptor
deprecated
func (SLUConfig_Encoding) EnumDescriptor() ([]byte, []int)
Deprecated: Use SLUConfig_Encoding.Descriptor instead.
func (SLUConfig_Encoding) Number ¶
func (x SLUConfig_Encoding) Number() protoreflect.EnumNumber
func (SLUConfig_Encoding) String ¶
func (x SLUConfig_Encoding) String() string
func (SLUConfig_Encoding) Type ¶
func (SLUConfig_Encoding) Type() protoreflect.EnumType
type SLUConfig_Option ¶
type SLUConfig_Option struct { // The key of the option to be set. Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // The values to set the option to. Value []string `protobuf:"bytes,2,rep,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
Option to change the default behaviour of the SLU.
func (*SLUConfig_Option) Descriptor
deprecated
func (*SLUConfig_Option) Descriptor() ([]byte, []int)
Deprecated: Use SLUConfig_Option.ProtoReflect.Descriptor instead.
func (*SLUConfig_Option) GetKey ¶
func (x *SLUConfig_Option) GetKey() string
func (*SLUConfig_Option) GetValue ¶
func (x *SLUConfig_Option) GetValue() []string
func (*SLUConfig_Option) ProtoMessage ¶
func (*SLUConfig_Option) ProtoMessage()
func (*SLUConfig_Option) ProtoReflect ¶
func (x *SLUConfig_Option) ProtoReflect() protoreflect.Message
func (*SLUConfig_Option) Reset ¶
func (x *SLUConfig_Option) Reset()
func (*SLUConfig_Option) String ¶
func (x *SLUConfig_Option) String() string
type SLUEntity ¶
type SLUEntity struct { // The type of the entity, e.g. `restaurant_type` or `date`. Entity string `protobuf:"bytes,1,opt,name=entity,proto3" json:"entity,omitempty"` // The value of the entity, e.g. `burger restaurant` or `tomorrow`. Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` // The starting index of the entity in the phrase, maps to the `index` field in `SLUTranscript`. // Inclusive. StartPosition int32 `protobuf:"varint,3,opt,name=start_position,json=startPosition,proto3" json:"start_position,omitempty"` // The finishing index of the entity in the phrase, maps to the `index` field in `SLUTranscript`. // Exclusive. EndPosition int32 `protobuf:"varint,4,opt,name=end_position,json=endPosition,proto3" json:"end_position,omitempty"` // contains filtered or unexported fields }
Describes an SLU entity.
An entity is a specific object in the phrase that falls into some kind of category, e.g. in a SAL example `*book book a [burger restaurant](restaurant_type) for [tomorrow](date)` "burger restaurant" would be an entity of type `restaurant_type`, and "tomorrow" would be an entity of type `date`.
An entity has a start and end indices which map to the indices of words in SLUTranscript messages, e.g. in the example `*book book a [burger restaurant](restaurant_type) for [tomorrow](date)` it would be:
- Entity "burger restaurant" - `start_position = 2, end_position = 3` - Entity "tomorrow" - `start_position = 5, end_position = 5`
The start index is inclusive, but the end index is exclusive, i.e. the interval is `[start_position, end_position)`.
func (*SLUEntity) Descriptor
deprecated
func (*SLUEntity) GetEndPosition ¶
func (*SLUEntity) GetStartPosition ¶
func (*SLUEntity) ProtoMessage ¶
func (*SLUEntity) ProtoMessage()
func (*SLUEntity) ProtoReflect ¶
func (x *SLUEntity) ProtoReflect() protoreflect.Message
type SLUError ¶
type SLUError struct { // Error code (refer to documentation for specific codes). Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` // Error message. Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
Describes the error that happened when processing an audio context. DEPRECATED: Will not be returned. Any errors are returned as gRCP status codes with detail messages.
func (*SLUError) Descriptor
deprecated
func (*SLUError) GetMessage ¶
func (*SLUError) ProtoMessage ¶
func (*SLUError) ProtoMessage()
func (*SLUError) ProtoReflect ¶
func (x *SLUError) ProtoReflect() protoreflect.Message
type SLUEvent ¶
type SLUEvent struct { // The event type being sent. Required. Event SLUEvent_Event `protobuf:"varint,1,opt,name=event,proto3,enum=speechly.slu.v1.SLUEvent_Event" json:"event,omitempty"` // The `appId` for the utterance. // Required in the `START` event if the authorization token is *project based*. The // given application must be part of the project set in the token. // Not required if the authorization token is *application based*. AppId string `protobuf:"bytes,2,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"` // contains filtered or unexported fields }
Indicates the beginning and the end of a logical audio segment (audio context in Speechly terms).
func (*SLUEvent) Descriptor
deprecated
func (*SLUEvent) GetEvent ¶
func (x *SLUEvent) GetEvent() SLUEvent_Event
func (*SLUEvent) ProtoMessage ¶
func (*SLUEvent) ProtoMessage()
func (*SLUEvent) ProtoReflect ¶
func (x *SLUEvent) ProtoReflect() protoreflect.Message
type SLUEvent_Event ¶
type SLUEvent_Event int32
The event type value.
const ( // START indicates the beginning of the audio context. Must be sent before sending audio data. SLUEvent_START SLUEvent_Event = 0 // STOP indicates the end of the audio context. Must be sent after sending last chunk of audio in that segment. SLUEvent_STOP SLUEvent_Event = 1 )
func (SLUEvent_Event) Descriptor ¶
func (SLUEvent_Event) Descriptor() protoreflect.EnumDescriptor
func (SLUEvent_Event) Enum ¶
func (x SLUEvent_Event) Enum() *SLUEvent_Event
func (SLUEvent_Event) EnumDescriptor
deprecated
func (SLUEvent_Event) EnumDescriptor() ([]byte, []int)
Deprecated: Use SLUEvent_Event.Descriptor instead.
func (SLUEvent_Event) Number ¶
func (x SLUEvent_Event) Number() protoreflect.EnumNumber
func (SLUEvent_Event) String ¶
func (x SLUEvent_Event) String() string
func (SLUEvent_Event) Type ¶
func (SLUEvent_Event) Type() protoreflect.EnumType
type SLUFinished ¶
type SLUFinished struct { // DEPRECATED // An error which has happened when processing the context, if any. Error *SLUError `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` // contains filtered or unexported fields }
Indicates that the API has stopped processing current audio context. It guarantees that no new messages for that context will be sent by the server.
func (*SLUFinished) Descriptor
deprecated
func (*SLUFinished) Descriptor() ([]byte, []int)
Deprecated: Use SLUFinished.ProtoReflect.Descriptor instead.
func (*SLUFinished) GetError ¶
func (x *SLUFinished) GetError() *SLUError
func (*SLUFinished) ProtoMessage ¶
func (*SLUFinished) ProtoMessage()
func (*SLUFinished) ProtoReflect ¶
func (x *SLUFinished) ProtoReflect() protoreflect.Message
func (*SLUFinished) Reset ¶
func (x *SLUFinished) Reset()
func (*SLUFinished) String ¶
func (x *SLUFinished) String() string
type SLUIntent ¶
type SLUIntent struct { // The value of the intent, as defined in SAL. Intent string `protobuf:"bytes,1,opt,name=intent,proto3" json:"intent,omitempty"` // contains filtered or unexported fields }
Describes an SLU intent. There can be only one intent per SLU segment.
func (*SLUIntent) Descriptor
deprecated
func (*SLUIntent) ProtoMessage ¶
func (*SLUIntent) ProtoMessage()
func (*SLUIntent) ProtoReflect ¶
func (x *SLUIntent) ProtoReflect() protoreflect.Message
type SLURequest ¶
type SLURequest struct { // Types that are assignable to StreamingRequest: // // *SLURequest_Config // *SLURequest_Event // *SLURequest_Audio // *SLURequest_RttResponse // *SLURequest_Start // *SLURequest_Stop StreamingRequest isSLURequest_StreamingRequest `protobuf_oneof:"streaming_request"` // contains filtered or unexported fields }
Top-level message sent by the client for the `Stream` method.
func (*SLURequest) Descriptor
deprecated
func (*SLURequest) Descriptor() ([]byte, []int)
Deprecated: Use SLURequest.ProtoReflect.Descriptor instead.
func (*SLURequest) GetAudio ¶
func (x *SLURequest) GetAudio() []byte
func (*SLURequest) GetConfig ¶
func (x *SLURequest) GetConfig() *SLUConfig
func (*SLURequest) GetEvent
deprecated
func (x *SLURequest) GetEvent() *SLUEvent
Deprecated: Marked as deprecated in speechly/slu/v1/slu.proto.
func (*SLURequest) GetRttResponse ¶
func (x *SLURequest) GetRttResponse() *RoundTripMeasurementResponse
func (*SLURequest) GetStart ¶
func (x *SLURequest) GetStart() *SLUStart
func (*SLURequest) GetStop ¶
func (x *SLURequest) GetStop() *SLUStop
func (*SLURequest) GetStreamingRequest ¶
func (m *SLURequest) GetStreamingRequest() isSLURequest_StreamingRequest
func (*SLURequest) ProtoMessage ¶
func (*SLURequest) ProtoMessage()
func (*SLURequest) ProtoReflect ¶
func (x *SLURequest) ProtoReflect() protoreflect.Message
func (*SLURequest) Reset ¶
func (x *SLURequest) Reset()
func (*SLURequest) String ¶
func (x *SLURequest) String() string
type SLURequest_Audio ¶
type SLURequest_Audio struct { // Contains a chunk of the audio being streamed. Audio []byte `protobuf:"bytes,3,opt,name=audio,proto3,oneof"` }
type SLURequest_Config ¶
type SLURequest_Config struct { // Describes the configuration of the audio sent by the client. // MUST be the first message sent to the stream. Config *SLUConfig `protobuf:"bytes,1,opt,name=config,proto3,oneof"` }
type SLURequest_Event ¶
type SLURequest_Event struct { // Indicates the beginning and the end of a logical audio segment (audio context in Speechly terms). // A context MUST be preceded by a start event and concluded with a stop event, // otherwise the server WILL terminate the stream with an error. // DEPRECATED in favour of SLUStart and SLUStop // // Deprecated: Marked as deprecated in speechly/slu/v1/slu.proto. Event *SLUEvent `protobuf:"bytes,2,opt,name=event,proto3,oneof"` }
type SLURequest_RttResponse ¶
type SLURequest_RttResponse struct { // Response to an RTT measurement request from server. Should be sent immediately // after receiving the RoundTripMeasurementRequest in the stream. // If ignored, no round trip measurements are made. RttResponse *RoundTripMeasurementResponse `protobuf:"bytes,4,opt,name=rtt_response,json=rttResponse,proto3,oneof"` }
type SLURequest_Start ¶
type SLURequest_Start struct { // Indicates the beginning of a logical audio segment (audio context in Speechly terms). // A context MUST be preceded by a SLUStart, (or the deprecated SLUEvent start event) // otherwise the server WILL terminate the stream with an error. Start *SLUStart `protobuf:"bytes,5,opt,name=start,proto3,oneof"` }
type SLURequest_Stop ¶
type SLURequest_Stop struct { // Indicates the end of a logical audio segment (audio context in Speechly terms). // A context MUST be concluded with a SLUStop, (or the deprecated SLUEvent stop event) // otherwise the server WILL terminate the stream with an error. Stop *SLUStop `protobuf:"bytes,6,opt,name=stop,proto3,oneof"` }
type SLUResponse ¶
type SLUResponse struct { // The ID of the audio context that this response belongs to. AudioContext string `protobuf:"bytes,1,opt,name=audio_context,json=audioContext,proto3" json:"audio_context,omitempty"` // The ID of the SLU segment that this response belongs to. // This will be 0 for SLUStarted and SLUFinished responses. SegmentId int32 `protobuf:"varint,2,opt,name=segment_id,json=segmentId,proto3" json:"segment_id,omitempty"` // Response payload. // // Types that are assignable to StreamingResponse: // // *SLUResponse_Transcript // *SLUResponse_Entity // *SLUResponse_Intent // *SLUResponse_SegmentEnd // *SLUResponse_TentativeTranscript // *SLUResponse_TentativeEntities // *SLUResponse_TentativeIntent // *SLUResponse_Started // *SLUResponse_Finished // *SLUResponse_RttRequest StreamingResponse isSLUResponse_StreamingResponse `protobuf_oneof:"streaming_response"` // contains filtered or unexported fields }
Top-level message sent by the server for the `Stream` method.
func (*SLUResponse) Descriptor
deprecated
func (*SLUResponse) Descriptor() ([]byte, []int)
Deprecated: Use SLUResponse.ProtoReflect.Descriptor instead.
func (*SLUResponse) GetAudioContext ¶
func (x *SLUResponse) GetAudioContext() string
func (*SLUResponse) GetEntity ¶
func (x *SLUResponse) GetEntity() *SLUEntity
func (*SLUResponse) GetFinished ¶
func (x *SLUResponse) GetFinished() *SLUFinished
func (*SLUResponse) GetIntent ¶
func (x *SLUResponse) GetIntent() *SLUIntent
func (*SLUResponse) GetRttRequest ¶
func (x *SLUResponse) GetRttRequest() *RoundTripMeasurementRequest
func (*SLUResponse) GetSegmentEnd ¶
func (x *SLUResponse) GetSegmentEnd() *SLUSegmentEnd
func (*SLUResponse) GetSegmentId ¶
func (x *SLUResponse) GetSegmentId() int32
func (*SLUResponse) GetStarted ¶
func (x *SLUResponse) GetStarted() *SLUStarted
func (*SLUResponse) GetStreamingResponse ¶
func (m *SLUResponse) GetStreamingResponse() isSLUResponse_StreamingResponse
func (*SLUResponse) GetTentativeEntities ¶
func (x *SLUResponse) GetTentativeEntities() *SLUTentativeEntities
func (*SLUResponse) GetTentativeIntent ¶
func (x *SLUResponse) GetTentativeIntent() *SLUIntent
func (*SLUResponse) GetTentativeTranscript ¶
func (x *SLUResponse) GetTentativeTranscript() *SLUTentativeTranscript
func (*SLUResponse) GetTranscript ¶
func (x *SLUResponse) GetTranscript() *SLUTranscript
func (*SLUResponse) ProtoMessage ¶
func (*SLUResponse) ProtoMessage()
func (*SLUResponse) ProtoReflect ¶
func (x *SLUResponse) ProtoReflect() protoreflect.Message
func (*SLUResponse) Reset ¶
func (x *SLUResponse) Reset()
func (*SLUResponse) String ¶
func (x *SLUResponse) String() string
type SLUResponse_Entity ¶
type SLUResponse_Entity struct { // Final SLU entity. Entity *SLUEntity `protobuf:"bytes,4,opt,name=entity,proto3,oneof"` }
type SLUResponse_Finished ¶
type SLUResponse_Finished struct { // A special marker message that indicates that the audio context with specified `audio_context` id // has been stopped by the API and no new responses for that context will be sent. // The client is expected to discard any non-finalised segments. // This message is an asynchronous acknowledgement for client-side SLUEvent_STOP message. Finished *SLUFinished `protobuf:"bytes,11,opt,name=finished,proto3,oneof"` }
type SLUResponse_Intent ¶
type SLUResponse_Intent struct { // Final SLU intent. Intent *SLUIntent `protobuf:"bytes,5,opt,name=intent,proto3,oneof"` }
type SLUResponse_RttRequest ¶
type SLUResponse_RttRequest struct { // Initiates a round trip network latency measurement. The response handler should respond to this // message by sending a RoundTripMeasurementResponse in the request stream. // The measurement is stored server side and used to minimise the latency in the future. RttRequest *RoundTripMeasurementRequest `protobuf:"bytes,12,opt,name=rtt_request,json=rttRequest,proto3,oneof"` }
type SLUResponse_SegmentEnd ¶
type SLUResponse_SegmentEnd struct { // A special marker message that indicates that the segment with specified `segment_id` // has been finalised and no new responses belonging to that segment will be sent. // The client is expected to discard any tentative responses in this segment. SegmentEnd *SLUSegmentEnd `protobuf:"bytes,6,opt,name=segment_end,json=segmentEnd,proto3,oneof"` }
type SLUResponse_Started ¶
type SLUResponse_Started struct { // A special marker message that indicates that the audio context with specified `audio_context` id // has been started by the API and all audio data sent by the client will be processed in that context. // This message is an asynchronous acknowledgement for client-side SLUEvent_START message. Started *SLUStarted `protobuf:"bytes,10,opt,name=started,proto3,oneof"` }
type SLUResponse_TentativeEntities ¶
type SLUResponse_TentativeEntities struct { // Tentative SLU entities. TentativeEntities *SLUTentativeEntities `protobuf:"bytes,8,opt,name=tentative_entities,json=tentativeEntities,proto3,oneof"` }
type SLUResponse_TentativeIntent ¶
type SLUResponse_TentativeIntent struct { // Tentative SLU intent. TentativeIntent *SLUIntent `protobuf:"bytes,9,opt,name=tentative_intent,json=tentativeIntent,proto3,oneof"` }
type SLUResponse_TentativeTranscript ¶
type SLUResponse_TentativeTranscript struct { // Tentative SLU transcript. TentativeTranscript *SLUTentativeTranscript `protobuf:"bytes,7,opt,name=tentative_transcript,json=tentativeTranscript,proto3,oneof"` }
type SLUResponse_Transcript ¶
type SLUResponse_Transcript struct { // Final SLU transcript. Transcript *SLUTranscript `protobuf:"bytes,3,opt,name=transcript,proto3,oneof"` }
type SLUSegmentEnd ¶
type SLUSegmentEnd struct {
// contains filtered or unexported fields
}
Indicates the end of the segment. Upon receiving this, the segment should be finalised and all future messages for that segment (if any) discarded.
func (*SLUSegmentEnd) Descriptor
deprecated
func (*SLUSegmentEnd) Descriptor() ([]byte, []int)
Deprecated: Use SLUSegmentEnd.ProtoReflect.Descriptor instead.
func (*SLUSegmentEnd) ProtoMessage ¶
func (*SLUSegmentEnd) ProtoMessage()
func (*SLUSegmentEnd) ProtoReflect ¶
func (x *SLUSegmentEnd) ProtoReflect() protoreflect.Message
func (*SLUSegmentEnd) Reset ¶
func (x *SLUSegmentEnd) Reset()
func (*SLUSegmentEnd) String ¶
func (x *SLUSegmentEnd) String() string
type SLUServer ¶
type SLUServer interface { // Performs bidirectional streaming speech recognition: receive results while sending audio. // // First request MUST be an SLUConfig message with the configuration that describes the audio format being sent. // // This RPC can handle multiple logical audio segments with the use of `SLUEvent_START` and `SLUEvent_STOP` messages, // which are used to indicate the beginning and the end of a segment. // // A typical call timeline will look like this: // // 1. Client starts the RPC. // 2. Client sends `SLUConfig` message with audio configuration. // 3. Client sends `SLUEvent.START`. // 4. Client sends audio and receives responses from the server. // 5. Client sends `SLUEvent.STOP`. // 6. Client sends `SLUEvent.START`. // 7. Client sends audio and receives responses from the server. // 8. Client sends `SLUEvent.STOP`. // 9. Client closes the stream and receives responses from the server until EOF is received. // // NB: the client does not have to wait until the server acknowledges the start / stop events, // this is done asynchronously. The client can deduplicate responses based on the audio context ID, // which will be present in every response message. Stream(SLU_StreamServer) error // contains filtered or unexported methods }
SLUServer is the server API for SLU service. All implementations must embed UnimplementedSLUServer for forward compatibility
type SLUStart ¶
type SLUStart struct { // The `appId` for the utterance. // Required if the authorization token is *project based*. The // given application must be part of the project set in the token. // Not required if the authorization token is *application based*. AppId string `protobuf:"bytes,1,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"` // Special options to change the default behaviour of the SLU for this audio segment. Options []*SLUStart_Option `protobuf:"bytes,2,rep,name=options,proto3" json:"options,omitempty"` // contains filtered or unexported fields }
Indicates the beginning and the end of a logical audio segment (audio context in Speechly terms).
func (*SLUStart) Descriptor
deprecated
func (*SLUStart) GetOptions ¶
func (x *SLUStart) GetOptions() []*SLUStart_Option
func (*SLUStart) ProtoMessage ¶
func (*SLUStart) ProtoMessage()
func (*SLUStart) ProtoReflect ¶
func (x *SLUStart) ProtoReflect() protoreflect.Message
type SLUStart_Option ¶
type SLUStart_Option struct { // The key of the option to be set. Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // The values to set the option to. Value []string `protobuf:"bytes,2,rep,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
Option to change the default behaviour of the SLU.
func (*SLUStart_Option) Descriptor
deprecated
func (*SLUStart_Option) Descriptor() ([]byte, []int)
Deprecated: Use SLUStart_Option.ProtoReflect.Descriptor instead.
func (*SLUStart_Option) GetKey ¶
func (x *SLUStart_Option) GetKey() string
func (*SLUStart_Option) GetValue ¶
func (x *SLUStart_Option) GetValue() []string
func (*SLUStart_Option) ProtoMessage ¶
func (*SLUStart_Option) ProtoMessage()
func (*SLUStart_Option) ProtoReflect ¶
func (x *SLUStart_Option) ProtoReflect() protoreflect.Message
func (*SLUStart_Option) Reset ¶
func (x *SLUStart_Option) Reset()
func (*SLUStart_Option) String ¶
func (x *SLUStart_Option) String() string
type SLUStarted ¶
type SLUStarted struct {
// contains filtered or unexported fields
}
Indicates that the API has started processing the portion of audio as new audio context. This does not guarantee that the server will not send any more messages for the previous audio context.
func (*SLUStarted) Descriptor
deprecated
func (*SLUStarted) Descriptor() ([]byte, []int)
Deprecated: Use SLUStarted.ProtoReflect.Descriptor instead.
func (*SLUStarted) ProtoMessage ¶
func (*SLUStarted) ProtoMessage()
func (*SLUStarted) ProtoReflect ¶
func (x *SLUStarted) ProtoReflect() protoreflect.Message
func (*SLUStarted) Reset ¶
func (x *SLUStarted) Reset()
func (*SLUStarted) String ¶
func (x *SLUStarted) String() string
type SLUStop ¶
type SLUStop struct {
// contains filtered or unexported fields
}
Indicates the end of a logical audio segment (audio context in Speechly terms).
func (*SLUStop) Descriptor
deprecated
func (*SLUStop) ProtoMessage ¶
func (*SLUStop) ProtoMessage()
func (*SLUStop) ProtoReflect ¶
func (x *SLUStop) ProtoReflect() protoreflect.Message
type SLUTentativeEntities ¶
type SLUTentativeEntities struct { // A list of entities, which must be treated as tentative. // // This is not an aggregate of all entities in the audio, // but rather it ONLY contains entities that have not been finalised yet. // // e.g. if at the start there are two tentatively recognised entities - ["burger restaurant", "tomorrow"] // but then the API marks "burger restaurant" as final and recognises a new tentative entity "for two", // this will contain ["tomorrow", "for two"]. TentativeEntities []*SLUEntity `protobuf:"bytes,1,rep,name=tentative_entities,json=tentativeEntities,proto3" json:"tentative_entities,omitempty"` // contains filtered or unexported fields }
Describes tentative entities.
func (*SLUTentativeEntities) Descriptor
deprecated
func (*SLUTentativeEntities) Descriptor() ([]byte, []int)
Deprecated: Use SLUTentativeEntities.ProtoReflect.Descriptor instead.
func (*SLUTentativeEntities) GetTentativeEntities ¶
func (x *SLUTentativeEntities) GetTentativeEntities() []*SLUEntity
func (*SLUTentativeEntities) ProtoMessage ¶
func (*SLUTentativeEntities) ProtoMessage()
func (*SLUTentativeEntities) ProtoReflect ¶
func (x *SLUTentativeEntities) ProtoReflect() protoreflect.Message
func (*SLUTentativeEntities) Reset ¶
func (x *SLUTentativeEntities) Reset()
func (*SLUTentativeEntities) String ¶
func (x *SLUTentativeEntities) String() string
type SLUTentativeTranscript ¶
type SLUTentativeTranscript struct { // Aggregated tentative transcript from the beginning of the audio until current moment in time. // Consecutive transcripts will have this value appended to, // e.g. if in the first message it's "find me", in the next it may be "find me a t-shirt". TentativeTranscript string `protobuf:"bytes,1,opt,name=tentative_transcript,json=tentativeTranscript,proto3" json:"tentative_transcript,omitempty"` // A list of individual words which compose `tentative_transcript`. // All words must be considered tentative. TentativeWords []*SLUTranscript `protobuf:"bytes,2,rep,name=tentative_words,json=tentativeWords,proto3" json:"tentative_words,omitempty"` // contains filtered or unexported fields }
Describes a tentative transcript.
Tentative transcript is an interim recognition result, which may change over time, e.g. a phrase "find me a red t-shirt" can be tentatively recognised as "find me a tea", until the API processes the audio completely.
func (*SLUTentativeTranscript) Descriptor
deprecated
func (*SLUTentativeTranscript) Descriptor() ([]byte, []int)
Deprecated: Use SLUTentativeTranscript.ProtoReflect.Descriptor instead.
func (*SLUTentativeTranscript) GetTentativeTranscript ¶
func (x *SLUTentativeTranscript) GetTentativeTranscript() string
func (*SLUTentativeTranscript) GetTentativeWords ¶
func (x *SLUTentativeTranscript) GetTentativeWords() []*SLUTranscript
func (*SLUTentativeTranscript) ProtoMessage ¶
func (*SLUTentativeTranscript) ProtoMessage()
func (*SLUTentativeTranscript) ProtoReflect ¶
func (x *SLUTentativeTranscript) ProtoReflect() protoreflect.Message
func (*SLUTentativeTranscript) Reset ¶
func (x *SLUTentativeTranscript) Reset()
func (*SLUTentativeTranscript) String ¶
func (x *SLUTentativeTranscript) String() string
type SLUTranscript ¶
type SLUTranscript struct { // The word recongised from the audio. Word string `protobuf:"bytes,1,opt,name=word,proto3" json:"word,omitempty"` // The position of the word in the whole phrase, zero-based. Index int32 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"` // The start time of the word in the audio, in milliseconds from the beginning of the audio. StartTime int32 `protobuf:"varint,3,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` // The end time of the word in the audio, in milliseconds from the beginning of the audio. EndTime int32 `protobuf:"varint,4,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` // contains filtered or unexported fields }
Describes an SLU transcript. A transcript is a speech-to-text element of the phrase, i.e. a word recognised from the audio.
func (*SLUTranscript) Descriptor
deprecated
func (*SLUTranscript) Descriptor() ([]byte, []int)
Deprecated: Use SLUTranscript.ProtoReflect.Descriptor instead.
func (*SLUTranscript) GetEndTime ¶
func (x *SLUTranscript) GetEndTime() int32
func (*SLUTranscript) GetIndex ¶
func (x *SLUTranscript) GetIndex() int32
func (*SLUTranscript) GetStartTime ¶
func (x *SLUTranscript) GetStartTime() int32
func (*SLUTranscript) GetWord ¶
func (x *SLUTranscript) GetWord() string
func (*SLUTranscript) ProtoMessage ¶
func (*SLUTranscript) ProtoMessage()
func (*SLUTranscript) ProtoReflect ¶
func (x *SLUTranscript) ProtoReflect() protoreflect.Message
func (*SLUTranscript) Reset ¶
func (x *SLUTranscript) Reset()
func (*SLUTranscript) String ¶
func (x *SLUTranscript) String() string
type SLU_StreamClient ¶
type SLU_StreamClient interface { Send(*SLURequest) error Recv() (*SLUResponse, error) grpc.ClientStream }
type SLU_StreamServer ¶
type SLU_StreamServer interface { Send(*SLUResponse) error Recv() (*SLURequest, error) grpc.ServerStream }
type TextsRequest ¶
type TextsRequest struct { // The target application for the texts request. // Required. AppId string `protobuf:"bytes,1,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"` // List of WLURequest. // Required. Requests []*WLURequest `protobuf:"bytes,2,rep,name=requests,proto3" json:"requests,omitempty"` // contains filtered or unexported fields }
Top-level message sent by the client for the `Texts` method.
func (*TextsRequest) Descriptor
deprecated
func (*TextsRequest) Descriptor() ([]byte, []int)
Deprecated: Use TextsRequest.ProtoReflect.Descriptor instead.
func (*TextsRequest) GetAppId ¶
func (x *TextsRequest) GetAppId() string
func (*TextsRequest) GetRequests ¶
func (x *TextsRequest) GetRequests() []*WLURequest
func (*TextsRequest) ProtoMessage ¶
func (*TextsRequest) ProtoMessage()
func (*TextsRequest) ProtoReflect ¶
func (x *TextsRequest) ProtoReflect() protoreflect.Message
func (*TextsRequest) Reset ¶
func (x *TextsRequest) Reset()
func (*TextsRequest) String ¶
func (x *TextsRequest) String() string
type TextsResponse ¶
type TextsResponse struct { // List of WLUResponses. // Required. Responses []*WLUResponse `protobuf:"bytes,1,rep,name=responses,proto3" json:"responses,omitempty"` // contains filtered or unexported fields }
Top-level message sent by the server for the `Texts` method.
func (*TextsResponse) Descriptor
deprecated
func (*TextsResponse) Descriptor() ([]byte, []int)
Deprecated: Use TextsResponse.ProtoReflect.Descriptor instead.
func (*TextsResponse) GetResponses ¶
func (x *TextsResponse) GetResponses() []*WLUResponse
func (*TextsResponse) ProtoMessage ¶
func (*TextsResponse) ProtoMessage()
func (*TextsResponse) ProtoReflect ¶
func (x *TextsResponse) ProtoReflect() protoreflect.Message
func (*TextsResponse) Reset ¶
func (x *TextsResponse) Reset()
func (*TextsResponse) String ¶
func (x *TextsResponse) String() string
type Transcript ¶
type Transcript struct { // The word recongised from the audio. Word string `protobuf:"bytes,1,opt,name=word,proto3" json:"word,omitempty"` // The position of the word in the whole phrase, zero-based. Index int32 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"` // The end time of the word in the audio, in milliseconds from the beginning // of the audio. StartTime int32 `protobuf:"varint,3,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` // The end time of the word in the audio, in milliseconds from the beginning // of the audio. EndTime int32 `protobuf:"varint,4,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` // contains filtered or unexported fields }
Describes an SLU transcript. A transcript is a speech-to-text element of the phrase, i.e. a word recognised from the audio.
func (*Transcript) Descriptor
deprecated
func (*Transcript) Descriptor() ([]byte, []int)
Deprecated: Use Transcript.ProtoReflect.Descriptor instead.
func (*Transcript) GetEndTime ¶
func (x *Transcript) GetEndTime() int32
func (*Transcript) GetIndex ¶
func (x *Transcript) GetIndex() int32
func (*Transcript) GetStartTime ¶
func (x *Transcript) GetStartTime() int32
func (*Transcript) GetWord ¶
func (x *Transcript) GetWord() string
func (*Transcript) ProtoMessage ¶
func (*Transcript) ProtoMessage()
func (*Transcript) ProtoReflect ¶
func (x *Transcript) ProtoReflect() protoreflect.Message
func (*Transcript) Reset ¶
func (x *Transcript) Reset()
func (*Transcript) String ¶
func (x *Transcript) String() string
type UnimplementedBatchAPIServer ¶
type UnimplementedBatchAPIServer struct { }
UnimplementedBatchAPIServer must be embedded to have forward compatible implementations.
func (UnimplementedBatchAPIServer) ProcessAudio ¶
func (UnimplementedBatchAPIServer) ProcessAudio(BatchAPI_ProcessAudioServer) error
func (UnimplementedBatchAPIServer) QueryStatus ¶
func (UnimplementedBatchAPIServer) QueryStatus(context.Context, *QueryStatusRequest) (*QueryStatusResponse, error)
type UnimplementedSLUServer ¶
type UnimplementedSLUServer struct { }
UnimplementedSLUServer must be embedded to have forward compatible implementations.
func (UnimplementedSLUServer) Stream ¶
func (UnimplementedSLUServer) Stream(SLU_StreamServer) error
type UnimplementedWLUServer ¶
type UnimplementedWLUServer struct { }
UnimplementedWLUServer must be embedded to have forward compatible implementations.
func (UnimplementedWLUServer) Text ¶
func (UnimplementedWLUServer) Text(context.Context, *WLURequest) (*WLUResponse, error)
func (UnimplementedWLUServer) Texts ¶
func (UnimplementedWLUServer) Texts(context.Context, *TextsRequest) (*TextsResponse, error)
type UnsafeBatchAPIServer ¶
type UnsafeBatchAPIServer interface {
// contains filtered or unexported methods
}
UnsafeBatchAPIServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to BatchAPIServer will result in compilation errors.
type UnsafeSLUServer ¶
type UnsafeSLUServer interface {
// contains filtered or unexported methods
}
UnsafeSLUServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SLUServer will result in compilation errors.
type UnsafeWLUServer ¶
type UnsafeWLUServer interface {
// contains filtered or unexported methods
}
UnsafeWLUServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to WLUServer will result in compilation errors.
type WLUClient ¶
type WLUClient interface { // Performs recognition of a text with specified language. Text(ctx context.Context, in *WLURequest, opts ...grpc.CallOption) (*WLUResponse, error) // Performs recognition of a batch of texts with specified language. Texts(ctx context.Context, in *TextsRequest, opts ...grpc.CallOption) (*TextsResponse, error) }
WLUClient is the client API for WLU 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.
func NewWLUClient ¶
func NewWLUClient(cc grpc.ClientConnInterface) WLUClient
type WLUEntity ¶
type WLUEntity struct { // The type of the entity, e.g. `restaurant_type` or `date`. Entity string `protobuf:"bytes,1,opt,name=entity,proto3" json:"entity,omitempty"` // The value of the entity, e.g. `burger restaurant` or `tomorrow`. Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` // The starting index of the entity in the phrase, maps to the `index` field in `SLUTranscript`. // Inclusive. StartPosition int32 `protobuf:"varint,3,opt,name=start_position,json=startPosition,proto3" json:"start_position,omitempty"` // The finishing index of the entity in the phrase, maps to the `index` field in `SLUTranscript`. // Exclusive. EndPosition int32 `protobuf:"varint,4,opt,name=end_position,json=endPosition,proto3" json:"end_position,omitempty"` // contains filtered or unexported fields }
Describes a single entity in a segment.
An entity is a specific object in the phrase that falls into some kind of category, e.g. in a SAL example `*book book a [burger restaurant](restaurant_type) for [tomorrow](date)` "burger restaurant" would be an entity of type `restaurant_type`, and "tomorrow" would be an entity of type `date`.
An entity has a start and end indices which map to the indices of words in WLUToken messages, e.g. in the example `*book book a [burger restaurant](restaurant_type) for [tomorrow](date)` it would be:
- Entity "burger restaurant" - `start_position = 2, end_position = 3` - Entity "tomorrow" - `start_position = 5, end_position = 5`
The start index is inclusive, but the end index is exclusive, i.e. the interval is `[start_position, end_position)`.
func (*WLUEntity) Descriptor
deprecated
func (*WLUEntity) GetEndPosition ¶
func (*WLUEntity) GetStartPosition ¶
func (*WLUEntity) ProtoMessage ¶
func (*WLUEntity) ProtoMessage()
func (*WLUEntity) ProtoReflect ¶
func (x *WLUEntity) ProtoReflect() protoreflect.Message
type WLUIntent ¶
type WLUIntent struct { // The value of the intent, as defined in SAL. Intent string `protobuf:"bytes,1,opt,name=intent,proto3" json:"intent,omitempty"` // contains filtered or unexported fields }
Describes the intent of a segment. There can only be one intent per segment.
func (*WLUIntent) Descriptor
deprecated
func (*WLUIntent) ProtoMessage ¶
func (*WLUIntent) ProtoMessage()
func (*WLUIntent) ProtoReflect ¶
func (x *WLUIntent) ProtoReflect() protoreflect.Message
type WLURequest ¶
type WLURequest struct { // The language of the text sent in the request as a BCP-47 language tag (e.g. "en-US"). // Required. LanguageCode string `protobuf:"bytes,1,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"` // The text to recognise. // Required. Text string `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"` // The reference time for postprocessing. By default, the current date is used. // Optional. ReferenceTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=reference_time,json=referenceTime,proto3" json:"reference_time,omitempty"` // contains filtered or unexported fields }
Top-level message sent by the client for the `Text` method.
func (*WLURequest) Descriptor
deprecated
func (*WLURequest) Descriptor() ([]byte, []int)
Deprecated: Use WLURequest.ProtoReflect.Descriptor instead.
func (*WLURequest) GetLanguageCode ¶
func (x *WLURequest) GetLanguageCode() string
func (*WLURequest) GetReferenceTime ¶
func (x *WLURequest) GetReferenceTime() *timestamppb.Timestamp
func (*WLURequest) GetText ¶
func (x *WLURequest) GetText() string
func (*WLURequest) ProtoMessage ¶
func (*WLURequest) ProtoMessage()
func (*WLURequest) ProtoReflect ¶
func (x *WLURequest) ProtoReflect() protoreflect.Message
func (*WLURequest) Reset ¶
func (x *WLURequest) Reset()
func (*WLURequest) String ¶
func (x *WLURequest) String() string
type WLUResponse ¶
type WLUResponse struct { // A list of WLU segments. Segments []*WLUSegment `protobuf:"bytes,1,rep,name=segments,proto3" json:"segments,omitempty"` // contains filtered or unexported fields }
Top-level message sent by the server for the `Text` method.
func (*WLUResponse) Descriptor
deprecated
func (*WLUResponse) Descriptor() ([]byte, []int)
Deprecated: Use WLUResponse.ProtoReflect.Descriptor instead.
func (*WLUResponse) GetSegments ¶
func (x *WLUResponse) GetSegments() []*WLUSegment
func (*WLUResponse) ProtoMessage ¶
func (*WLUResponse) ProtoMessage()
func (*WLUResponse) ProtoReflect ¶
func (x *WLUResponse) ProtoReflect() protoreflect.Message
func (*WLUResponse) Reset ¶
func (x *WLUResponse) Reset()
func (*WLUResponse) String ¶
func (x *WLUResponse) String() string
type WLUSegment ¶
type WLUSegment struct { // The portion of text that contains this segment. Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"` // The list of word tokens which are contained in this segment. Tokens []*WLUToken `protobuf:"bytes,2,rep,name=tokens,proto3" json:"tokens,omitempty"` // The list of entities which are contained in this segment. Entities []*WLUEntity `protobuf:"bytes,3,rep,name=entities,proto3" json:"entities,omitempty"` // The intent that defines this segment. Intent *WLUIntent `protobuf:"bytes,4,opt,name=intent,proto3" json:"intent,omitempty"` // The value of text annotated in SAL format. AnnotatedText string `protobuf:"bytes,5,opt,name=annotated_text,json=annotatedText,proto3" json:"annotated_text,omitempty"` // contains filtered or unexported fields }
Describes a WLU segment. A segment is a logical portion of text denoted by its intent, e.g. in a phrase "book me a flight and rent a car" there would be a segment for "book me a flight" and another for "rent a car".
func (*WLUSegment) Descriptor
deprecated
func (*WLUSegment) Descriptor() ([]byte, []int)
Deprecated: Use WLUSegment.ProtoReflect.Descriptor instead.
func (*WLUSegment) GetAnnotatedText ¶
func (x *WLUSegment) GetAnnotatedText() string
func (*WLUSegment) GetEntities ¶
func (x *WLUSegment) GetEntities() []*WLUEntity
func (*WLUSegment) GetIntent ¶
func (x *WLUSegment) GetIntent() *WLUIntent
func (*WLUSegment) GetText ¶
func (x *WLUSegment) GetText() string
func (*WLUSegment) GetTokens ¶
func (x *WLUSegment) GetTokens() []*WLUToken
func (*WLUSegment) ProtoMessage ¶
func (*WLUSegment) ProtoMessage()
func (*WLUSegment) ProtoReflect ¶
func (x *WLUSegment) ProtoReflect() protoreflect.Message
func (*WLUSegment) Reset ¶
func (x *WLUSegment) Reset()
func (*WLUSegment) String ¶
func (x *WLUSegment) String() string
type WLUServer ¶
type WLUServer interface { // Performs recognition of a text with specified language. Text(context.Context, *WLURequest) (*WLUResponse, error) // Performs recognition of a batch of texts with specified language. Texts(context.Context, *TextsRequest) (*TextsResponse, error) // contains filtered or unexported methods }
WLUServer is the server API for WLU service. All implementations must embed UnimplementedWLUServer for forward compatibility
type WLUToken ¶
type WLUToken struct { // The value of the word. Word string `protobuf:"bytes,1,opt,name=word,proto3" json:"word,omitempty"` // Position of the token in the text. Index int32 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"` // contains filtered or unexported fields }
Describes a single word token in a segment.
func (*WLUToken) Descriptor
deprecated
func (*WLUToken) ProtoMessage ¶
func (*WLUToken) ProtoMessage()
func (*WLUToken) ProtoReflect ¶
func (x *WLUToken) ProtoReflect() protoreflect.Message