Service Client: Google::Assistant::Embedded::V1alpha2::EmbeddedAssistant::EmbeddedAssistantClient
Client stub representing the remote EmbeddedAssistant gRPC service. Delegates call dispatching to Google::gRPC::Client.
target
The endpoint target address. Defaults to assistant.googleapis.com:443.
credentials
The authentication credentials provider. Defaults to application default credentials via Google::Auth.
NAME
Google::Assistant::Embedded::V1alpha2::EmbeddedAssistant - Compiled Protocol Buffers messages for google/assistant/embedded/v1alpha2/embedded_assistant.proto
SYNOPSIS
use Google::Assistant::Embedded::V1alpha2::EmbeddedAssistant;
my $msg = Google::Assistant::Embedded::V1alpha2::EmbeddedAssistant::AssistRequest->new({
config => $config,
audio_in => $audio_in,
});
# Read or update a field
my $val = $msg->config();
# Binary wire-format roundtrip
my $bytes = $msg->serialize();
my $decoded = Google::Assistant::Embedded::V1alpha2::EmbeddedAssistant::AssistRequest->parse($bytes);
# Canonical ProtoJSON
my $json = $msg->to_json();
DESCRIPTION
Auto-generated Protobuf message classes compiled from google/assistant/embedded/v1alpha2/embedded_assistant.proto. All message classes inherit from Protobuf::Message and support new(), serialize(), parse(), to_json(), from_json(), to_text(), and to_perl().
MESSAGES
Google::Assistant::Embedded::V1alpha2::EmbeddedAssistant::AssistRequest
The top-level message sent by the client. Clients must send at least two, and typically numerous `AssistRequest` 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.
Inherits from Protobuf::Message.
Accessors
$msg->config()/$msg->config($value)Type:
Message(Google::Assistant::Embedded::V1alpha2::EmbeddedAssistant::AssistConfig)The `config` message provides information to the recognizer that specifies how to process the request. The first `AssistRequest` message must contain a `config` message.
$msg->audio_in()/$msg->audio_in($value)Type:
BytesThe audio data to be recognized. Sequential chunks of audio data are sent in sequential `AssistRequest` messages. The first `AssistRequest` message must not contain `audio_in` data and all subsequent `AssistRequest` messages must contain `audio_in` data. The audio bytes must be encoded as specified in `AudioInConfig`. Audio must be sent at approximately real-time (16000 samples per second). An error will be returned if audio is sent significantly faster or slower.
Google::Assistant::Embedded::V1alpha2::EmbeddedAssistant::AssistResponse
The top-level message received by the client. A series of one or more `AssistResponse` messages are streamed back to the client.
Inherits from Protobuf::Message.
Accessors
$msg->event_type()/$msg->event_type($value)Type:
Enum(Google::Assistant::Embedded::V1alpha2::AssistResponse::EventType)*Output-only* Indicates the type of event.
$msg->audio_out()/$msg->audio_out($value)Type:
Message(Google::Assistant::Embedded::V1alpha2::EmbeddedAssistant::AudioOut)*Output-only* The audio containing the Assistant's response to the query.
$msg->screen_out()/$msg->screen_out($value)Type:
Message(Google::Assistant::Embedded::V1alpha2::EmbeddedAssistant::ScreenOut)*Output-only* Contains the Assistant's visual response to the query.
$msg->device_action()/$msg->device_action($value)Type:
Message(Google::Assistant::Embedded::V1alpha2::EmbeddedAssistant::DeviceAction)*Output-only* Contains the action triggered by the query with the appropriate payloads and semantic parsing.
$msg->speech_results()/$msg->speech_results($value)Type:
Message(Google::Assistant::Embedded::V1alpha2::EmbeddedAssistant::SpeechRecognitionResult)*Output-only* This repeated list contains zero or more speech recognition results that correspond to consecutive portions of the audio currently being processed, starting with the portion corresponding to the earliest audio (and most stable portion) to the portion corresponding to the most recent audio. The strings can be concatenated to view the full in-progress response. When the speech recognition completes, this list will contain one item with `stability` of `1.0`.
$msg->dialog_state_out()/$msg->dialog_state_out($value)Type:
Message(Google::Assistant::Embedded::V1alpha2::EmbeddedAssistant::DialogStateOut)*Output-only* Contains output related to the user's query.
$msg->debug_info()/$msg->debug_info($value)Type:
Message(Google::Assistant::Embedded::V1alpha2::EmbeddedAssistant::DebugInfo)*Output-only* Debugging info for developer. Only returned if request set `return_debug_info` to true.
Enum: AssistResponse::EventType
EVENT_TYPE_UNSPECIFIED=>0END_OF_UTTERANCE=>1
Google::Assistant::Embedded::V1alpha2::EmbeddedAssistant::DebugInfo
Debug info for developer. Only returned if request set `return_debug_info` to true.
Inherits from Protobuf::Message.
Accessors
$msg->aog_agent_to_assistant_json()/$msg->aog_agent_to_assistant_json($value)Type:
StringThe original JSON response from an Action-on-Google agent to Google server. See https://developers.google.com/actions/reference/rest/Shared.Types/AppResponse. It will only be populated if the request maker owns the AoG project and the AoG project is in preview mode.
Google::Assistant::Embedded::V1alpha2::EmbeddedAssistant::AssistConfig
Specifies how to process the `AssistRequest` messages.
Inherits from Protobuf::Message.
Accessors
$msg->audio_in_config()/$msg->audio_in_config($value)Type:
Message(Google::Assistant::Embedded::V1alpha2::EmbeddedAssistant::AudioInConfig)Specifies how to process the subsequent incoming audio. Required if [AssistRequest.audio_in][google.assistant.embedded.v1alpha2.AssistRequest.audio_in] bytes will be provided in subsequent requests.
$msg->text_query()/$msg->text_query($value)Type:
StringThe text input to be sent to the Assistant. This can be populated from a text interface if audio input is not available.
$msg->audio_out_config()/$msg->audio_out_config($value)Type:
Message(Google::Assistant::Embedded::V1alpha2::EmbeddedAssistant::AudioOutConfig)*Required* Specifies how to format the audio that will be returned.
$msg->screen_out_config()/$msg->screen_out_config($value)Type:
Message(Google::Assistant::Embedded::V1alpha2::EmbeddedAssistant::ScreenOutConfig)*Optional* Specifies the desired format to use when server returns a visual screen response.
$msg->dialog_state_in()/$msg->dialog_state_in($value)Type:
Message(Google::Assistant::Embedded::V1alpha2::EmbeddedAssistant::DialogStateIn)*Required* Represents the current dialog state.
$msg->device_config()/$msg->device_config($value)Type:
Message(Google::Assistant::Embedded::V1alpha2::EmbeddedAssistant::DeviceConfig)Device configuration that uniquely identifies a specific device.
$msg->debug_config()/$msg->debug_config($value)Type:
Message(Google::Assistant::Embedded::V1alpha2::EmbeddedAssistant::DebugConfig)*Optional* Debugging parameters for the whole `Assist` RPC.
Google::Assistant::Embedded::V1alpha2::EmbeddedAssistant::AudioInConfig
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/guides/service/python/best-practices/audio).
Inherits from Protobuf::Message.
Accessors
$msg->encoding()/$msg->encoding($value)Type:
Enum(Google::Assistant::Embedded::V1alpha2::AudioInConfig::Encoding)*Required* Encoding of audio data sent in all `audio_in` messages.
$msg->sample_rate_hertz()/$msg->sample_rate_hertz($value)Type:
Int32*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).
Enum: AudioInConfig::Encoding
ENCODING_UNSPECIFIED=>0LINEAR16=>1FLAC=>2
Google::Assistant::Embedded::V1alpha2::EmbeddedAssistant::AudioOutConfig
Specifies the desired format for the server to use when it returns `audio_out` messages.
Inherits from Protobuf::Message.
Accessors
$msg->encoding()/$msg->encoding($value)Type:
Enum(Google::Assistant::Embedded::V1alpha2::AudioOutConfig::Encoding)*Required* The encoding of audio data to be returned in all `audio_out` messages.
$msg->sample_rate_hertz()/$msg->sample_rate_hertz($value)Type:
Int32*Required* The sample rate in Hertz of the audio data returned in `audio_out` messages. Valid values are: 16000-24000.
$msg->volume_percentage()/$msg->volume_percentage($value)Type:
Int32*Required* Current volume setting of the device's audio output. Valid values are 1 to 100 (corresponding to 1% to 100%).
Enum: AudioOutConfig::Encoding
ENCODING_UNSPECIFIED=>0LINEAR16=>1MP3=>2OPUS_IN_OGG=>3
Google::Assistant::Embedded::V1alpha2::EmbeddedAssistant::ScreenOutConfig
Specifies the desired format for the server to use when it returns `screen_out` response.
Inherits from Protobuf::Message.
Accessors
$msg->screen_mode()/$msg->screen_mode($value)Type:
Enum(Google::Assistant::Embedded::V1alpha2::ScreenOutConfig::ScreenMode)Current visual screen-mode for the device while issuing the query.
Enum: ScreenOutConfig::ScreenMode
SCREEN_MODE_UNSPECIFIED=>0OFF=>1PLAYING=>3
Google::Assistant::Embedded::V1alpha2::EmbeddedAssistant::DialogStateIn
Provides information about the current dialog state.
Inherits from Protobuf::Message.
Accessors
$msg->conversation_state()/$msg->conversation_state($value)Type:
Bytes*Required* This field must always be set to the [DialogStateOut.conversation_state][google.assistant.embedded.v1alpha2.DialogStateOut.conversation_state] value that was returned in the prior `Assist` RPC. It should only be omitted (field not set) if there was no prior `Assist` RPC because this is the first `Assist` RPC made by this device after it was first setup and/or a factory-default reset.
$msg->language_code()/$msg->language_code($value)Type:
String*Required* Language of the request in [IETF BCP 47 syntax](https://tools.ietf.org/html/bcp47) (for example, "en-US"). See [Language Support](https://developers.google.com/assistant/sdk/reference/rpc/languages) for more information. If you have selected a language for this `device_id` using the [Settings](https://developers.google.com/assistant/sdk/reference/assistant-app/assistant-settings) menu in your phone's Google Assistant app, that selection will override this value.
$msg->device_location()/$msg->device_location($value)Type:
Message(Google::Assistant::Embedded::V1alpha2::EmbeddedAssistant::DeviceLocation)*Optional* Location of the device where the query originated.
$msg->is_new_conversation()/$msg->is_new_conversation($value)Type:
Bool*Optional* If true, the server will treat the request as a new conversation and not use state from the prior request. Set this field to true when the conversation should be restarted, such as after a device reboot, or after a significant lapse of time since the prior query.
Google::Assistant::Embedded::V1alpha2::EmbeddedAssistant::DeviceConfig
*Required* Fields that identify the device to the Assistant.
See also:
* [Register a Device - REST API](https://developers.google.com/assistant/sdk/reference/device-registration/register-device-manual) * [Device Model and Instance Schemas](https://developers.google.com/assistant/sdk/reference/device-registration/model-and-instance-schemas) * [Device Proto](https://developers.google.com/assistant/sdk/reference/rpc/google.assistant.devices.v1alpha2#device)
Inherits from Protobuf::Message.
Accessors
$msg->device_id()/$msg->device_id($value)Type:
String*Required* Unique identifier for the device. The id length must be 128 characters or less. Example: DBCDW098234. This MUST match the device_id returned from device registration. This device_id is used to match against the user's registered devices to lookup the supported traits and capabilities of this device. This information should not change across device reboots. However, it should not be saved across factory-default resets.
$msg->device_model_id()/$msg->device_model_id($value)Type:
String*Required* Unique identifier for the device model. The combination of device_model_id and device_id must have been previously associated through device registration.
Google::Assistant::Embedded::V1alpha2::EmbeddedAssistant::AudioOut
The audio containing the Assistant's response to the query. Sequential chunks of audio data are received in sequential `AssistResponse` messages.
Inherits from Protobuf::Message.
Accessors
$msg->audio_data()/$msg->audio_data($value)Type:
Bytes*Output-only* The audio data containing the Assistant's response to the query. Sequential chunks of audio data are received in sequential `AssistResponse` messages.
Google::Assistant::Embedded::V1alpha2::EmbeddedAssistant::ScreenOut
The Assistant's visual output response to query. Enabled by `screen_out_config`.
Inherits from Protobuf::Message.
Accessors
$msg->format()/$msg->format($value)Type:
Enum(Google::Assistant::Embedded::V1alpha2::ScreenOut::Format)*Output-only* The format of the provided screen data.
$msg->data()/$msg->data($value)Type:
Bytes*Output-only* The raw screen data to be displayed as the result of the Assistant query.
Enum: ScreenOut::Format
FORMAT_UNSPECIFIED=>0HTML=>1
Google::Assistant::Embedded::V1alpha2::EmbeddedAssistant::DeviceAction
The response returned to the device if the user has triggered a Device Action. For example, a device which supports the query *Turn on the light* would receive a `DeviceAction` with a JSON payload containing the semantics of the request.
Inherits from Protobuf::Message.
Accessors
$msg->device_request_json()/$msg->device_request_json($value)Type:
StringJSON containing the device command response generated from the triggered Device Action grammar. The format is given by the `action.devices.EXECUTE` intent for a given [trait](https://developers.google.com/assistant/sdk/reference/traits/).
Google::Assistant::Embedded::V1alpha2::EmbeddedAssistant::SpeechRecognitionResult
The estimated transcription of a phrase the user has spoken. This could be a single segment or the full guess of the user's spoken query.
Inherits from Protobuf::Message.
Accessors
$msg->transcript()/$msg->transcript($value)Type:
String*Output-only* Transcript text representing the words that the user spoke.
$msg->stability()/$msg->stability($value)Type:
Float*Output-only* An estimate of the likelihood that the Assistant will not change its guess about this result. Values range from 0.0 (completely unstable) to 1.0 (completely stable and final). The default of 0.0 is a sentinel value indicating `stability` was not set.
Google::Assistant::Embedded::V1alpha2::EmbeddedAssistant::DialogStateOut
The dialog state resulting from the user's query. Multiple of these messages may be received.
Inherits from Protobuf::Message.
Accessors
$msg->supplemental_display_text()/$msg->supplemental_display_text($value)Type:
String*Output-only* Supplemental display text from the Assistant. This could be the same as the speech spoken in `AssistResponse.audio_out` or it could be some additional information which aids the user's understanding.
$msg->conversation_state()/$msg->conversation_state($value)Type:
Bytes*Output-only* State information for the subsequent `Assist` RPC. This value should be saved in the client and returned in the [`DialogStateIn.conversation_state`](#dialogstatein) field with the next `Assist` RPC. (The client does not need to interpret or otherwise use this value.) This information should be saved across device reboots. However, this value should be cleared (not saved in the client) during a factory-default reset.
$msg->microphone_mode()/$msg->microphone_mode($value)Type:
Enum(Google::Assistant::Embedded::V1alpha2::DialogStateOut::MicrophoneMode)*Output-only* Specifies the mode of the microphone after this `Assist` RPC is processed.
$msg->volume_percentage()/$msg->volume_percentage($value)Type:
Int32*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 `AssistRequest`. (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.)
Enum: DialogStateOut::MicrophoneMode
MICROPHONE_MODE_UNSPECIFIED=>0CLOSE_MICROPHONE=>1DIALOG_FOLLOW_ON=>2
Google::Assistant::Embedded::V1alpha2::EmbeddedAssistant::DebugConfig
Debugging parameters for the current request.
Inherits from Protobuf::Message.
Accessors
$msg->return_debug_info()/$msg->return_debug_info($value)Type:
BoolWhen this field is set to true, the `debug_info` field in `AssistResponse` may be populated. However it will significantly increase latency of responses. Do not set this field true in production code.
Google::Assistant::Embedded::V1alpha2::EmbeddedAssistant::DeviceLocation
There are three sources of locations. They are used with this precedence:
1. This `DeviceLocation`, which is primarily used for mobile devices with GPS . 2. Location specified by the user during device setup; this is per-user, per device. This location is used if `DeviceLocation` is not specified. 3. Inferred location based on IP address. This is used only if neither of the above are specified.
Inherits from Protobuf::Message.
Accessors
$msg->coordinates()/$msg->coordinates($value)Type:
Message(Google::Type::Latlng::LatLng)Latitude and longitude of device.
SEE ALSO
Protobuf, Protobuf::Message, Google::Assistant::Embedded::V1alpha2::EmbeddedAssistant::Types, https://protobuf.dev/
LICENSE AND COPYRIGHT
Copyright (C) 2026 Google LLC
This program is released under the Apache 2.0 license.