1 // Code generated by protoc-gen-go. DO NOT EDIT.
2 // source: google/assistant/embedded/v1alpha1/embedded_assistant.proto
5 Package embedded is a generated protocol buffer package.
7 It is generated from these files:
8 google/assistant/embedded/v1alpha1/embedded_assistant.proto
10 It has these top-level messages:
22 import proto "github.com/golang/protobuf/proto"
25 import _ "google.golang.org/genproto/googleapis/api/annotations"
26 import google_rpc "google.golang.org/genproto/googleapis/rpc/status"
29 context "golang.org/x/net/context"
30 grpc "google.golang.org/grpc"
33 // Reference imports to suppress errors if they are not otherwise used.
38 // This is a compile-time assertion to ensure that this generated file
39 // is compatible with the proto package it is being compiled against.
40 // A compilation error at this line likely means your copy of the
41 // proto package needs to be updated.
42 const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
44 // Audio encoding of the data sent in the audio message.
45 // Audio must be one-channel (mono). The only language supported is "en-US".
46 type AudioInConfig_Encoding int32
49 // Not specified. Will return result [google.rpc.Code.INVALID_ARGUMENT][].
50 AudioInConfig_ENCODING_UNSPECIFIED AudioInConfig_Encoding = 0
51 // Uncompressed 16-bit signed little-endian samples (Linear PCM).
52 // This encoding includes no header, only the raw audio bytes.
53 AudioInConfig_LINEAR16 AudioInConfig_Encoding = 1
54 // [`FLAC`](https://xiph.org/flac/documentation.html) (Free Lossless Audio
55 // Codec) is the recommended encoding because it is
56 // lossless--therefore recognition is not compromised--and
57 // requires only about half the bandwidth of `LINEAR16`. This encoding
58 // includes the `FLAC` stream header followed by audio data. It supports
59 // 16-bit and 24-bit samples, however, not all fields in `STREAMINFO` are
61 AudioInConfig_FLAC AudioInConfig_Encoding = 2
64 var AudioInConfig_Encoding_name = map[int32]string{
65 0: "ENCODING_UNSPECIFIED",
69 var AudioInConfig_Encoding_value = map[string]int32{
70 "ENCODING_UNSPECIFIED": 0,
75 func (x AudioInConfig_Encoding) String() string {
76 return proto.EnumName(AudioInConfig_Encoding_name, int32(x))
78 func (AudioInConfig_Encoding) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{1, 0} }
80 // Audio encoding of the data returned in the audio message. All encodings are
81 // raw audio bytes with no header, except as indicated below.
82 type AudioOutConfig_Encoding int32
85 // Not specified. Will return result [google.rpc.Code.INVALID_ARGUMENT][].
86 AudioOutConfig_ENCODING_UNSPECIFIED AudioOutConfig_Encoding = 0
87 // Uncompressed 16-bit signed little-endian samples (Linear PCM).
88 AudioOutConfig_LINEAR16 AudioOutConfig_Encoding = 1
89 // MP3 audio encoding. The sample rate is encoded in the payload.
90 AudioOutConfig_MP3 AudioOutConfig_Encoding = 2
91 // Opus-encoded audio wrapped in an ogg container. The result will be a
92 // file which can be played natively on Android and in some browsers (such
93 // as Chrome). The quality of the encoding is considerably higher than MP3
94 // while using the same bitrate. The sample rate is encoded in the payload.
95 AudioOutConfig_OPUS_IN_OGG AudioOutConfig_Encoding = 3
98 var AudioOutConfig_Encoding_name = map[int32]string{
99 0: "ENCODING_UNSPECIFIED",
104 var AudioOutConfig_Encoding_value = map[string]int32{
105 "ENCODING_UNSPECIFIED": 0,
111 func (x AudioOutConfig_Encoding) String() string {
112 return proto.EnumName(AudioOutConfig_Encoding_name, int32(x))
114 func (AudioOutConfig_Encoding) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{2, 0} }
116 // Possible states of the microphone after a `Converse` RPC completes.
117 type ConverseResult_MicrophoneMode int32
120 // No mode specified.
121 ConverseResult_MICROPHONE_MODE_UNSPECIFIED ConverseResult_MicrophoneMode = 0
122 // The service is not expecting a follow-on question from the user.
123 // The microphone should remain off until the user re-activates it.
124 ConverseResult_CLOSE_MICROPHONE ConverseResult_MicrophoneMode = 1
125 // The service is expecting a follow-on question from the user. The
126 // microphone should be re-opened when the `AudioOut` playback completes
127 // (by starting a new `Converse` RPC call to send the new audio).
128 ConverseResult_DIALOG_FOLLOW_ON ConverseResult_MicrophoneMode = 2
131 var ConverseResult_MicrophoneMode_name = map[int32]string{
132 0: "MICROPHONE_MODE_UNSPECIFIED",
133 1: "CLOSE_MICROPHONE",
134 2: "DIALOG_FOLLOW_ON",
136 var ConverseResult_MicrophoneMode_value = map[string]int32{
137 "MICROPHONE_MODE_UNSPECIFIED": 0,
138 "CLOSE_MICROPHONE": 1,
139 "DIALOG_FOLLOW_ON": 2,
142 func (x ConverseResult_MicrophoneMode) String() string {
143 return proto.EnumName(ConverseResult_MicrophoneMode_name, int32(x))
145 func (ConverseResult_MicrophoneMode) EnumDescriptor() ([]byte, []int) {
146 return fileDescriptor0, []int{5, 0}
149 // Indicates the type of event.
150 type ConverseResponse_EventType int32
153 // No event specified.
154 ConverseResponse_EVENT_TYPE_UNSPECIFIED ConverseResponse_EventType = 0
155 // This event indicates that the server has detected the end of the user's
156 // speech utterance and expects no additional speech. Therefore, the server
157 // will not process additional audio (although it may subsequently return
158 // additional results). The client should stop sending additional audio
159 // data, half-close the gRPC connection, and wait for any additional results
160 // until the server closes the gRPC connection.
161 ConverseResponse_END_OF_UTTERANCE ConverseResponse_EventType = 1
164 var ConverseResponse_EventType_name = map[int32]string{
165 0: "EVENT_TYPE_UNSPECIFIED",
166 1: "END_OF_UTTERANCE",
168 var ConverseResponse_EventType_value = map[string]int32{
169 "EVENT_TYPE_UNSPECIFIED": 0,
170 "END_OF_UTTERANCE": 1,
173 func (x ConverseResponse_EventType) String() string {
174 return proto.EnumName(ConverseResponse_EventType_name, int32(x))
176 func (ConverseResponse_EventType) EnumDescriptor() ([]byte, []int) {
177 return fileDescriptor0, []int{7, 0}
180 // Specifies how to process the `ConverseRequest` messages.
181 type ConverseConfig struct {
182 // *Required* Specifies how to process the subsequent incoming audio.
183 AudioInConfig *AudioInConfig `protobuf:"bytes,1,opt,name=audio_in_config,json=audioInConfig" json:"audio_in_config,omitempty"`
184 // *Required* Specifies how to format the audio that will be returned.
185 AudioOutConfig *AudioOutConfig `protobuf:"bytes,2,opt,name=audio_out_config,json=audioOutConfig" json:"audio_out_config,omitempty"`
186 // *Required* Represents the current dialog state.
187 ConverseState *ConverseState `protobuf:"bytes,3,opt,name=converse_state,json=converseState" json:"converse_state,omitempty"`
190 func (m *ConverseConfig) Reset() { *m = ConverseConfig{} }
191 func (m *ConverseConfig) String() string { return proto.CompactTextString(m) }
192 func (*ConverseConfig) ProtoMessage() {}
193 func (*ConverseConfig) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
195 func (m *ConverseConfig) GetAudioInConfig() *AudioInConfig {
197 return m.AudioInConfig
202 func (m *ConverseConfig) GetAudioOutConfig() *AudioOutConfig {
204 return m.AudioOutConfig
209 func (m *ConverseConfig) GetConverseState() *ConverseState {
211 return m.ConverseState
216 // Specifies how to process the `audio_in` data that will be provided in
217 // subsequent requests. For recommended settings, see the Google Assistant SDK
218 // [best practices](https://developers.google.com/assistant/sdk/develop/grpc/best-practices/audio).
219 type AudioInConfig struct {
220 // *Required* Encoding of audio data sent in all `audio_in` messages.
221 Encoding AudioInConfig_Encoding `protobuf:"varint,1,opt,name=encoding,enum=google.assistant.embedded.v1alpha1.AudioInConfig_Encoding" json:"encoding,omitempty"`
222 // *Required* Sample rate (in Hertz) of the audio data sent in all `audio_in`
223 // messages. Valid values are from 16000-24000, but 16000 is optimal.
224 // For best results, set the sampling rate of the audio source to 16000 Hz.
225 // If that's not possible, use the native sample rate of the audio source
226 // (instead of re-sampling).
227 SampleRateHertz int32 `protobuf:"varint,2,opt,name=sample_rate_hertz,json=sampleRateHertz" json:"sample_rate_hertz,omitempty"`
230 func (m *AudioInConfig) Reset() { *m = AudioInConfig{} }
231 func (m *AudioInConfig) String() string { return proto.CompactTextString(m) }
232 func (*AudioInConfig) ProtoMessage() {}
233 func (*AudioInConfig) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
235 func (m *AudioInConfig) GetEncoding() AudioInConfig_Encoding {
239 return AudioInConfig_ENCODING_UNSPECIFIED
242 func (m *AudioInConfig) GetSampleRateHertz() int32 {
244 return m.SampleRateHertz
249 // Specifies the desired format for the server to use when it returns
250 // `audio_out` messages.
251 type AudioOutConfig struct {
252 // *Required* The encoding of audio data to be returned in all `audio_out`
254 Encoding AudioOutConfig_Encoding `protobuf:"varint,1,opt,name=encoding,enum=google.assistant.embedded.v1alpha1.AudioOutConfig_Encoding" json:"encoding,omitempty"`
255 // *Required* The sample rate in Hertz of the audio data returned in
256 // `audio_out` messages. Valid values are: 16000-24000.
257 SampleRateHertz int32 `protobuf:"varint,2,opt,name=sample_rate_hertz,json=sampleRateHertz" json:"sample_rate_hertz,omitempty"`
258 // *Required* Current volume setting of the device's audio output.
259 // Valid values are 1 to 100 (corresponding to 1% to 100%).
260 VolumePercentage int32 `protobuf:"varint,3,opt,name=volume_percentage,json=volumePercentage" json:"volume_percentage,omitempty"`
263 func (m *AudioOutConfig) Reset() { *m = AudioOutConfig{} }
264 func (m *AudioOutConfig) String() string { return proto.CompactTextString(m) }
265 func (*AudioOutConfig) ProtoMessage() {}
266 func (*AudioOutConfig) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
268 func (m *AudioOutConfig) GetEncoding() AudioOutConfig_Encoding {
272 return AudioOutConfig_ENCODING_UNSPECIFIED
275 func (m *AudioOutConfig) GetSampleRateHertz() int32 {
277 return m.SampleRateHertz
282 func (m *AudioOutConfig) GetVolumePercentage() int32 {
284 return m.VolumePercentage
289 // Provides information about the current dialog state.
290 type ConverseState struct {
291 // *Required* The `conversation_state` value returned in the prior
292 // `ConverseResponse`. Omit (do not set the field) if there was no prior
293 // `ConverseResponse`. If there was a prior `ConverseResponse`, do not omit
294 // this field; doing so will end that conversation (and this new request will
295 // start a new conversation).
296 ConversationState []byte `protobuf:"bytes,1,opt,name=conversation_state,json=conversationState,proto3" json:"conversation_state,omitempty"`
299 func (m *ConverseState) Reset() { *m = ConverseState{} }
300 func (m *ConverseState) String() string { return proto.CompactTextString(m) }
301 func (*ConverseState) ProtoMessage() {}
302 func (*ConverseState) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
304 func (m *ConverseState) GetConversationState() []byte {
306 return m.ConversationState
311 // The audio containing the assistant's response to the query. Sequential chunks
312 // of audio data are received in sequential `ConverseResponse` messages.
313 type AudioOut struct {
314 // *Output-only* The audio data containing the assistant's response to the
315 // query. Sequential chunks of audio data are received in sequential
316 // `ConverseResponse` messages.
317 AudioData []byte `protobuf:"bytes,1,opt,name=audio_data,json=audioData,proto3" json:"audio_data,omitempty"`
320 func (m *AudioOut) Reset() { *m = AudioOut{} }
321 func (m *AudioOut) String() string { return proto.CompactTextString(m) }
322 func (*AudioOut) ProtoMessage() {}
323 func (*AudioOut) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
325 func (m *AudioOut) GetAudioData() []byte {
332 // The semantic result for the user's spoken query.
333 type ConverseResult struct {
334 // *Output-only* The recognized transcript of what the user said.
335 SpokenRequestText string `protobuf:"bytes,1,opt,name=spoken_request_text,json=spokenRequestText" json:"spoken_request_text,omitempty"`
336 // *Output-only* The text of the assistant's spoken response. This is only
337 // returned for an IFTTT action.
338 SpokenResponseText string `protobuf:"bytes,2,opt,name=spoken_response_text,json=spokenResponseText" json:"spoken_response_text,omitempty"`
339 // *Output-only* State information for subsequent `ConverseRequest`. This
340 // value should be saved in the client and returned in the
341 // `conversation_state` with the next `ConverseRequest`. (The client does not
342 // need to interpret or otherwise use this value.) There is no need to save
343 // this information across device restarts.
344 ConversationState []byte `protobuf:"bytes,3,opt,name=conversation_state,json=conversationState,proto3" json:"conversation_state,omitempty"`
345 // *Output-only* Specifies the mode of the microphone after this `Converse`
347 MicrophoneMode ConverseResult_MicrophoneMode `protobuf:"varint,4,opt,name=microphone_mode,json=microphoneMode,enum=google.assistant.embedded.v1alpha1.ConverseResult_MicrophoneMode" json:"microphone_mode,omitempty"`
348 // *Output-only* Updated volume level. The value will be 0 or omitted
349 // (indicating no change) unless a voice command such as "Increase the volume"
350 // or "Set volume level 4" was recognized, in which case the value will be
351 // between 1 and 100 (corresponding to the new volume level of 1% to 100%).
352 // Typically, a client should use this volume level when playing the
353 // `audio_out` data, and retain this value as the current volume level and
354 // supply it in the `AudioOutConfig` of the next `ConverseRequest`. (Some
355 // clients may also implement other ways to allow the current volume level to
356 // be changed, for example, by providing a knob that the user can turn.)
357 VolumePercentage int32 `protobuf:"varint,5,opt,name=volume_percentage,json=volumePercentage" json:"volume_percentage,omitempty"`
360 func (m *ConverseResult) Reset() { *m = ConverseResult{} }
361 func (m *ConverseResult) String() string { return proto.CompactTextString(m) }
362 func (*ConverseResult) ProtoMessage() {}
363 func (*ConverseResult) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
365 func (m *ConverseResult) GetSpokenRequestText() string {
367 return m.SpokenRequestText
372 func (m *ConverseResult) GetSpokenResponseText() string {
374 return m.SpokenResponseText
379 func (m *ConverseResult) GetConversationState() []byte {
381 return m.ConversationState
386 func (m *ConverseResult) GetMicrophoneMode() ConverseResult_MicrophoneMode {
388 return m.MicrophoneMode
390 return ConverseResult_MICROPHONE_MODE_UNSPECIFIED
393 func (m *ConverseResult) GetVolumePercentage() int32 {
395 return m.VolumePercentage
400 // The top-level message sent by the client. Clients must send at least two, and
401 // typically numerous `ConverseRequest` messages. The first message must
402 // contain a `config` message and must not contain `audio_in` data. All
403 // subsequent messages must contain `audio_in` data and must not contain a
405 type ConverseRequest struct {
406 // Exactly one of these fields must be specified in each `ConverseRequest`.
408 // Types that are valid to be assigned to ConverseRequest:
409 // *ConverseRequest_Config
410 // *ConverseRequest_AudioIn
411 ConverseRequest isConverseRequest_ConverseRequest `protobuf_oneof:"converse_request"`
414 func (m *ConverseRequest) Reset() { *m = ConverseRequest{} }
415 func (m *ConverseRequest) String() string { return proto.CompactTextString(m) }
416 func (*ConverseRequest) ProtoMessage() {}
417 func (*ConverseRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }
419 type isConverseRequest_ConverseRequest interface {
420 isConverseRequest_ConverseRequest()
423 type ConverseRequest_Config struct {
424 Config *ConverseConfig `protobuf:"bytes,1,opt,name=config,oneof"`
426 type ConverseRequest_AudioIn struct {
427 AudioIn []byte `protobuf:"bytes,2,opt,name=audio_in,json=audioIn,proto3,oneof"`
430 func (*ConverseRequest_Config) isConverseRequest_ConverseRequest() {}
431 func (*ConverseRequest_AudioIn) isConverseRequest_ConverseRequest() {}
433 func (m *ConverseRequest) GetConverseRequest() isConverseRequest_ConverseRequest {
435 return m.ConverseRequest
440 func (m *ConverseRequest) GetConfig() *ConverseConfig {
441 if x, ok := m.GetConverseRequest().(*ConverseRequest_Config); ok {
447 func (m *ConverseRequest) GetAudioIn() []byte {
448 if x, ok := m.GetConverseRequest().(*ConverseRequest_AudioIn); ok {
454 // XXX_OneofFuncs is for the internal use of the proto package.
455 func (*ConverseRequest) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
456 return _ConverseRequest_OneofMarshaler, _ConverseRequest_OneofUnmarshaler, _ConverseRequest_OneofSizer, []interface{}{
457 (*ConverseRequest_Config)(nil),
458 (*ConverseRequest_AudioIn)(nil),
462 func _ConverseRequest_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
463 m := msg.(*ConverseRequest)
465 switch x := m.ConverseRequest.(type) {
466 case *ConverseRequest_Config:
467 b.EncodeVarint(1<<3 | proto.WireBytes)
468 if err := b.EncodeMessage(x.Config); err != nil {
471 case *ConverseRequest_AudioIn:
472 b.EncodeVarint(2<<3 | proto.WireBytes)
473 b.EncodeRawBytes(x.AudioIn)
476 return fmt.Errorf("ConverseRequest.ConverseRequest has unexpected type %T", x)
481 func _ConverseRequest_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
482 m := msg.(*ConverseRequest)
484 case 1: // converse_request.config
485 if wire != proto.WireBytes {
486 return true, proto.ErrInternalBadWireType
488 msg := new(ConverseConfig)
489 err := b.DecodeMessage(msg)
490 m.ConverseRequest = &ConverseRequest_Config{msg}
492 case 2: // converse_request.audio_in
493 if wire != proto.WireBytes {
494 return true, proto.ErrInternalBadWireType
496 x, err := b.DecodeRawBytes(true)
497 m.ConverseRequest = &ConverseRequest_AudioIn{x}
504 func _ConverseRequest_OneofSizer(msg proto.Message) (n int) {
505 m := msg.(*ConverseRequest)
507 switch x := m.ConverseRequest.(type) {
508 case *ConverseRequest_Config:
509 s := proto.Size(x.Config)
510 n += proto.SizeVarint(1<<3 | proto.WireBytes)
511 n += proto.SizeVarint(uint64(s))
513 case *ConverseRequest_AudioIn:
514 n += proto.SizeVarint(2<<3 | proto.WireBytes)
515 n += proto.SizeVarint(uint64(len(x.AudioIn)))
519 panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
524 // The top-level message received by the client. A series of one or more
525 // `ConverseResponse` messages are streamed back to the client.
526 type ConverseResponse struct {
527 // Exactly one of these fields will be populated in each `ConverseResponse`.
529 // Types that are valid to be assigned to ConverseResponse:
530 // *ConverseResponse_Error
531 // *ConverseResponse_EventType_
532 // *ConverseResponse_AudioOut
533 // *ConverseResponse_Result
534 ConverseResponse isConverseResponse_ConverseResponse `protobuf_oneof:"converse_response"`
537 func (m *ConverseResponse) Reset() { *m = ConverseResponse{} }
538 func (m *ConverseResponse) String() string { return proto.CompactTextString(m) }
539 func (*ConverseResponse) ProtoMessage() {}
540 func (*ConverseResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} }
542 type isConverseResponse_ConverseResponse interface {
543 isConverseResponse_ConverseResponse()
546 type ConverseResponse_Error struct {
547 Error *google_rpc.Status `protobuf:"bytes,1,opt,name=error,oneof"`
549 type ConverseResponse_EventType_ struct {
550 EventType ConverseResponse_EventType `protobuf:"varint,2,opt,name=event_type,json=eventType,enum=google.assistant.embedded.v1alpha1.ConverseResponse_EventType,oneof"`
552 type ConverseResponse_AudioOut struct {
553 AudioOut *AudioOut `protobuf:"bytes,3,opt,name=audio_out,json=audioOut,oneof"`
555 type ConverseResponse_Result struct {
556 Result *ConverseResult `protobuf:"bytes,5,opt,name=result,oneof"`
559 func (*ConverseResponse_Error) isConverseResponse_ConverseResponse() {}
560 func (*ConverseResponse_EventType_) isConverseResponse_ConverseResponse() {}
561 func (*ConverseResponse_AudioOut) isConverseResponse_ConverseResponse() {}
562 func (*ConverseResponse_Result) isConverseResponse_ConverseResponse() {}
564 func (m *ConverseResponse) GetConverseResponse() isConverseResponse_ConverseResponse {
566 return m.ConverseResponse
571 func (m *ConverseResponse) GetError() *google_rpc.Status {
572 if x, ok := m.GetConverseResponse().(*ConverseResponse_Error); ok {
578 func (m *ConverseResponse) GetEventType() ConverseResponse_EventType {
579 if x, ok := m.GetConverseResponse().(*ConverseResponse_EventType_); ok {
582 return ConverseResponse_EVENT_TYPE_UNSPECIFIED
585 func (m *ConverseResponse) GetAudioOut() *AudioOut {
586 if x, ok := m.GetConverseResponse().(*ConverseResponse_AudioOut); ok {
592 func (m *ConverseResponse) GetResult() *ConverseResult {
593 if x, ok := m.GetConverseResponse().(*ConverseResponse_Result); ok {
599 // XXX_OneofFuncs is for the internal use of the proto package.
600 func (*ConverseResponse) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
601 return _ConverseResponse_OneofMarshaler, _ConverseResponse_OneofUnmarshaler, _ConverseResponse_OneofSizer, []interface{}{
602 (*ConverseResponse_Error)(nil),
603 (*ConverseResponse_EventType_)(nil),
604 (*ConverseResponse_AudioOut)(nil),
605 (*ConverseResponse_Result)(nil),
609 func _ConverseResponse_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
610 m := msg.(*ConverseResponse)
612 switch x := m.ConverseResponse.(type) {
613 case *ConverseResponse_Error:
614 b.EncodeVarint(1<<3 | proto.WireBytes)
615 if err := b.EncodeMessage(x.Error); err != nil {
618 case *ConverseResponse_EventType_:
619 b.EncodeVarint(2<<3 | proto.WireVarint)
620 b.EncodeVarint(uint64(x.EventType))
621 case *ConverseResponse_AudioOut:
622 b.EncodeVarint(3<<3 | proto.WireBytes)
623 if err := b.EncodeMessage(x.AudioOut); err != nil {
626 case *ConverseResponse_Result:
627 b.EncodeVarint(5<<3 | proto.WireBytes)
628 if err := b.EncodeMessage(x.Result); err != nil {
633 return fmt.Errorf("ConverseResponse.ConverseResponse has unexpected type %T", x)
638 func _ConverseResponse_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
639 m := msg.(*ConverseResponse)
641 case 1: // converse_response.error
642 if wire != proto.WireBytes {
643 return true, proto.ErrInternalBadWireType
645 msg := new(google_rpc.Status)
646 err := b.DecodeMessage(msg)
647 m.ConverseResponse = &ConverseResponse_Error{msg}
649 case 2: // converse_response.event_type
650 if wire != proto.WireVarint {
651 return true, proto.ErrInternalBadWireType
653 x, err := b.DecodeVarint()
654 m.ConverseResponse = &ConverseResponse_EventType_{ConverseResponse_EventType(x)}
656 case 3: // converse_response.audio_out
657 if wire != proto.WireBytes {
658 return true, proto.ErrInternalBadWireType
661 err := b.DecodeMessage(msg)
662 m.ConverseResponse = &ConverseResponse_AudioOut{msg}
664 case 5: // converse_response.result
665 if wire != proto.WireBytes {
666 return true, proto.ErrInternalBadWireType
668 msg := new(ConverseResult)
669 err := b.DecodeMessage(msg)
670 m.ConverseResponse = &ConverseResponse_Result{msg}
677 func _ConverseResponse_OneofSizer(msg proto.Message) (n int) {
678 m := msg.(*ConverseResponse)
680 switch x := m.ConverseResponse.(type) {
681 case *ConverseResponse_Error:
682 s := proto.Size(x.Error)
683 n += proto.SizeVarint(1<<3 | proto.WireBytes)
684 n += proto.SizeVarint(uint64(s))
686 case *ConverseResponse_EventType_:
687 n += proto.SizeVarint(2<<3 | proto.WireVarint)
688 n += proto.SizeVarint(uint64(x.EventType))
689 case *ConverseResponse_AudioOut:
690 s := proto.Size(x.AudioOut)
691 n += proto.SizeVarint(3<<3 | proto.WireBytes)
692 n += proto.SizeVarint(uint64(s))
694 case *ConverseResponse_Result:
695 s := proto.Size(x.Result)
696 n += proto.SizeVarint(5<<3 | proto.WireBytes)
697 n += proto.SizeVarint(uint64(s))
701 panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
707 proto.RegisterType((*ConverseConfig)(nil), "google.assistant.embedded.v1alpha1.ConverseConfig")
708 proto.RegisterType((*AudioInConfig)(nil), "google.assistant.embedded.v1alpha1.AudioInConfig")
709 proto.RegisterType((*AudioOutConfig)(nil), "google.assistant.embedded.v1alpha1.AudioOutConfig")
710 proto.RegisterType((*ConverseState)(nil), "google.assistant.embedded.v1alpha1.ConverseState")
711 proto.RegisterType((*AudioOut)(nil), "google.assistant.embedded.v1alpha1.AudioOut")
712 proto.RegisterType((*ConverseResult)(nil), "google.assistant.embedded.v1alpha1.ConverseResult")
713 proto.RegisterType((*ConverseRequest)(nil), "google.assistant.embedded.v1alpha1.ConverseRequest")
714 proto.RegisterType((*ConverseResponse)(nil), "google.assistant.embedded.v1alpha1.ConverseResponse")
715 proto.RegisterEnum("google.assistant.embedded.v1alpha1.AudioInConfig_Encoding", AudioInConfig_Encoding_name, AudioInConfig_Encoding_value)
716 proto.RegisterEnum("google.assistant.embedded.v1alpha1.AudioOutConfig_Encoding", AudioOutConfig_Encoding_name, AudioOutConfig_Encoding_value)
717 proto.RegisterEnum("google.assistant.embedded.v1alpha1.ConverseResult_MicrophoneMode", ConverseResult_MicrophoneMode_name, ConverseResult_MicrophoneMode_value)
718 proto.RegisterEnum("google.assistant.embedded.v1alpha1.ConverseResponse_EventType", ConverseResponse_EventType_name, ConverseResponse_EventType_value)
721 // Reference imports to suppress errors if they are not otherwise used.
722 var _ context.Context
723 var _ grpc.ClientConn
725 // This is a compile-time assertion to ensure that this generated file
726 // is compatible with the grpc package it is being compiled against.
727 const _ = grpc.SupportPackageIsVersion4
729 // Client API for EmbeddedAssistant service
731 type EmbeddedAssistantClient interface {
732 // Initiates or continues a conversation with the embedded assistant service.
733 // Each call performs one round-trip, sending an audio request to the service
734 // and receiving the audio response. Uses bidirectional streaming to receive
735 // results, such as the `END_OF_UTTERANCE` event, while sending audio.
737 // A conversation is one or more gRPC connections, each consisting of several
738 // streamed requests and responses.
739 // For example, the user says *Add to my shopping list* and the assistant
740 // responds *What do you want to add?*. The sequence of streamed requests and
741 // responses in the first gRPC message could be:
743 // * ConverseRequest.config
744 // * ConverseRequest.audio_in
745 // * ConverseRequest.audio_in
746 // * ConverseRequest.audio_in
747 // * ConverseRequest.audio_in
748 // * ConverseResponse.event_type.END_OF_UTTERANCE
749 // * ConverseResponse.result.microphone_mode.DIALOG_FOLLOW_ON
750 // * ConverseResponse.audio_out
751 // * ConverseResponse.audio_out
752 // * ConverseResponse.audio_out
754 // The user then says *bagels* and the assistant responds
755 // *OK, I've added bagels to your shopping list*. This is sent as another gRPC
756 // connection call to the `Converse` method, again with streamed requests and
757 // responses, such as:
759 // * ConverseRequest.config
760 // * ConverseRequest.audio_in
761 // * ConverseRequest.audio_in
762 // * ConverseRequest.audio_in
763 // * ConverseResponse.event_type.END_OF_UTTERANCE
764 // * ConverseResponse.result.microphone_mode.CLOSE_MICROPHONE
765 // * ConverseResponse.audio_out
766 // * ConverseResponse.audio_out
767 // * ConverseResponse.audio_out
768 // * ConverseResponse.audio_out
770 // Although the precise order of responses is not guaranteed, sequential
771 // ConverseResponse.audio_out messages will always contain sequential portions
773 Converse(ctx context.Context, opts ...grpc.CallOption) (EmbeddedAssistant_ConverseClient, error)
776 type embeddedAssistantClient struct {
780 func NewEmbeddedAssistantClient(cc *grpc.ClientConn) EmbeddedAssistantClient {
781 return &embeddedAssistantClient{cc}
784 func (c *embeddedAssistantClient) Converse(ctx context.Context, opts ...grpc.CallOption) (EmbeddedAssistant_ConverseClient, error) {
785 stream, err := grpc.NewClientStream(ctx, &_EmbeddedAssistant_serviceDesc.Streams[0], c.cc, "/google.assistant.embedded.v1alpha1.EmbeddedAssistant/Converse", opts...)
789 x := &embeddedAssistantConverseClient{stream}
793 type EmbeddedAssistant_ConverseClient interface {
794 Send(*ConverseRequest) error
795 Recv() (*ConverseResponse, error)
799 type embeddedAssistantConverseClient struct {
803 func (x *embeddedAssistantConverseClient) Send(m *ConverseRequest) error {
804 return x.ClientStream.SendMsg(m)
807 func (x *embeddedAssistantConverseClient) Recv() (*ConverseResponse, error) {
808 m := new(ConverseResponse)
809 if err := x.ClientStream.RecvMsg(m); err != nil {
815 // Server API for EmbeddedAssistant service
817 type EmbeddedAssistantServer interface {
818 // Initiates or continues a conversation with the embedded assistant service.
819 // Each call performs one round-trip, sending an audio request to the service
820 // and receiving the audio response. Uses bidirectional streaming to receive
821 // results, such as the `END_OF_UTTERANCE` event, while sending audio.
823 // A conversation is one or more gRPC connections, each consisting of several
824 // streamed requests and responses.
825 // For example, the user says *Add to my shopping list* and the assistant
826 // responds *What do you want to add?*. The sequence of streamed requests and
827 // responses in the first gRPC message could be:
829 // * ConverseRequest.config
830 // * ConverseRequest.audio_in
831 // * ConverseRequest.audio_in
832 // * ConverseRequest.audio_in
833 // * ConverseRequest.audio_in
834 // * ConverseResponse.event_type.END_OF_UTTERANCE
835 // * ConverseResponse.result.microphone_mode.DIALOG_FOLLOW_ON
836 // * ConverseResponse.audio_out
837 // * ConverseResponse.audio_out
838 // * ConverseResponse.audio_out
840 // The user then says *bagels* and the assistant responds
841 // *OK, I've added bagels to your shopping list*. This is sent as another gRPC
842 // connection call to the `Converse` method, again with streamed requests and
843 // responses, such as:
845 // * ConverseRequest.config
846 // * ConverseRequest.audio_in
847 // * ConverseRequest.audio_in
848 // * ConverseRequest.audio_in
849 // * ConverseResponse.event_type.END_OF_UTTERANCE
850 // * ConverseResponse.result.microphone_mode.CLOSE_MICROPHONE
851 // * ConverseResponse.audio_out
852 // * ConverseResponse.audio_out
853 // * ConverseResponse.audio_out
854 // * ConverseResponse.audio_out
856 // Although the precise order of responses is not guaranteed, sequential
857 // ConverseResponse.audio_out messages will always contain sequential portions
859 Converse(EmbeddedAssistant_ConverseServer) error
862 func RegisterEmbeddedAssistantServer(s *grpc.Server, srv EmbeddedAssistantServer) {
863 s.RegisterService(&_EmbeddedAssistant_serviceDesc, srv)
866 func _EmbeddedAssistant_Converse_Handler(srv interface{}, stream grpc.ServerStream) error {
867 return srv.(EmbeddedAssistantServer).Converse(&embeddedAssistantConverseServer{stream})
870 type EmbeddedAssistant_ConverseServer interface {
871 Send(*ConverseResponse) error
872 Recv() (*ConverseRequest, error)
876 type embeddedAssistantConverseServer struct {
880 func (x *embeddedAssistantConverseServer) Send(m *ConverseResponse) error {
881 return x.ServerStream.SendMsg(m)
884 func (x *embeddedAssistantConverseServer) Recv() (*ConverseRequest, error) {
885 m := new(ConverseRequest)
886 if err := x.ServerStream.RecvMsg(m); err != nil {
892 var _EmbeddedAssistant_serviceDesc = grpc.ServiceDesc{
893 ServiceName: "google.assistant.embedded.v1alpha1.EmbeddedAssistant",
894 HandlerType: (*EmbeddedAssistantServer)(nil),
895 Methods: []grpc.MethodDesc{},
896 Streams: []grpc.StreamDesc{
898 StreamName: "Converse",
899 Handler: _EmbeddedAssistant_Converse_Handler,
904 Metadata: "google/assistant/embedded/v1alpha1/embedded_assistant.proto",
908 proto.RegisterFile("google/assistant/embedded/v1alpha1/embedded_assistant.proto", fileDescriptor0)
911 var fileDescriptor0 = []byte{
912 // 892 bytes of a gzipped FileDescriptorProto
913 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0x51, 0x73, 0xdb, 0x44,
914 0x10, 0xb6, 0xec, 0xa6, 0xb5, 0xb7, 0x89, 0x2c, 0x5f, 0x33, 0x90, 0x49, 0x61, 0x60, 0xf4, 0xc0,
915 0x94, 0x02, 0x72, 0xe3, 0x30, 0x3c, 0x10, 0xe8, 0x8c, 0x63, 0x2b, 0xb1, 0xc1, 0x96, 0x3c, 0x67,
916 0xa7, 0xa5, 0x0c, 0xcc, 0xcd, 0x55, 0x3e, 0x1c, 0x81, 0x7d, 0x27, 0xa4, 0x73, 0xa6, 0xe1, 0x07,
917 0xf0, 0xd8, 0xe1, 0x95, 0x67, 0x7e, 0x11, 0xff, 0x88, 0xd1, 0x9d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, 0x3d,
929 0xda, 0x7f, 0x1a, 0xb0, 0xb3, 0xd6, 0x18, 0x7a, 0x06, 0x55, 0xc6, 0x03, 0x31, 0x0d, 0xb9, 0x56,
930 0xc7, 0x6c, 0x7d, 0xbe, 0xb1, 0x3a, 0x8e, 0x9b, 0x31, 0xe0, 0x82, 0x0b, 0x3d, 0x86, 0x46, 0x42,
931 0x17, 0xd1, 0x9c, 0x91, 0x98, 0x4a, 0x46, 0xce, 0x59, 0x2c, 0x7f, 0x51, 0x12, 0x6d, 0xe1, 0xba,
932 0x4e, 0x60, 0x2a, 0x59, 0x2f, 0x0d, 0xdb, 0x5f, 0x40, 0x35, 0x67, 0x40, 0x7b, 0xb0, 0xeb, 0x7a,
933 0x1d, 0xbf, 0xdb, 0xf7, 0x4e, 0xc9, 0x99, 0x37, 0x1e, 0xb9, 0x9d, 0xfe, 0x49, 0xdf, 0xed, 0x5a,
934 0x25, 0xb4, 0x0d, 0xd5, 0x41, 0xdf, 0x73, 0xdb, 0xf8, 0xe0, 0x33, 0xcb, 0x40, 0x55, 0xb8, 0x73,
935 0x32, 0x68, 0x77, 0xac, 0xb2, 0xfd, 0x5b, 0x19, 0xcc, 0x75, 0x41, 0xd1, 0xf3, 0x7f, 0x34, 0x75,
936 0xb4, 0xf9, 0x58, 0xfe, 0x67, 0x57, 0xe8, 0x23, 0x68, 0x5c, 0x88, 0xf9, 0x72, 0xc1, 0x48, 0xc4,
937 0xe2, 0x80, 0x71, 0x49, 0x67, 0x7a, 0x90, 0x5b, 0xd8, 0xd2, 0x89, 0x51, 0x11, 0xb7, 0x07, 0xb7,
938 0x90, 0xe0, 0x1e, 0x54, 0x86, 0xa3, 0x43, 0xab, 0x8c, 0xea, 0x70, 0xdf, 0x1f, 0x9d, 0x8d, 0x49,
939 0xdf, 0x23, 0xfe, 0xe9, 0xa9, 0x55, 0xb1, 0x9f, 0xc2, 0xce, 0x9a, 0x0d, 0xd0, 0x27, 0x80, 0x32,
940 0x23, 0xa8, 0xd7, 0x94, 0xb9, 0x2a, 0x95, 0x66, 0x1b, 0x37, 0x56, 0x33, 0xda, 0x26, 0x1f, 0x42,
941 0x35, 0xd7, 0x02, 0xbd, 0x0b, 0xa0, 0xad, 0x3e, 0xa5, 0x92, 0x66, 0x90, 0x9a, 0x8a, 0x74, 0xa9,
942 0xa4, 0xf6, 0xef, 0x95, 0xab, 0x77, 0x87, 0x59, 0xb2, 0x9c, 0x4b, 0xe4, 0xc0, 0x83, 0x24, 0x12,
943 0x3f, 0x31, 0x4e, 0x62, 0xf6, 0xf3, 0x92, 0x25, 0x92, 0x48, 0xf6, 0x4a, 0x2a, 0x68, 0x0d, 0x37,
944 0x74, 0x0a, 0xeb, 0xcc, 0x84, 0xbd, 0x92, 0xe8, 0x09, 0xec, 0x16, 0xf7, 0x93, 0x48, 0xf0, 0x84,
945 0x69, 0x40, 0x59, 0x01, 0x50, 0x0e, 0xd0, 0x29, 0x85, 0xb8, 0xbe, 0x9d, 0xca, 0x1b, 0xda, 0x41,
946 0x3f, 0x42, 0x7d, 0x11, 0x06, 0xb1, 0x88, 0xce, 0x05, 0x67, 0x64, 0x21, 0xa6, 0x6c, 0xef, 0x8e,
947 0x72, 0x45, 0x7b, 0x93, 0x07, 0xa5, 0xbb, 0x73, 0x86, 0x05, 0xd3, 0x50, 0x4c, 0x19, 0x36, 0x17,
948 0x6b, 0xe7, 0xeb, 0xa7, 0xbe, 0xf5, 0x86, 0xa9, 0x7f, 0x0f, 0xe6, 0x3a, 0x1d, 0x7a, 0x0f, 0x1e,
949 0x0e, 0xfb, 0x1d, 0xec, 0x8f, 0x7a, 0xbe, 0xe7, 0x92, 0xa1, 0xdf, 0x75, 0xff, 0x66, 0x81, 0x5d,
950 0xb0, 0x3a, 0x03, 0x7f, 0xec, 0x92, 0xab, 0x6b, 0x96, 0x91, 0x46, 0xbb, 0xfd, 0xf6, 0xc0, 0x3f,
951 0x25, 0x27, 0xfe, 0x60, 0xe0, 0x3f, 0x27, 0xbe, 0x97,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