Skip to content
This repository has been archived by the owner on Jul 20, 2023. It is now read-only.

fix: fix validation result docs feat: add language code to streaming recognition result docs: update environment docs #853

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 30 additions & 30 deletions protos/google/cloud/dialogflow/v2/audio_config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,36 @@ option java_outer_classname = "AudioConfigProto";
option java_package = "com.google.cloud.dialogflow.v2";
option objc_class_prefix = "DF";

// Hints for the speech recognizer to help with recognition in a specific
// conversation state.
message SpeechContext {
// Optional. A list of strings containing words and phrases that the speech
// recognizer should recognize with higher likelihood.
//
// This list can be used to:
//
// * improve accuracy for words and phrases you expect the user to say,
// e.g. typical commands for your Dialogflow agent
// * add additional words to the speech recognizer vocabulary
// * ...
//
// See the [Cloud Speech
// documentation](https://cloud.google.com/speech-to-text/quotas) for usage
// limits.
repeated string phrases = 1;

// Optional. Boost for this context compared to other contexts:
//
// * If the boost is positive, Dialogflow will increase the probability that
// the phrases in this context are recognized over similar sounding phrases.
// * If the boost is unspecified or non-positive, Dialogflow will not apply
// any boost.
//
// Dialogflow recommends that you use boosts in the range (0, 20] and that you
// find a value that fits your use case with binary search.
float boost = 2;
}

// Audio encoding of the audio content sent in the conversational query request.
// Refer to the
// [Cloud Speech API
Expand Down Expand Up @@ -78,36 +108,6 @@ enum AudioEncoding {
AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE = 7;
}

// Hints for the speech recognizer to help with recognition in a specific
// conversation state.
message SpeechContext {
// Optional. A list of strings containing words and phrases that the speech
// recognizer should recognize with higher likelihood.
//
// This list can be used to:
//
// * improve accuracy for words and phrases you expect the user to say,
// e.g. typical commands for your Dialogflow agent
// * add additional words to the speech recognizer vocabulary
// * ...
//
// See the [Cloud Speech
// documentation](https://cloud.google.com/speech-to-text/quotas) for usage
// limits.
repeated string phrases = 1;

// Optional. Boost for this context compared to other contexts:
//
// * If the boost is positive, Dialogflow will increase the probability that
// the phrases in this context are recognized over similar sounding phrases.
// * If the boost is unspecified or non-positive, Dialogflow will not apply
// any boost.
//
// Dialogflow recommends that you use boosts in the range (0, 20] and that you
// find a value that fits your use case with binary search.
float boost = 2;
}

// Information for a word recognized by the speech recognizer.
message SpeechWordInfo {
// The word this info is for.
Expand Down
38 changes: 28 additions & 10 deletions protos/google/cloud/dialogflow/v2/environment.proto
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ service Environments {
"https://www.googleapis.com/auth/cloud-platform,"
"https://www.googleapis.com/auth/dialogflow";

// Returns the list of all non-draft environments of the specified agent.
// Returns the list of all non-default environments of the specified agent.
rpc ListEnvironments(ListEnvironmentsRequest) returns (ListEnvironmentsResponse) {
option (google.api.http) = {
get: "/v2/{parent=projects/*/agent}/environments"
Expand Down Expand Up @@ -79,13 +79,13 @@ service Environments {
// This method allows you to deploy new agent versions into the environment.
// When an environment is pointed to a new agent version by setting
// `environment.agent_version`, the environment is temporarily set to the
// `LOADING` state. During that time, the environment keeps on serving the
// `LOADING` state. During that time, the environment continues serving the
// previous version of the agent. After the new agent version is done loading,
// the environment is set back to the `RUNNING` state.
// You can use "-" as Environment ID in environment name to update version
// in "draft" environment. WARNING: this will negate all recent changes to
// draft and can't be undone. You may want to save the draft to a version
// before calling this function.
// You can use "-" as Environment ID in environment name to update an agent
// version in the default environment. WARNING: this will negate all recent
// changes to the draft agent and can't be undone. You may want to save the
// draft agent to a version before calling this method.
rpc UpdateEnvironment(UpdateEnvironmentRequest) returns (Environment) {
option (google.api.http) = {
patch: "/v2/{environment.name=projects/*/agent/environments/*}"
Expand Down Expand Up @@ -164,17 +164,21 @@ message Environment {

// Output only. The unique identifier of this agent environment.
// Supported formats:
//
// - `projects/<Project ID>/agent/environments/<Environment ID>`
// - `projects/<Project ID>/locations/<Location
// ID>/agent/environments/<Environment ID>`
//
// The environment ID for the default environment is `-`.
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];

// Optional. The developer-provided description for this environment.
// The maximum length is 500 characters. If exceeded, the request is rejected.
string description = 2 [(google.api.field_behavior) = OPTIONAL];

// Required. The agent version loaded into this environment.
// Optional. The agent version loaded into this environment.
// Supported formats:
//
// - `projects/<Project ID>/agent/versions/<Version ID>`
// - `projects/<Project ID>/locations/<Location ID>/agent/versions/<Version
// ID>`
Expand Down Expand Up @@ -226,6 +230,7 @@ message TextToSpeechSettings {
message ListEnvironmentsRequest {
// Required. The agent to list all environments from.
// Format:
//
// - `projects/<Project ID>/agent`
// - `projects/<Project ID>/locations/<Location ID>/agent`
string parent = 1 [
Expand Down Expand Up @@ -258,9 +263,12 @@ message ListEnvironmentsResponse {
message GetEnvironmentRequest {
// Required. The name of the environment.
// Supported formats:
//
// - `projects/<Project ID>/agent/environments/<Environment ID>`
// - `projects/<Project ID>/locations/<Location
// ID>/agent/environments/<Environment ID>`
//
// The environment ID for the default environment is `-`.
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
Expand All @@ -273,6 +281,7 @@ message GetEnvironmentRequest {
message CreateEnvironmentRequest {
// Required. The agent to create an environment for.
// Supported formats:
//
// - `projects/<Project ID>/agent`
// - `projects/<Project ID>/locations/<Location ID>/agent`
string parent = 1 [
Expand All @@ -297,20 +306,23 @@ message UpdateEnvironmentRequest {
// Required. The mask to control which fields get updated.
google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];

// Optional. This field is used to prevent accidental overwrite of the draft
// Optional. This field is used to prevent accidental overwrite of the default
// environment, which is an operation that cannot be undone. To confirm that
// the caller desires this overwrite, this field must be explicitly set to
// true when updating the draft environment (environment ID = `-`).
// true when updating the default environment (environment ID = `-`).
bool allow_load_to_draft_and_discard_changes = 3 [(google.api.field_behavior) = OPTIONAL];
}

// The request message for [Environments.DeleteEnvironment][google.cloud.dialogflow.v2.Environments.DeleteEnvironment].
message DeleteEnvironmentRequest {
// Required. The name of the environment to delete.
// / Format:
//
// - `projects/<Project ID>/agent/environments/<Environment ID>`
// - `projects/<Project ID>/locations/<Location
// ID>/agent/environments/<Environment ID>`
// ID>/agent/environments/<Environment ID>`
//
// The environment ID for the default environment is `-`.
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
Expand All @@ -323,9 +335,12 @@ message DeleteEnvironmentRequest {
message GetEnvironmentHistoryRequest {
// Required. The name of the environment to retrieve history for.
// Supported formats:
//
// - `projects/<Project ID>/agent/environments/<Environment ID>`
// - `projects/<Project ID>/locations/<Location
// ID>/agent/environments/<Environment ID>`
//
// The environment ID for the default environment is `-`.
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
Expand Down Expand Up @@ -357,9 +372,12 @@ message EnvironmentHistory {

// Output only. The name of the environment this history is for.
// Supported formats:
//
// - `projects/<Project ID>/agent/environments/<Environment ID>`
// - `projects/<Project ID>/locations/<Location
// ID>/agent/environments/<Environment ID>`
//
// The environment ID for the default environment is `-`.
string parent = 1 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. The list of agent environments. There will be a maximum number of items
Expand Down
3 changes: 3 additions & 0 deletions protos/google/cloud/dialogflow/v2/session.proto
Original file line number Diff line number Diff line change
Expand Up @@ -584,6 +584,9 @@ message StreamingRecognitionResult {
// Time offset of the end of this Speech recognition result relative to the
// beginning of the audio. Only populated for `message_type` = `TRANSCRIPT`.
google.protobuf.Duration speech_end_offset = 8;

// Detected language code for the transcript.
string language_code = 10;
}

// Represents the natural language text to be processed.
Expand Down
6 changes: 6 additions & 0 deletions protos/google/cloud/dialogflow/v2/version.proto
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ message Version {

// Output only. The unique identifier of this agent version.
// Supported formats:
//
// - `projects/<Project ID>/agent/versions/<Version ID>`
// - `projects/<Project ID>/locations/<Location ID>/agent/versions/<Version
// ID>`
Expand All @@ -172,6 +173,7 @@ message Version {
message ListVersionsRequest {
// Required. The agent to list all versions from.
// Supported formats:
//
// - `projects/<Project ID>/agent`
// - `projects/<Project ID>/locations/<Location ID>/agent`
string parent = 1 [
Expand Down Expand Up @@ -204,6 +206,7 @@ message ListVersionsResponse {
message GetVersionRequest {
// Required. The name of the version.
// Supported formats:
//
// - `projects/<Project ID>/agent/versions/<Version ID>`
// - `projects/<Project ID>/locations/<Location ID>/agent/versions/<Version
// ID>`
Expand All @@ -219,6 +222,7 @@ message GetVersionRequest {
message CreateVersionRequest {
// Required. The agent to create a version for.
// Supported formats:
//
// - `projects/<Project ID>/agent`
// - `projects/<Project ID>/locations/<Location ID>/agent`
string parent = 1 [
Expand All @@ -236,6 +240,7 @@ message CreateVersionRequest {
message UpdateVersionRequest {
// Required. The version to update.
// Supported formats:
//
// - `projects/<Project ID>/agent/versions/<Version ID>`
// - `projects/<Project ID>/locations/<Location ID>/agent/versions/<Version
// ID>`
Expand All @@ -249,6 +254,7 @@ message UpdateVersionRequest {
message DeleteVersionRequest {
// Required. The name of the version to delete.
// Supported formats:
//
// - `projects/<Project ID>/agent/versions/<Version ID>`
// - `projects/<Project ID>/locations/<Location ID>/agent/versions/<Version
// ID>`
Expand Down
30 changes: 18 additions & 12 deletions protos/protos.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading