embedded

package
v0.0.0-...-694d95b Latest Latest
Warning

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

Go to latest
Published: May 23, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AudioInConfig_Encoding_name = map[int32]string{
	0: "ENCODING_UNSPECIFIED",
	1: "LINEAR16",
	2: "FLAC",
}
View Source
var AudioInConfig_Encoding_value = map[string]int32{
	"ENCODING_UNSPECIFIED": 0,
	"LINEAR16":             1,
	"FLAC":                 2,
}
View Source
var AudioOutConfig_Encoding_name = map[int32]string{
	0: "ENCODING_UNSPECIFIED",
	1: "LINEAR16",
	2: "MP3",
	3: "OPUS_IN_OGG",
}
View Source
var AudioOutConfig_Encoding_value = map[string]int32{
	"ENCODING_UNSPECIFIED": 0,
	"LINEAR16":             1,
	"MP3":                  2,
	"OPUS_IN_OGG":          3,
}
View Source
var ConverseResponse_EventType_name = map[int32]string{
	0: "EVENT_TYPE_UNSPECIFIED",
	1: "END_OF_UTTERANCE",
}
View Source
var ConverseResponse_EventType_value = map[string]int32{
	"EVENT_TYPE_UNSPECIFIED": 0,
	"END_OF_UTTERANCE":       1,
}
View Source
var ConverseResult_MicrophoneMode_name = map[int32]string{
	0: "MICROPHONE_MODE_UNSPECIFIED",
	1: "CLOSE_MICROPHONE",
	2: "DIALOG_FOLLOW_ON",
}
View Source
var ConverseResult_MicrophoneMode_value = map[string]int32{
	"MICROPHONE_MODE_UNSPECIFIED": 0,
	"CLOSE_MICROPHONE":            1,
	"DIALOG_FOLLOW_ON":            2,
}

Functions

func RegisterEmbeddedAssistantServer

func RegisterEmbeddedAssistantServer(s *grpc.Server, srv EmbeddedAssistantServer)

Types

type AudioInConfig

type AudioInConfig struct {
	// *Required* Encoding of audio data sent in all `audio_in` messages.
	Encoding AudioInConfig_Encoding `` /* 126-byte string literal not displayed */
	// *Required* Sample rate (in Hertz) of the audio data sent in all `audio_in`
	// messages. Valid values are from 16000-24000, but 16000 is optimal.
	// For best results, set the sampling rate of the audio source to 16000 Hz.
	// If that's not possible, use the native sample rate of the audio source
	// (instead of re-sampling).
	SampleRateHertz      int32    `protobuf:"varint,2,opt,name=sample_rate_hertz,json=sampleRateHertz" json:"sample_rate_hertz,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Specifies how to process the `audio_in` data that will be provided in subsequent requests. For recommended settings, see the Google Assistant SDK [best practices](https://developers.google.com/assistant/sdk/develop/grpc/best-practices/audio).

func (*AudioInConfig) Descriptor

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

func (*AudioInConfig) GetEncoding

func (m *AudioInConfig) GetEncoding() AudioInConfig_Encoding

func (*AudioInConfig) GetSampleRateHertz

func (m *AudioInConfig) GetSampleRateHertz() int32

func (*AudioInConfig) ProtoMessage

func (*AudioInConfig) ProtoMessage()

func (*AudioInConfig) Reset

func (m *AudioInConfig) Reset()

func (*AudioInConfig) String

func (m *AudioInConfig) String() string

func (*AudioInConfig) XXX_DiscardUnknown

func (m *AudioInConfig) XXX_DiscardUnknown()

func (*AudioInConfig) XXX_Marshal

func (m *AudioInConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AudioInConfig) XXX_Merge

func (dst *AudioInConfig) XXX_Merge(src proto.Message)

func (*AudioInConfig) XXX_Size

func (m *AudioInConfig) XXX_Size() int

func (*AudioInConfig) XXX_Unmarshal

func (m *AudioInConfig) XXX_Unmarshal(b []byte) error

type AudioInConfig_Encoding

type AudioInConfig_Encoding int32

Audio encoding of the data sent in the audio message. Audio must be one-channel (mono). The only language supported is "en-US".

const (
	// Not specified. Will return result [google.rpc.Code.INVALID_ARGUMENT][].
	AudioInConfig_ENCODING_UNSPECIFIED AudioInConfig_Encoding = 0
	// Uncompressed 16-bit signed little-endian samples (Linear PCM).
	// This encoding includes no header, only the raw audio bytes.
	AudioInConfig_LINEAR16 AudioInConfig_Encoding = 1
	// [`FLAC`](https://xiph.org/flac/documentation.html) (Free Lossless Audio
	// Codec) is the recommended encoding because it is
	// lossless--therefore recognition is not compromised--and
	// requires only about half the bandwidth of `LINEAR16`. This encoding
	// includes the `FLAC` stream header followed by audio data. It supports
	// 16-bit and 24-bit samples, however, not all fields in `STREAMINFO` are
	// supported.
	AudioInConfig_FLAC AudioInConfig_Encoding = 2
)

func (AudioInConfig_Encoding) EnumDescriptor

func (AudioInConfig_Encoding) EnumDescriptor() ([]byte, []int)

func (AudioInConfig_Encoding) String

func (x AudioInConfig_Encoding) String() string

type AudioOut

type AudioOut struct {
	// *Output-only* The audio data containing the assistant's response to the
	// query. Sequential chunks of audio data are received in sequential
	// `ConverseResponse` messages.
	AudioData            []byte   `protobuf:"bytes,1,opt,name=audio_data,json=audioData,proto3" json:"audio_data,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

The audio containing the assistant's response to the query. Sequential chunks of audio data are received in sequential `ConverseResponse` messages.

func (*AudioOut) Descriptor

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

func (*AudioOut) GetAudioData

func (m *AudioOut) GetAudioData() []byte

func (*AudioOut) ProtoMessage

func (*AudioOut) ProtoMessage()

func (*AudioOut) Reset

func (m *AudioOut) Reset()

func (*AudioOut) String

func (m *AudioOut) String() string

func (*AudioOut) XXX_DiscardUnknown

func (m *AudioOut) XXX_DiscardUnknown()

func (*AudioOut) XXX_Marshal

func (m *AudioOut) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AudioOut) XXX_Merge

func (dst *AudioOut) XXX_Merge(src proto.Message)

func (*AudioOut) XXX_Size

func (m *AudioOut) XXX_Size() int

func (*AudioOut) XXX_Unmarshal

func (m *AudioOut) XXX_Unmarshal(b []byte) error

type AudioOutConfig

type AudioOutConfig struct {
	// *Required* The encoding of audio data to be returned in all `audio_out`
	// messages.
	Encoding AudioOutConfig_Encoding `` /* 127-byte string literal not displayed */
	// *Required* The sample rate in Hertz of the audio data returned in
	// `audio_out` messages. Valid values are: 16000-24000.
	SampleRateHertz int32 `protobuf:"varint,2,opt,name=sample_rate_hertz,json=sampleRateHertz" json:"sample_rate_hertz,omitempty"`
	// *Required* Current volume setting of the device's audio output.
	// Valid values are 1 to 100 (corresponding to 1% to 100%).
	VolumePercentage     int32    `protobuf:"varint,3,opt,name=volume_percentage,json=volumePercentage" json:"volume_percentage,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Specifies the desired format for the server to use when it returns `audio_out` messages.

func (*AudioOutConfig) Descriptor

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

func (*AudioOutConfig) GetEncoding

func (m *AudioOutConfig) GetEncoding() AudioOutConfig_Encoding

func (*AudioOutConfig) GetSampleRateHertz

func (m *AudioOutConfig) GetSampleRateHertz() int32

func (*AudioOutConfig) GetVolumePercentage

func (m *AudioOutConfig) GetVolumePercentage() int32

func (*AudioOutConfig) ProtoMessage

func (*AudioOutConfig) ProtoMessage()

func (*AudioOutConfig) Reset

func (m *AudioOutConfig) Reset()

func (*AudioOutConfig) String

func (m *AudioOutConfig) String() string

func (*AudioOutConfig) XXX_DiscardUnknown

func (m *AudioOutConfig) XXX_DiscardUnknown()

func (*AudioOutConfig) XXX_Marshal

func (m *AudioOutConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AudioOutConfig) XXX_Merge

func (dst *AudioOutConfig) XXX_Merge(src proto.Message)

func (*AudioOutConfig) XXX_Size

func (m *AudioOutConfig) XXX_Size() int

func (*AudioOutConfig) XXX_Unmarshal

func (m *AudioOutConfig) XXX_Unmarshal(b []byte) error

type AudioOutConfig_Encoding

type AudioOutConfig_Encoding int32

Audio encoding of the data returned in the audio message. All encodings are raw audio bytes with no header, except as indicated below.

const (
	// Not specified. Will return result [google.rpc.Code.INVALID_ARGUMENT][].
	AudioOutConfig_ENCODING_UNSPECIFIED AudioOutConfig_Encoding = 0
	// Uncompressed 16-bit signed little-endian samples (Linear PCM).
	AudioOutConfig_LINEAR16 AudioOutConfig_Encoding = 1
	// MP3 audio encoding. The sample rate is encoded in the payload.
	AudioOutConfig_MP3 AudioOutConfig_Encoding = 2
	// Opus-encoded audio wrapped in an ogg container. The result will be a
	// file which can be played natively on Android and in some browsers (such
	// as Chrome). The quality of the encoding is considerably higher than MP3
	// while using the same bitrate. The sample rate is encoded in the payload.
	AudioOutConfig_OPUS_IN_OGG AudioOutConfig_Encoding = 3
)

func (AudioOutConfig_Encoding) EnumDescriptor

func (AudioOutConfig_Encoding) EnumDescriptor() ([]byte, []int)

func (AudioOutConfig_Encoding) String

func (x AudioOutConfig_Encoding) String() string

type ConverseConfig

type ConverseConfig struct {
	// *Required* Specifies how to process the subsequent incoming audio.
	AudioInConfig *AudioInConfig `protobuf:"bytes,1,opt,name=audio_in_config,json=audioInConfig" json:"audio_in_config,omitempty"`
	// *Required* Specifies how to format the audio that will be returned.
	AudioOutConfig *AudioOutConfig `protobuf:"bytes,2,opt,name=audio_out_config,json=audioOutConfig" json:"audio_out_config,omitempty"`
	// *Required* Represents the current dialog state.
	ConverseState        *ConverseState `protobuf:"bytes,3,opt,name=converse_state,json=converseState" json:"converse_state,omitempty"`
	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
	XXX_unrecognized     []byte         `json:"-"`
	XXX_sizecache        int32          `json:"-"`
}

Specifies how to process the `ConverseRequest` messages.

func (*ConverseConfig) Descriptor

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

func (*ConverseConfig) GetAudioInConfig

func (m *ConverseConfig) GetAudioInConfig() *AudioInConfig

func (*ConverseConfig) GetAudioOutConfig

func (m *ConverseConfig) GetAudioOutConfig() *AudioOutConfig

func (*ConverseConfig) GetConverseState

func (m *ConverseConfig) GetConverseState() *ConverseState

func (*ConverseConfig) ProtoMessage

func (*ConverseConfig) ProtoMessage()

func (*ConverseConfig) Reset

func (m *ConverseConfig) Reset()

func (*ConverseConfig) String

func (m *ConverseConfig) String() string

func (*ConverseConfig) XXX_DiscardUnknown

func (m *ConverseConfig) XXX_DiscardUnknown()

func (*ConverseConfig) XXX_Marshal

func (m *ConverseConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ConverseConfig) XXX_Merge

func (dst *ConverseConfig) XXX_Merge(src proto.Message)

func (*ConverseConfig) XXX_Size

func (m *ConverseConfig) XXX_Size() int

func (*ConverseConfig) XXX_Unmarshal

func (m *ConverseConfig) XXX_Unmarshal(b []byte) error

type ConverseRequest

type ConverseRequest struct {
	// Exactly one of these fields must be specified in each `ConverseRequest`.
	//
	// Types that are valid to be assigned to ConverseRequest:
	//	*ConverseRequest_Config
	//	*ConverseRequest_AudioIn
	ConverseRequest      isConverseRequest_ConverseRequest `protobuf_oneof:"converse_request"`
	XXX_NoUnkeyedLiteral struct{}                          `json:"-"`
	XXX_unrecognized     []byte                            `json:"-"`
	XXX_sizecache        int32                             `json:"-"`
}

The top-level message sent by the client. Clients must send at least two, and typically numerous `ConverseRequest` messages. The first message must contain a `config` message and must not contain `audio_in` data. All subsequent messages must contain `audio_in` data and must not contain a `config` message.

func (*ConverseRequest) Descriptor

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

func (*ConverseRequest) GetAudioIn

func (m *ConverseRequest) GetAudioIn() []byte

func (*ConverseRequest) GetConfig

func (m *ConverseRequest) GetConfig() *ConverseConfig

func (*ConverseRequest) GetConverseRequest

func (m *ConverseRequest) GetConverseRequest() isConverseRequest_ConverseRequest

func (*ConverseRequest) ProtoMessage

func (*ConverseRequest) ProtoMessage()

func (*ConverseRequest) Reset

func (m *ConverseRequest) Reset()

func (*ConverseRequest) String

func (m *ConverseRequest) String() string

func (*ConverseRequest) XXX_DiscardUnknown

func (m *ConverseRequest) XXX_DiscardUnknown()

func (*ConverseRequest) XXX_Marshal

func (m *ConverseRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ConverseRequest) XXX_Merge

func (dst *ConverseRequest) XXX_Merge(src proto.Message)

func (*ConverseRequest) XXX_OneofFuncs

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{})

XXX_OneofFuncs is for the internal use of the proto package.

func (*ConverseRequest) XXX_Size

func (m *ConverseRequest) XXX_Size() int

func (*ConverseRequest) XXX_Unmarshal

func (m *ConverseRequest) XXX_Unmarshal(b []byte) error

type ConverseRequest_AudioIn

type ConverseRequest_AudioIn struct {
	AudioIn []byte `protobuf:"bytes,2,opt,name=audio_in,json=audioIn,proto3,oneof"`
}

type ConverseRequest_Config

type ConverseRequest_Config struct {
	Config *ConverseConfig `protobuf:"bytes,1,opt,name=config,oneof"`
}

type ConverseResponse

type ConverseResponse struct {
	// Exactly one of these fields will be populated in each `ConverseResponse`.
	//
	// Types that are valid to be assigned to ConverseResponse:
	//	*ConverseResponse_Error
	//	*ConverseResponse_EventType_
	//	*ConverseResponse_AudioOut
	//	*ConverseResponse_Result
	ConverseResponse     isConverseResponse_ConverseResponse `protobuf_oneof:"converse_response"`
	XXX_NoUnkeyedLiteral struct{}                            `json:"-"`
	XXX_unrecognized     []byte                              `json:"-"`
	XXX_sizecache        int32                               `json:"-"`
}

The top-level message received by the client. A series of one or more `ConverseResponse` messages are streamed back to the client.

func (*ConverseResponse) Descriptor

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

func (*ConverseResponse) GetAudioOut

func (m *ConverseResponse) GetAudioOut() *AudioOut

func (*ConverseResponse) GetConverseResponse

func (m *ConverseResponse) GetConverseResponse() isConverseResponse_ConverseResponse

func (*ConverseResponse) GetError

func (m *ConverseResponse) GetError() *status.Status

func (*ConverseResponse) GetEventType

func (m *ConverseResponse) GetEventType() ConverseResponse_EventType

func (*ConverseResponse) GetResult

func (m *ConverseResponse) GetResult() *ConverseResult

func (*ConverseResponse) ProtoMessage

func (*ConverseResponse) ProtoMessage()

func (*ConverseResponse) Reset

func (m *ConverseResponse) Reset()

func (*ConverseResponse) String

func (m *ConverseResponse) String() string

func (*ConverseResponse) XXX_DiscardUnknown

func (m *ConverseResponse) XXX_DiscardUnknown()

func (*ConverseResponse) XXX_Marshal

func (m *ConverseResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ConverseResponse) XXX_Merge

func (dst *ConverseResponse) XXX_Merge(src proto.Message)

func (*ConverseResponse) XXX_OneofFuncs

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{})

XXX_OneofFuncs is for the internal use of the proto package.

func (*ConverseResponse) XXX_Size

func (m *ConverseResponse) XXX_Size() int

func (*ConverseResponse) XXX_Unmarshal

func (m *ConverseResponse) XXX_Unmarshal(b []byte) error

type ConverseResponse_AudioOut

type ConverseResponse_AudioOut struct {
	AudioOut *AudioOut `protobuf:"bytes,3,opt,name=audio_out,json=audioOut,oneof"`
}

type ConverseResponse_Error

type ConverseResponse_Error struct {
	Error *status.Status `protobuf:"bytes,1,opt,name=error,oneof"`
}

type ConverseResponse_EventType

type ConverseResponse_EventType int32

Indicates the type of event.

const (
	// No event specified.
	ConverseResponse_EVENT_TYPE_UNSPECIFIED ConverseResponse_EventType = 0
	// This event indicates that the server has detected the end of the user's
	// speech utterance and expects no additional speech. Therefore, the server
	// will not process additional audio (although it may subsequently return
	// additional results). The client should stop sending additional audio
	// data, half-close the gRPC connection, and wait for any additional results
	// until the server closes the gRPC connection.
	ConverseResponse_END_OF_UTTERANCE ConverseResponse_EventType = 1
)

func (ConverseResponse_EventType) EnumDescriptor

func (ConverseResponse_EventType) EnumDescriptor() ([]byte, []int)

func (ConverseResponse_EventType) String

type ConverseResponse_EventType_

type ConverseResponse_EventType_ struct {
	EventType ConverseResponse_EventType `` /* 127-byte string literal not displayed */
}

type ConverseResponse_Result

type ConverseResponse_Result struct {
	Result *ConverseResult `protobuf:"bytes,5,opt,name=result,oneof"`
}

type ConverseResult

type ConverseResult struct {
	// *Output-only* The recognized transcript of what the user said.
	SpokenRequestText string `protobuf:"bytes,1,opt,name=spoken_request_text,json=spokenRequestText" json:"spoken_request_text,omitempty"`
	// *Output-only* The text of the assistant's spoken response. This is only
	// returned for an IFTTT action.
	SpokenResponseText string `protobuf:"bytes,2,opt,name=spoken_response_text,json=spokenResponseText" json:"spoken_response_text,omitempty"`
	// *Output-only* State information for subsequent `ConverseRequest`. This
	// value should be saved in the client and returned in the
	// `conversation_state` with the next `ConverseRequest`. (The client does not
	// need to interpret or otherwise use this value.) There is no need to save
	// this information across device restarts.
	ConversationState []byte `protobuf:"bytes,3,opt,name=conversation_state,json=conversationState,proto3" json:"conversation_state,omitempty"`
	// *Output-only* Specifies the mode of the microphone after this `Converse`
	// RPC is processed.
	MicrophoneMode ConverseResult_MicrophoneMode `` /* 167-byte string literal not displayed */
	// *Output-only* Updated volume level. The value will be 0 or omitted
	// (indicating no change) unless a voice command such as "Increase the volume"
	// or "Set volume level 4" was recognized, in which case the value will be
	// between 1 and 100 (corresponding to the new volume level of 1% to 100%).
	// Typically, a client should use this volume level when playing the
	// `audio_out` data, and retain this value as the current volume level and
	// supply it in the `AudioOutConfig` of the next `ConverseRequest`. (Some
	// clients may also implement other ways to allow the current volume level to
	// be changed, for example, by providing a knob that the user can turn.)
	VolumePercentage     int32    `protobuf:"varint,5,opt,name=volume_percentage,json=volumePercentage" json:"volume_percentage,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

The semantic result for the user's spoken query.

func (*ConverseResult) Descriptor

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

func (*ConverseResult) GetConversationState

func (m *ConverseResult) GetConversationState() []byte

func (*ConverseResult) GetMicrophoneMode

func (m *ConverseResult) GetMicrophoneMode() ConverseResult_MicrophoneMode

func (*ConverseResult) GetSpokenRequestText

func (m *ConverseResult) GetSpokenRequestText() string

func (*ConverseResult) GetSpokenResponseText

func (m *ConverseResult) GetSpokenResponseText() string

func (*ConverseResult) GetVolumePercentage

func (m *ConverseResult) GetVolumePercentage() int32

func (*ConverseResult) ProtoMessage

func (*ConverseResult) ProtoMessage()

func (*ConverseResult) Reset

func (m *ConverseResult) Reset()

func (*ConverseResult) String

func (m *ConverseResult) String() string

func (*ConverseResult) XXX_DiscardUnknown

func (m *ConverseResult) XXX_DiscardUnknown()

func (*ConverseResult) XXX_Marshal

func (m *ConverseResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ConverseResult) XXX_Merge

func (dst *ConverseResult) XXX_Merge(src proto.Message)

func (*ConverseResult) XXX_Size

func (m *ConverseResult) XXX_Size() int

func (*ConverseResult) XXX_Unmarshal

func (m *ConverseResult) XXX_Unmarshal(b []byte) error

type ConverseResult_MicrophoneMode

type ConverseResult_MicrophoneMode int32

Possible states of the microphone after a `Converse` RPC completes.

const (
	// No mode specified.
	ConverseResult_MICROPHONE_MODE_UNSPECIFIED ConverseResult_MicrophoneMode = 0
	// The service is not expecting a follow-on question from the user.
	// The microphone should remain off until the user re-activates it.
	ConverseResult_CLOSE_MICROPHONE ConverseResult_MicrophoneMode = 1
	// The service is expecting a follow-on question from the user. The
	// microphone should be re-opened when the `AudioOut` playback completes
	// (by starting a new `Converse` RPC call to send the new audio).
	ConverseResult_DIALOG_FOLLOW_ON ConverseResult_MicrophoneMode = 2
)

func (ConverseResult_MicrophoneMode) EnumDescriptor

func (ConverseResult_MicrophoneMode) EnumDescriptor() ([]byte, []int)

func (ConverseResult_MicrophoneMode) String

type ConverseState

type ConverseState struct {
	// *Required* The `conversation_state` value returned in the prior
	// `ConverseResponse`. Omit (do not set the field) if there was no prior
	// `ConverseResponse`. If there was a prior `ConverseResponse`, do not omit
	// this field; doing so will end that conversation (and this new request will
	// start a new conversation).
	ConversationState    []byte   `protobuf:"bytes,1,opt,name=conversation_state,json=conversationState,proto3" json:"conversation_state,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Provides information about the current dialog state.

func (*ConverseState) Descriptor

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

func (*ConverseState) GetConversationState

func (m *ConverseState) GetConversationState() []byte

func (*ConverseState) ProtoMessage

func (*ConverseState) ProtoMessage()

func (*ConverseState) Reset

func (m *ConverseState) Reset()

func (*ConverseState) String

func (m *ConverseState) String() string

func (*ConverseState) XXX_DiscardUnknown

func (m *ConverseState) XXX_DiscardUnknown()

func (*ConverseState) XXX_Marshal

func (m *ConverseState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ConverseState) XXX_Merge

func (dst *ConverseState) XXX_Merge(src proto.Message)

func (*ConverseState) XXX_Size

func (m *ConverseState) XXX_Size() int

func (*ConverseState) XXX_Unmarshal

func (m *ConverseState) XXX_Unmarshal(b []byte) error

type EmbeddedAssistantClient

type EmbeddedAssistantClient interface {
	// Initiates or continues a conversation with the embedded assistant service.
	// Each call performs one round-trip, sending an audio request to the service
	// and receiving the audio response. Uses bidirectional streaming to receive
	// results, such as the `END_OF_UTTERANCE` event, while sending audio.
	//
	// A conversation is one or more gRPC connections, each consisting of several
	// streamed requests and responses.
	// For example, the user says *Add to my shopping list* and the assistant
	// responds *What do you want to add?*. The sequence of streamed requests and
	// responses in the first gRPC message could be:
	//
	// *   ConverseRequest.config
	// *   ConverseRequest.audio_in
	// *   ConverseRequest.audio_in
	// *   ConverseRequest.audio_in
	// *   ConverseRequest.audio_in
	// *   ConverseResponse.event_type.END_OF_UTTERANCE
	// *   ConverseResponse.result.microphone_mode.DIALOG_FOLLOW_ON
	// *   ConverseResponse.audio_out
	// *   ConverseResponse.audio_out
	// *   ConverseResponse.audio_out
	//
	// The user then says *bagels* and the assistant responds
	// *OK, I've added bagels to your shopping list*. This is sent as another gRPC
	// connection call to the `Converse` method, again with streamed requests and
	// responses, such as:
	//
	// *   ConverseRequest.config
	// *   ConverseRequest.audio_in
	// *   ConverseRequest.audio_in
	// *   ConverseRequest.audio_in
	// *   ConverseResponse.event_type.END_OF_UTTERANCE
	// *   ConverseResponse.result.microphone_mode.CLOSE_MICROPHONE
	// *   ConverseResponse.audio_out
	// *   ConverseResponse.audio_out
	// *   ConverseResponse.audio_out
	// *   ConverseResponse.audio_out
	//
	// Although the precise order of responses is not guaranteed, sequential
	// ConverseResponse.audio_out messages will always contain sequential portions
	// of audio.
	Converse(ctx context.Context, opts ...grpc.CallOption) (EmbeddedAssistant_ConverseClient, error)
}

EmbeddedAssistantClient is the client API for EmbeddedAssistant service.

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

func NewEmbeddedAssistantClient

func NewEmbeddedAssistantClient(cc *grpc.ClientConn) EmbeddedAssistantClient

type EmbeddedAssistantServer

type EmbeddedAssistantServer interface {
	// Initiates or continues a conversation with the embedded assistant service.
	// Each call performs one round-trip, sending an audio request to the service
	// and receiving the audio response. Uses bidirectional streaming to receive
	// results, such as the `END_OF_UTTERANCE` event, while sending audio.
	//
	// A conversation is one or more gRPC connections, each consisting of several
	// streamed requests and responses.
	// For example, the user says *Add to my shopping list* and the assistant
	// responds *What do you want to add?*. The sequence of streamed requests and
	// responses in the first gRPC message could be:
	//
	// *   ConverseRequest.config
	// *   ConverseRequest.audio_in
	// *   ConverseRequest.audio_in
	// *   ConverseRequest.audio_in
	// *   ConverseRequest.audio_in
	// *   ConverseResponse.event_type.END_OF_UTTERANCE
	// *   ConverseResponse.result.microphone_mode.DIALOG_FOLLOW_ON
	// *   ConverseResponse.audio_out
	// *   ConverseResponse.audio_out
	// *   ConverseResponse.audio_out
	//
	// The user then says *bagels* and the assistant responds
	// *OK, I've added bagels to your shopping list*. This is sent as another gRPC
	// connection call to the `Converse` method, again with streamed requests and
	// responses, such as:
	//
	// *   ConverseRequest.config
	// *   ConverseRequest.audio_in
	// *   ConverseRequest.audio_in
	// *   ConverseRequest.audio_in
	// *   ConverseResponse.event_type.END_OF_UTTERANCE
	// *   ConverseResponse.result.microphone_mode.CLOSE_MICROPHONE
	// *   ConverseResponse.audio_out
	// *   ConverseResponse.audio_out
	// *   ConverseResponse.audio_out
	// *   ConverseResponse.audio_out
	//
	// Although the precise order of responses is not guaranteed, sequential
	// ConverseResponse.audio_out messages will always contain sequential portions
	// of audio.
	Converse(EmbeddedAssistant_ConverseServer) error
}

type EmbeddedAssistant_ConverseClient

type EmbeddedAssistant_ConverseClient interface {
	Send(*ConverseRequest) error
	Recv() (*ConverseResponse, error)
	grpc.ClientStream
}

type EmbeddedAssistant_ConverseServer

type EmbeddedAssistant_ConverseServer interface {
	Send(*ConverseResponse) error
	Recv() (*ConverseRequest, error)
	grpc.ServerStream
}

Jump to

Keyboard shortcuts

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