google-cloud-dialogflow 0.14.0 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.yardopts +2 -1
- data/AUTHENTICATION.md +51 -59
- data/LICENSE.md +203 -0
- data/MIGRATING.md +445 -0
- data/README.md +35 -25
- data/lib/{google/cloud/dialogflow/v2/doc/google/protobuf/empty.rb → google-cloud-dialogflow.rb} +4 -14
- data/lib/google/cloud/dialogflow.rb +256 -506
- data/lib/google/cloud/dialogflow/version.rb +1 -1
- metadata +63 -86
- data/LICENSE +0 -201
- data/lib/google/cloud/dialogflow/v2.rb +0 -598
- data/lib/google/cloud/dialogflow/v2/agent_pb.rb +0 -121
- data/lib/google/cloud/dialogflow/v2/agent_services_pb.rb +0 -111
- data/lib/google/cloud/dialogflow/v2/agents_client.rb +0 -807
- data/lib/google/cloud/dialogflow/v2/agents_client_config.json +0 -71
- data/lib/google/cloud/dialogflow/v2/audio_config_pb.rb +0 -96
- data/lib/google/cloud/dialogflow/v2/context_pb.rb +0 -63
- data/lib/google/cloud/dialogflow/v2/context_services_pb.rb +0 -75
- data/lib/google/cloud/dialogflow/v2/contexts_client.rb +0 -519
- data/lib/google/cloud/dialogflow/v2/contexts_client_config.json +0 -56
- data/lib/google/cloud/dialogflow/v2/credentials.rb +0 -42
- data/lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/agent.rb +0 -247
- data/lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/audio_config.rb +0 -341
- data/lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/context.rb +0 -116
- data/lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/entity_type.rb +0 -305
- data/lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/intent.rb +0 -937
- data/lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/session.rb +0 -498
- data/lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/session_entity_type.rb +0 -130
- data/lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/validation_result.rb +0 -71
- data/lib/google/cloud/dialogflow/v2/doc/google/longrunning/operations.rb +0 -51
- data/lib/google/cloud/dialogflow/v2/doc/google/protobuf/any.rb +0 -131
- data/lib/google/cloud/dialogflow/v2/doc/google/protobuf/duration.rb +0 -91
- data/lib/google/cloud/dialogflow/v2/doc/google/protobuf/field_mask.rb +0 -222
- data/lib/google/cloud/dialogflow/v2/doc/google/protobuf/struct.rb +0 -74
- data/lib/google/cloud/dialogflow/v2/doc/google/rpc/status.rb +0 -39
- data/lib/google/cloud/dialogflow/v2/doc/google/type/latlng.rb +0 -31
- data/lib/google/cloud/dialogflow/v2/entity_type_pb.rb +0 -125
- data/lib/google/cloud/dialogflow/v2/entity_type_services_pb.rb +0 -105
- data/lib/google/cloud/dialogflow/v2/entity_types_client.rb +0 -994
- data/lib/google/cloud/dialogflow/v2/entity_types_client_config.json +0 -76
- data/lib/google/cloud/dialogflow/v2/intent_pb.rb +0 -367
- data/lib/google/cloud/dialogflow/v2/intent_services_pb.rb +0 -93
- data/lib/google/cloud/dialogflow/v2/intents_client.rb +0 -760
- data/lib/google/cloud/dialogflow/v2/intents_client_config.json +0 -61
- data/lib/google/cloud/dialogflow/v2/session_entity_type_pb.rb +0 -65
- data/lib/google/cloud/dialogflow/v2/session_entity_type_services_pb.rb +0 -93
- data/lib/google/cloud/dialogflow/v2/session_entity_types_client.rb +0 -504
- data/lib/google/cloud/dialogflow/v2/session_entity_types_client_config.json +0 -51
- data/lib/google/cloud/dialogflow/v2/session_pb.rb +0 -141
- data/lib/google/cloud/dialogflow/v2/session_services_pb.rb +0 -56
- data/lib/google/cloud/dialogflow/v2/sessions_client.rb +0 -337
- data/lib/google/cloud/dialogflow/v2/sessions_client_config.json +0 -36
- data/lib/google/cloud/dialogflow/v2/validation_result_pb.rb +0 -36
- data/lib/google/cloud/dialogflow/v2/webhook_pb.rb +0 -46
@@ -1,56 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"interfaces": {
|
3
|
-
"google.cloud.dialogflow.v2.Contexts": {
|
4
|
-
"retry_codes": {
|
5
|
-
"idempotent": [
|
6
|
-
"DEADLINE_EXCEEDED",
|
7
|
-
"UNAVAILABLE"
|
8
|
-
],
|
9
|
-
"non_idempotent": []
|
10
|
-
},
|
11
|
-
"retry_params": {
|
12
|
-
"default": {
|
13
|
-
"initial_retry_delay_millis": 100,
|
14
|
-
"retry_delay_multiplier": 1.3,
|
15
|
-
"max_retry_delay_millis": 60000,
|
16
|
-
"initial_rpc_timeout_millis": 20000,
|
17
|
-
"rpc_timeout_multiplier": 1.0,
|
18
|
-
"max_rpc_timeout_millis": 20000,
|
19
|
-
"total_timeout_millis": 600000
|
20
|
-
}
|
21
|
-
},
|
22
|
-
"methods": {
|
23
|
-
"ListContexts": {
|
24
|
-
"timeout_millis": 60000,
|
25
|
-
"retry_codes_name": "idempotent",
|
26
|
-
"retry_params_name": "default"
|
27
|
-
},
|
28
|
-
"GetContext": {
|
29
|
-
"timeout_millis": 60000,
|
30
|
-
"retry_codes_name": "idempotent",
|
31
|
-
"retry_params_name": "default"
|
32
|
-
},
|
33
|
-
"CreateContext": {
|
34
|
-
"timeout_millis": 60000,
|
35
|
-
"retry_codes_name": "non_idempotent",
|
36
|
-
"retry_params_name": "default"
|
37
|
-
},
|
38
|
-
"UpdateContext": {
|
39
|
-
"timeout_millis": 60000,
|
40
|
-
"retry_codes_name": "non_idempotent",
|
41
|
-
"retry_params_name": "default"
|
42
|
-
},
|
43
|
-
"DeleteContext": {
|
44
|
-
"timeout_millis": 60000,
|
45
|
-
"retry_codes_name": "idempotent",
|
46
|
-
"retry_params_name": "default"
|
47
|
-
},
|
48
|
-
"DeleteAllContexts": {
|
49
|
-
"timeout_millis": 60000,
|
50
|
-
"retry_codes_name": "idempotent",
|
51
|
-
"retry_params_name": "default"
|
52
|
-
}
|
53
|
-
}
|
54
|
-
}
|
55
|
-
}
|
56
|
-
}
|
@@ -1,42 +0,0 @@
|
|
1
|
-
# Copyright 2020 Google LLC
|
2
|
-
#
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
# you may not use this file except in compliance with the License.
|
5
|
-
# You may obtain a copy of the License at
|
6
|
-
#
|
7
|
-
# https://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
#
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
# See the License for the specific language governing permissions and
|
13
|
-
# limitations under the License.
|
14
|
-
|
15
|
-
|
16
|
-
require "googleauth"
|
17
|
-
|
18
|
-
module Google
|
19
|
-
module Cloud
|
20
|
-
module Dialogflow
|
21
|
-
module V2
|
22
|
-
class Credentials < Google::Auth::Credentials
|
23
|
-
SCOPE = [
|
24
|
-
"https://www.googleapis.com/auth/cloud-platform",
|
25
|
-
"https://www.googleapis.com/auth/dialogflow"
|
26
|
-
].freeze
|
27
|
-
PATH_ENV_VARS = %w(DIALOGFLOW_CREDENTIALS
|
28
|
-
DIALOGFLOW_KEYFILE
|
29
|
-
GOOGLE_CLOUD_CREDENTIALS
|
30
|
-
GOOGLE_CLOUD_KEYFILE
|
31
|
-
GCLOUD_KEYFILE)
|
32
|
-
JSON_ENV_VARS = %w(DIALOGFLOW_CREDENTIALS_JSON
|
33
|
-
DIALOGFLOW_KEYFILE_JSON
|
34
|
-
GOOGLE_CLOUD_CREDENTIALS_JSON
|
35
|
-
GOOGLE_CLOUD_KEYFILE_JSON
|
36
|
-
GCLOUD_KEYFILE_JSON)
|
37
|
-
DEFAULT_PATHS = ["~/.config/gcloud/application_default_credentials.json"]
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|
@@ -1,247 +0,0 @@
|
|
1
|
-
# Copyright 2020 Google LLC
|
2
|
-
#
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
# you may not use this file except in compliance with the License.
|
5
|
-
# You may obtain a copy of the License at
|
6
|
-
#
|
7
|
-
# https://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
#
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
# See the License for the specific language governing permissions and
|
13
|
-
# limitations under the License.
|
14
|
-
|
15
|
-
|
16
|
-
module Google
|
17
|
-
module Cloud
|
18
|
-
module Dialogflow
|
19
|
-
module V2
|
20
|
-
# Represents a conversational agent.
|
21
|
-
# @!attribute [rw] parent
|
22
|
-
# @return [String]
|
23
|
-
# Required. The project of this agent.
|
24
|
-
# Format: `projects/<Project ID>`.
|
25
|
-
# @!attribute [rw] display_name
|
26
|
-
# @return [String]
|
27
|
-
# Required. The name of this agent.
|
28
|
-
# @!attribute [rw] default_language_code
|
29
|
-
# @return [String]
|
30
|
-
# Required. The default language of the agent as a language tag. See
|
31
|
-
# [Language
|
32
|
-
# Support](https://cloud.google.com/dialogflow/docs/reference/language)
|
33
|
-
# for a list of the currently supported language codes. This field cannot be
|
34
|
-
# set by the `Update` method.
|
35
|
-
# @!attribute [rw] supported_language_codes
|
36
|
-
# @return [Array<String>]
|
37
|
-
# Optional. The list of all languages supported by this agent (except for the
|
38
|
-
# `default_language_code`).
|
39
|
-
# @!attribute [rw] time_zone
|
40
|
-
# @return [String]
|
41
|
-
# Required. The time zone of this agent from the
|
42
|
-
# [time zone database](https://www.iana.org/time-zones), e.g.,
|
43
|
-
# America/New_York, Europe/Paris.
|
44
|
-
# @!attribute [rw] description
|
45
|
-
# @return [String]
|
46
|
-
# Optional. The description of this agent.
|
47
|
-
# The maximum length is 500 characters. If exceeded, the request is rejected.
|
48
|
-
# @!attribute [rw] avatar_uri
|
49
|
-
# @return [String]
|
50
|
-
# Optional. The URI of the agent's avatar.
|
51
|
-
# Avatars are used throughout the Dialogflow console and in the self-hosted
|
52
|
-
# [Web
|
53
|
-
# Demo](https://cloud.google.com/dialogflow/docs/integrations/web-demo)
|
54
|
-
# integration.
|
55
|
-
# @!attribute [rw] enable_logging
|
56
|
-
# @return [true, false]
|
57
|
-
# Optional. Determines whether this agent should log conversation queries.
|
58
|
-
# @!attribute [rw] match_mode
|
59
|
-
# @return [Google::Cloud::Dialogflow::V2::Agent::MatchMode]
|
60
|
-
# Optional. Determines how intents are detected from user queries.
|
61
|
-
# @!attribute [rw] classification_threshold
|
62
|
-
# @return [Float]
|
63
|
-
# Optional. To filter out false positive results and still get variety in
|
64
|
-
# matched natural language inputs for your agent, you can tune the machine
|
65
|
-
# learning classification threshold. If the returned score value is less than
|
66
|
-
# the threshold value, then a fallback intent will be triggered or, if there
|
67
|
-
# are no fallback intents defined, no intent will be triggered. The score
|
68
|
-
# values range from 0.0 (completely uncertain) to 1.0 (completely certain).
|
69
|
-
# If set to 0.0, the default of 0.3 is used.
|
70
|
-
# @!attribute [rw] api_version
|
71
|
-
# @return [Google::Cloud::Dialogflow::V2::Agent::ApiVersion]
|
72
|
-
# Optional. API version displayed in Dialogflow console. If not specified,
|
73
|
-
# V2 API is assumed. Clients are free to query different service endpoints
|
74
|
-
# for different API versions. However, bots connectors and webhook calls will
|
75
|
-
# follow the specified API version.
|
76
|
-
# @!attribute [rw] tier
|
77
|
-
# @return [Google::Cloud::Dialogflow::V2::Agent::Tier]
|
78
|
-
# Optional. The agent tier. If not specified, TIER_STANDARD is assumed.
|
79
|
-
class Agent
|
80
|
-
# API version for the agent.
|
81
|
-
module ApiVersion
|
82
|
-
# Not specified.
|
83
|
-
API_VERSION_UNSPECIFIED = 0
|
84
|
-
|
85
|
-
# Legacy V1 API.
|
86
|
-
API_VERSION_V1 = 1
|
87
|
-
|
88
|
-
# V2 API.
|
89
|
-
API_VERSION_V2 = 2
|
90
|
-
|
91
|
-
# V2beta1 API.
|
92
|
-
API_VERSION_V2_BETA_1 = 3
|
93
|
-
end
|
94
|
-
|
95
|
-
# Match mode determines how intents are detected from user queries.
|
96
|
-
module MatchMode
|
97
|
-
# Not specified.
|
98
|
-
MATCH_MODE_UNSPECIFIED = 0
|
99
|
-
|
100
|
-
# Best for agents with a small number of examples in intents and/or wide
|
101
|
-
# use of templates syntax and composite entities.
|
102
|
-
MATCH_MODE_HYBRID = 1
|
103
|
-
|
104
|
-
# Can be used for agents with a large number of examples in intents,
|
105
|
-
# especially the ones using @sys.any or very large custom entities.
|
106
|
-
MATCH_MODE_ML_ONLY = 2
|
107
|
-
end
|
108
|
-
|
109
|
-
# Represents the agent tier.
|
110
|
-
module Tier
|
111
|
-
# Not specified. This value should never be used.
|
112
|
-
TIER_UNSPECIFIED = 0
|
113
|
-
|
114
|
-
# Standard tier.
|
115
|
-
TIER_STANDARD = 1
|
116
|
-
|
117
|
-
# Enterprise tier (Essentials).
|
118
|
-
TIER_ENTERPRISE = 2
|
119
|
-
|
120
|
-
# Enterprise tier (Plus).
|
121
|
-
TIER_ENTERPRISE_PLUS = 3
|
122
|
-
end
|
123
|
-
end
|
124
|
-
|
125
|
-
# The request message for {Google::Cloud::Dialogflow::V2::Agents::GetAgent Agents::GetAgent}.
|
126
|
-
# @!attribute [rw] parent
|
127
|
-
# @return [String]
|
128
|
-
# Required. The project that the agent to fetch is associated with.
|
129
|
-
# Format: `projects/<Project ID>`.
|
130
|
-
class GetAgentRequest; end
|
131
|
-
|
132
|
-
# The request message for {Google::Cloud::Dialogflow::V2::Agents::SetAgent Agents::SetAgent}.
|
133
|
-
# @!attribute [rw] agent
|
134
|
-
# @return [Google::Cloud::Dialogflow::V2::Agent]
|
135
|
-
# Required. The agent to update.
|
136
|
-
# @!attribute [rw] update_mask
|
137
|
-
# @return [Google::Protobuf::FieldMask]
|
138
|
-
# Optional. The mask to control which fields get updated.
|
139
|
-
class SetAgentRequest; end
|
140
|
-
|
141
|
-
# The request message for {Google::Cloud::Dialogflow::V2::Agents::DeleteAgent Agents::DeleteAgent}.
|
142
|
-
# @!attribute [rw] parent
|
143
|
-
# @return [String]
|
144
|
-
# Required. The project that the agent to delete is associated with.
|
145
|
-
# Format: `projects/<Project ID>`.
|
146
|
-
class DeleteAgentRequest; end
|
147
|
-
|
148
|
-
# The request message for {Google::Cloud::Dialogflow::V2::Agents::SearchAgents Agents::SearchAgents}.
|
149
|
-
# @!attribute [rw] parent
|
150
|
-
# @return [String]
|
151
|
-
# Required. The project to list agents from.
|
152
|
-
# Format: `projects/<Project ID or '-'>`.
|
153
|
-
# @!attribute [rw] page_size
|
154
|
-
# @return [Integer]
|
155
|
-
# Optional. The maximum number of items to return in a single page. By
|
156
|
-
# default 100 and at most 1000.
|
157
|
-
# @!attribute [rw] page_token
|
158
|
-
# @return [String]
|
159
|
-
# The next_page_token value returned from a previous list request.
|
160
|
-
class SearchAgentsRequest; end
|
161
|
-
|
162
|
-
# The response message for {Google::Cloud::Dialogflow::V2::Agents::SearchAgents Agents::SearchAgents}.
|
163
|
-
# @!attribute [rw] agents
|
164
|
-
# @return [Array<Google::Cloud::Dialogflow::V2::Agent>]
|
165
|
-
# The list of agents. There will be a maximum number of items returned based
|
166
|
-
# on the page_size field in the request.
|
167
|
-
# @!attribute [rw] next_page_token
|
168
|
-
# @return [String]
|
169
|
-
# Token to retrieve the next page of results, or empty if there are no
|
170
|
-
# more results in the list.
|
171
|
-
class SearchAgentsResponse; end
|
172
|
-
|
173
|
-
# The request message for {Google::Cloud::Dialogflow::V2::Agents::TrainAgent Agents::TrainAgent}.
|
174
|
-
# @!attribute [rw] parent
|
175
|
-
# @return [String]
|
176
|
-
# Required. The project that the agent to train is associated with.
|
177
|
-
# Format: `projects/<Project ID>`.
|
178
|
-
class TrainAgentRequest; end
|
179
|
-
|
180
|
-
# The request message for {Google::Cloud::Dialogflow::V2::Agents::ExportAgent Agents::ExportAgent}.
|
181
|
-
# @!attribute [rw] parent
|
182
|
-
# @return [String]
|
183
|
-
# Required. The project that the agent to export is associated with.
|
184
|
-
# Format: `projects/<Project ID>`.
|
185
|
-
# @!attribute [rw] agent_uri
|
186
|
-
# @return [String]
|
187
|
-
# Required. The [Google Cloud Storage](https://cloud.google.com/storage/docs/)
|
188
|
-
# URI to export the agent to.
|
189
|
-
# The format of this URI must be `gs://<bucket-name>/<object-name>`.
|
190
|
-
# If left unspecified, the serialized agent is returned inline.
|
191
|
-
class ExportAgentRequest; end
|
192
|
-
|
193
|
-
# The response message for {Google::Cloud::Dialogflow::V2::Agents::ExportAgent Agents::ExportAgent}.
|
194
|
-
# @!attribute [rw] agent_uri
|
195
|
-
# @return [String]
|
196
|
-
# The URI to a file containing the exported agent. This field is populated
|
197
|
-
# only if `agent_uri` is specified in `ExportAgentRequest`.
|
198
|
-
# @!attribute [rw] agent_content
|
199
|
-
# @return [String]
|
200
|
-
# Zip compressed raw byte content for agent.
|
201
|
-
class ExportAgentResponse; end
|
202
|
-
|
203
|
-
# The request message for {Google::Cloud::Dialogflow::V2::Agents::ImportAgent Agents::ImportAgent}.
|
204
|
-
# @!attribute [rw] parent
|
205
|
-
# @return [String]
|
206
|
-
# Required. The project that the agent to import is associated with.
|
207
|
-
# Format: `projects/<Project ID>`.
|
208
|
-
# @!attribute [rw] agent_uri
|
209
|
-
# @return [String]
|
210
|
-
# The URI to a Google Cloud Storage file containing the agent to import.
|
211
|
-
# Note: The URI must start with "gs://".
|
212
|
-
# @!attribute [rw] agent_content
|
213
|
-
# @return [String]
|
214
|
-
# Zip compressed raw byte content for agent.
|
215
|
-
class ImportAgentRequest; end
|
216
|
-
|
217
|
-
# The request message for {Google::Cloud::Dialogflow::V2::Agents::RestoreAgent Agents::RestoreAgent}.
|
218
|
-
# @!attribute [rw] parent
|
219
|
-
# @return [String]
|
220
|
-
# Required. The project that the agent to restore is associated with.
|
221
|
-
# Format: `projects/<Project ID>`.
|
222
|
-
# @!attribute [rw] agent_uri
|
223
|
-
# @return [String]
|
224
|
-
# The URI to a Google Cloud Storage file containing the agent to restore.
|
225
|
-
# Note: The URI must start with "gs://".
|
226
|
-
# @!attribute [rw] agent_content
|
227
|
-
# @return [String]
|
228
|
-
# Zip compressed raw byte content for agent.
|
229
|
-
class RestoreAgentRequest; end
|
230
|
-
|
231
|
-
# The request message for {Google::Cloud::Dialogflow::V2::Agents::GetValidationResult Agents::GetValidationResult}.
|
232
|
-
# @!attribute [rw] parent
|
233
|
-
# @return [String]
|
234
|
-
# Required. The project that the agent is associated with.
|
235
|
-
# Format: `projects/<Project ID>`.
|
236
|
-
# @!attribute [rw] language_code
|
237
|
-
# @return [String]
|
238
|
-
# Optional. The language for which you want a validation result. If not
|
239
|
-
# specified, the agent's default language is used. [Many
|
240
|
-
# languages](https://cloud.google.com/dialogflow/docs/reference/language)
|
241
|
-
# are supported. Note: languages must be enabled in the agent before they can
|
242
|
-
# be used.
|
243
|
-
class GetValidationResultRequest; end
|
244
|
-
end
|
245
|
-
end
|
246
|
-
end
|
247
|
-
end
|
@@ -1,341 +0,0 @@
|
|
1
|
-
# Copyright 2020 Google LLC
|
2
|
-
#
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
# you may not use this file except in compliance with the License.
|
5
|
-
# You may obtain a copy of the License at
|
6
|
-
#
|
7
|
-
# https://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
#
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
# See the License for the specific language governing permissions and
|
13
|
-
# limitations under the License.
|
14
|
-
|
15
|
-
|
16
|
-
module Google
|
17
|
-
module Cloud
|
18
|
-
module Dialogflow
|
19
|
-
module V2
|
20
|
-
# Hints for the speech recognizer to help with recognition in a specific
|
21
|
-
# conversation state.
|
22
|
-
# @!attribute [rw] phrases
|
23
|
-
# @return [Array<String>]
|
24
|
-
# Optional. A list of strings containing words and phrases that the speech
|
25
|
-
# recognizer should recognize with higher likelihood.
|
26
|
-
#
|
27
|
-
# This list can be used to:
|
28
|
-
# * improve accuracy for words and phrases you expect the user to say,
|
29
|
-
# e.g. typical commands for your Dialogflow agent
|
30
|
-
# * add additional words to the speech recognizer vocabulary
|
31
|
-
# * ...
|
32
|
-
#
|
33
|
-
# See the [Cloud Speech
|
34
|
-
# documentation](https://cloud.google.com/speech-to-text/quotas) for usage
|
35
|
-
# limits.
|
36
|
-
# @!attribute [rw] boost
|
37
|
-
# @return [Float]
|
38
|
-
# Optional. Boost for this context compared to other contexts:
|
39
|
-
# * If the boost is positive, Dialogflow will increase the probability that
|
40
|
-
# the phrases in this context are recognized over similar sounding phrases.
|
41
|
-
# * If the boost is unspecified or non-positive, Dialogflow will not apply
|
42
|
-
# any boost.
|
43
|
-
#
|
44
|
-
# Dialogflow recommends that you use boosts in the range (0, 20] and that you
|
45
|
-
# find a value that fits your use case with binary search.
|
46
|
-
class SpeechContext; end
|
47
|
-
|
48
|
-
# Information for a word recognized by the speech recognizer.
|
49
|
-
# @!attribute [rw] word
|
50
|
-
# @return [String]
|
51
|
-
# The word this info is for.
|
52
|
-
# @!attribute [rw] start_offset
|
53
|
-
# @return [Google::Protobuf::Duration]
|
54
|
-
# Time offset relative to the beginning of the audio that corresponds to the
|
55
|
-
# start of the spoken word. This is an experimental feature and the accuracy
|
56
|
-
# of the time offset can vary.
|
57
|
-
# @!attribute [rw] end_offset
|
58
|
-
# @return [Google::Protobuf::Duration]
|
59
|
-
# Time offset relative to the beginning of the audio that corresponds to the
|
60
|
-
# end of the spoken word. This is an experimental feature and the accuracy of
|
61
|
-
# the time offset can vary.
|
62
|
-
# @!attribute [rw] confidence
|
63
|
-
# @return [Float]
|
64
|
-
# The Speech confidence between 0.0 and 1.0 for this word. A higher number
|
65
|
-
# indicates an estimated greater likelihood that the recognized word is
|
66
|
-
# correct. The default of 0.0 is a sentinel value indicating that confidence
|
67
|
-
# was not set.
|
68
|
-
#
|
69
|
-
# This field is not guaranteed to be fully stable over time for the same
|
70
|
-
# audio input. Users should also not rely on it to always be provided.
|
71
|
-
class SpeechWordInfo; end
|
72
|
-
|
73
|
-
# Instructs the speech recognizer how to process the audio content.
|
74
|
-
# @!attribute [rw] audio_encoding
|
75
|
-
# @return [Google::Cloud::Dialogflow::V2::AudioEncoding]
|
76
|
-
# Required. Audio encoding of the audio content to process.
|
77
|
-
# @!attribute [rw] sample_rate_hertz
|
78
|
-
# @return [Integer]
|
79
|
-
# Required. Sample rate (in Hertz) of the audio content sent in the query.
|
80
|
-
# Refer to
|
81
|
-
# [Cloud Speech API
|
82
|
-
# documentation](https://cloud.google.com/speech-to-text/docs/basics) for
|
83
|
-
# more details.
|
84
|
-
# @!attribute [rw] language_code
|
85
|
-
# @return [String]
|
86
|
-
# Required. The language of the supplied audio. Dialogflow does not do
|
87
|
-
# translations. See [Language
|
88
|
-
# Support](https://cloud.google.com/dialogflow/docs/reference/language)
|
89
|
-
# for a list of the currently supported language codes. Note that queries in
|
90
|
-
# the same session do not necessarily need to specify the same language.
|
91
|
-
# @!attribute [rw] enable_word_info
|
92
|
-
# @return [true, false]
|
93
|
-
# Optional. If `true`, Dialogflow returns {Google::Cloud::Dialogflow::V2::SpeechWordInfo SpeechWordInfo} in
|
94
|
-
# {Google::Cloud::Dialogflow::V2::StreamingRecognitionResult StreamingRecognitionResult} with information about the recognized speech
|
95
|
-
# words, e.g. start and end time offsets. If false or unspecified, Speech
|
96
|
-
# doesn't return any word-level information.
|
97
|
-
# @!attribute [rw] phrase_hints
|
98
|
-
# @return [Array<String>]
|
99
|
-
# Optional. A list of strings containing words and phrases that the speech
|
100
|
-
# recognizer should recognize with higher likelihood.
|
101
|
-
#
|
102
|
-
# See [the Cloud Speech
|
103
|
-
# documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
|
104
|
-
# for more details.
|
105
|
-
#
|
106
|
-
# This field is deprecated. Please use [speech_contexts]() instead. If you
|
107
|
-
# specify both [phrase_hints]() and [speech_contexts](), Dialogflow will
|
108
|
-
# treat the [phrase_hints]() as a single additional [SpeechContext]().
|
109
|
-
# @!attribute [rw] speech_contexts
|
110
|
-
# @return [Array<Google::Cloud::Dialogflow::V2::SpeechContext>]
|
111
|
-
# Optional. Context information to assist speech recognition.
|
112
|
-
#
|
113
|
-
# See [the Cloud Speech
|
114
|
-
# documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
|
115
|
-
# for more details.
|
116
|
-
# @!attribute [rw] model
|
117
|
-
# @return [String]
|
118
|
-
# Optional. Which Speech model to select for the given request. Select the
|
119
|
-
# model best suited to your domain to get best results. If a model is not
|
120
|
-
# explicitly specified, then we auto-select a model based on the parameters
|
121
|
-
# in the InputAudioConfig.
|
122
|
-
# If enhanced speech model is enabled for the agent and an enhanced
|
123
|
-
# version of the specified model for the language does not exist, then the
|
124
|
-
# speech is recognized using the standard version of the specified model.
|
125
|
-
# Refer to
|
126
|
-
# [Cloud Speech API
|
127
|
-
# documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model)
|
128
|
-
# for more details.
|
129
|
-
# @!attribute [rw] model_variant
|
130
|
-
# @return [Google::Cloud::Dialogflow::V2::SpeechModelVariant]
|
131
|
-
# Optional. Which variant of the {Google::Cloud::Dialogflow::V2::InputAudioConfig#model Speech model} to use.
|
132
|
-
# @!attribute [rw] single_utterance
|
133
|
-
# @return [true, false]
|
134
|
-
# Optional. If `false` (default), recognition does not cease until the
|
135
|
-
# client closes the stream.
|
136
|
-
# If `true`, the recognizer will detect a single spoken utterance in input
|
137
|
-
# audio. Recognition ceases when it detects the audio's voice has
|
138
|
-
# stopped or paused. In this case, once a detected intent is received, the
|
139
|
-
# client should close the stream and start a new request with a new stream as
|
140
|
-
# needed.
|
141
|
-
# Note: This setting is relevant only for streaming methods.
|
142
|
-
# Note: When specified, InputAudioConfig.single_utterance takes precedence
|
143
|
-
# over StreamingDetectIntentRequest.single_utterance.
|
144
|
-
class InputAudioConfig; end
|
145
|
-
|
146
|
-
# Description of which voice to use for speech synthesis.
|
147
|
-
# @!attribute [rw] name
|
148
|
-
# @return [String]
|
149
|
-
# Optional. The name of the voice. If not set, the service will choose a
|
150
|
-
# voice based on the other parameters such as language_code and
|
151
|
-
# {Google::Cloud::Dialogflow::V2::VoiceSelectionParams#ssml_gender ssml_gender}.
|
152
|
-
# @!attribute [rw] ssml_gender
|
153
|
-
# @return [Google::Cloud::Dialogflow::V2::SsmlVoiceGender]
|
154
|
-
# Optional. The preferred gender of the voice. If not set, the service will
|
155
|
-
# choose a voice based on the other parameters such as language_code and
|
156
|
-
# {Google::Cloud::Dialogflow::V2::VoiceSelectionParams#name name}. Note that this is only a preference, not requirement. If a
|
157
|
-
# voice of the appropriate gender is not available, the synthesizer should
|
158
|
-
# substitute a voice with a different gender rather than failing the request.
|
159
|
-
class VoiceSelectionParams; end
|
160
|
-
|
161
|
-
# Configuration of how speech should be synthesized.
|
162
|
-
# @!attribute [rw] speaking_rate
|
163
|
-
# @return [Float]
|
164
|
-
# Optional. Speaking rate/speed, in the range [0.25, 4.0]. 1.0 is the normal
|
165
|
-
# native speed supported by the specific voice. 2.0 is twice as fast, and
|
166
|
-
# 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 speed. Any
|
167
|
-
# other values < 0.25 or > 4.0 will return an error.
|
168
|
-
# @!attribute [rw] pitch
|
169
|
-
# @return [Float]
|
170
|
-
# Optional. Speaking pitch, in the range [-20.0, 20.0]. 20 means increase 20
|
171
|
-
# semitones from the original pitch. -20 means decrease 20 semitones from the
|
172
|
-
# original pitch.
|
173
|
-
# @!attribute [rw] volume_gain_db
|
174
|
-
# @return [Float]
|
175
|
-
# Optional. Volume gain (in dB) of the normal native volume supported by the
|
176
|
-
# specific voice, in the range [-96.0, 16.0]. If unset, or set to a value of
|
177
|
-
# 0.0 (dB), will play at normal native signal amplitude. A value of -6.0 (dB)
|
178
|
-
# will play at approximately half the amplitude of the normal native signal
|
179
|
-
# amplitude. A value of +6.0 (dB) will play at approximately twice the
|
180
|
-
# amplitude of the normal native signal amplitude. We strongly recommend not
|
181
|
-
# to exceed +10 (dB) as there's usually no effective increase in loudness for
|
182
|
-
# any value greater than that.
|
183
|
-
# @!attribute [rw] effects_profile_id
|
184
|
-
# @return [Array<String>]
|
185
|
-
# Optional. An identifier which selects 'audio effects' profiles that are
|
186
|
-
# applied on (post synthesized) text to speech. Effects are applied on top of
|
187
|
-
# each other in the order they are given.
|
188
|
-
# @!attribute [rw] voice
|
189
|
-
# @return [Google::Cloud::Dialogflow::V2::VoiceSelectionParams]
|
190
|
-
# Optional. The desired voice of the synthesized audio.
|
191
|
-
class SynthesizeSpeechConfig; end
|
192
|
-
|
193
|
-
# Instructs the speech synthesizer on how to generate the output audio content.
|
194
|
-
# If this audio config is supplied in a request, it overrides all existing
|
195
|
-
# text-to-speech settings applied to the agent.
|
196
|
-
# @!attribute [rw] audio_encoding
|
197
|
-
# @return [Google::Cloud::Dialogflow::V2::OutputAudioEncoding]
|
198
|
-
# Required. Audio encoding of the synthesized audio content.
|
199
|
-
# @!attribute [rw] sample_rate_hertz
|
200
|
-
# @return [Integer]
|
201
|
-
# The synthesis sample rate (in hertz) for this audio. If not
|
202
|
-
# provided, then the synthesizer will use the default sample rate based on
|
203
|
-
# the audio encoding. If this is different from the voice's natural sample
|
204
|
-
# rate, then the synthesizer will honor this request by converting to the
|
205
|
-
# desired sample rate (which might result in worse audio quality).
|
206
|
-
# @!attribute [rw] synthesize_speech_config
|
207
|
-
# @return [Google::Cloud::Dialogflow::V2::SynthesizeSpeechConfig]
|
208
|
-
# Configuration of how speech should be synthesized.
|
209
|
-
class OutputAudioConfig; end
|
210
|
-
|
211
|
-
# Audio encoding of the audio content sent in the conversational query request.
|
212
|
-
# Refer to the
|
213
|
-
# [Cloud Speech API
|
214
|
-
# documentation](https://cloud.google.com/speech-to-text/docs/basics) for more
|
215
|
-
# details.
|
216
|
-
module AudioEncoding
|
217
|
-
# Not specified.
|
218
|
-
AUDIO_ENCODING_UNSPECIFIED = 0
|
219
|
-
|
220
|
-
# Uncompressed 16-bit signed little-endian samples (Linear PCM).
|
221
|
-
AUDIO_ENCODING_LINEAR_16 = 1
|
222
|
-
|
223
|
-
# [`FLAC`](https://xiph.org/flac/documentation.html) (Free Lossless Audio
|
224
|
-
# Codec) is the recommended encoding because it is lossless (therefore
|
225
|
-
# recognition is not compromised) and requires only about half the
|
226
|
-
# bandwidth of `LINEAR16`. `FLAC` stream encoding supports 16-bit and
|
227
|
-
# 24-bit samples, however, not all fields in `STREAMINFO` are supported.
|
228
|
-
AUDIO_ENCODING_FLAC = 2
|
229
|
-
|
230
|
-
# 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law.
|
231
|
-
AUDIO_ENCODING_MULAW = 3
|
232
|
-
|
233
|
-
# Adaptive Multi-Rate Narrowband codec. `sample_rate_hertz` must be 8000.
|
234
|
-
AUDIO_ENCODING_AMR = 4
|
235
|
-
|
236
|
-
# Adaptive Multi-Rate Wideband codec. `sample_rate_hertz` must be 16000.
|
237
|
-
AUDIO_ENCODING_AMR_WB = 5
|
238
|
-
|
239
|
-
# Opus encoded audio frames in Ogg container
|
240
|
-
# ([OggOpus](https://wiki.xiph.org/OggOpus)).
|
241
|
-
# `sample_rate_hertz` must be 16000.
|
242
|
-
AUDIO_ENCODING_OGG_OPUS = 6
|
243
|
-
|
244
|
-
# Although the use of lossy encodings is not recommended, if a very low
|
245
|
-
# bitrate encoding is required, `OGG_OPUS` is highly preferred over
|
246
|
-
# Speex encoding. The [Speex](https://speex.org/) encoding supported by
|
247
|
-
# Dialogflow API has a header byte in each block, as in MIME type
|
248
|
-
# `audio/x-speex-with-header-byte`.
|
249
|
-
# It is a variant of the RTP Speex encoding defined in
|
250
|
-
# [RFC 5574](https://tools.ietf.org/html/rfc5574).
|
251
|
-
# The stream is a sequence of blocks, one block per RTP packet. Each block
|
252
|
-
# starts with a byte containing the length of the block, in bytes, followed
|
253
|
-
# by one or more frames of Speex data, padded to an integral number of
|
254
|
-
# bytes (octets) as specified in RFC 5574. In other words, each RTP header
|
255
|
-
# is replaced with a single byte containing the block length. Only Speex
|
256
|
-
# wideband is supported. `sample_rate_hertz` must be 16000.
|
257
|
-
AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE = 7
|
258
|
-
end
|
259
|
-
|
260
|
-
# Audio encoding of the output audio format in Text-To-Speech.
|
261
|
-
module OutputAudioEncoding
|
262
|
-
# Not specified.
|
263
|
-
OUTPUT_AUDIO_ENCODING_UNSPECIFIED = 0
|
264
|
-
|
265
|
-
# Uncompressed 16-bit signed little-endian samples (Linear PCM).
|
266
|
-
# Audio content returned as LINEAR16 also contains a WAV header.
|
267
|
-
OUTPUT_AUDIO_ENCODING_LINEAR_16 = 1
|
268
|
-
|
269
|
-
# MP3 audio at 32kbps.
|
270
|
-
OUTPUT_AUDIO_ENCODING_MP3 = 2
|
271
|
-
|
272
|
-
# Opus encoded audio wrapped in an ogg container. The result will be a
|
273
|
-
# file which can be played natively on Android, and in browsers (at least
|
274
|
-
# Chrome and Firefox). The quality of the encoding is considerably higher
|
275
|
-
# than MP3 while using approximately the same bitrate.
|
276
|
-
OUTPUT_AUDIO_ENCODING_OGG_OPUS = 3
|
277
|
-
end
|
278
|
-
|
279
|
-
# Variant of the specified {Google::Cloud::Dialogflow::V2::InputAudioConfig#model Speech model} to use.
|
280
|
-
#
|
281
|
-
# See the [Cloud Speech
|
282
|
-
# documentation](https://cloud.google.com/speech-to-text/docs/enhanced-models)
|
283
|
-
# for which models have different variants. For example, the "phone_call" model
|
284
|
-
# has both a standard and an enhanced variant. When you use an enhanced model,
|
285
|
-
# you will generally receive higher quality results than for a standard model.
|
286
|
-
module SpeechModelVariant
|
287
|
-
# No model variant specified. In this case Dialogflow defaults to
|
288
|
-
# USE_BEST_AVAILABLE.
|
289
|
-
SPEECH_MODEL_VARIANT_UNSPECIFIED = 0
|
290
|
-
|
291
|
-
# Use the best available variant of the [Speech
|
292
|
-
# model][InputAudioConfig.model] that the caller is eligible for.
|
293
|
-
#
|
294
|
-
# Please see the [Dialogflow
|
295
|
-
# docs](https://cloud.google.com/dialogflow/docs/data-logging) for
|
296
|
-
# how to make your project eligible for enhanced models.
|
297
|
-
USE_BEST_AVAILABLE = 1
|
298
|
-
|
299
|
-
# Use standard model variant even if an enhanced model is available. See the
|
300
|
-
# [Cloud Speech
|
301
|
-
# documentation](https://cloud.google.com/speech-to-text/docs/enhanced-models)
|
302
|
-
# for details about enhanced models.
|
303
|
-
USE_STANDARD = 2
|
304
|
-
|
305
|
-
# Use an enhanced model variant:
|
306
|
-
#
|
307
|
-
# * If an enhanced variant does not exist for the given
|
308
|
-
# {Google::Cloud::Dialogflow::V2::InputAudioConfig#model model} and request language, Dialogflow falls
|
309
|
-
# back to the standard variant.
|
310
|
-
#
|
311
|
-
# The [Cloud Speech
|
312
|
-
# documentation](https://cloud.google.com/speech-to-text/docs/enhanced-models)
|
313
|
-
# describes which models have enhanced variants.
|
314
|
-
#
|
315
|
-
# * If the API caller isn't eligible for enhanced models, Dialogflow returns
|
316
|
-
# an error. Please see the [Dialogflow
|
317
|
-
# docs](https://cloud.google.com/dialogflow/docs/data-logging)
|
318
|
-
# for how to make your project eligible.
|
319
|
-
USE_ENHANCED = 3
|
320
|
-
end
|
321
|
-
|
322
|
-
# Gender of the voice as described in
|
323
|
-
# [SSML voice element](https://www.w3.org/TR/speech-synthesis11/#edef_voice).
|
324
|
-
module SsmlVoiceGender
|
325
|
-
# An unspecified gender, which means that the client doesn't care which
|
326
|
-
# gender the selected voice will have.
|
327
|
-
SSML_VOICE_GENDER_UNSPECIFIED = 0
|
328
|
-
|
329
|
-
# A male voice.
|
330
|
-
SSML_VOICE_GENDER_MALE = 1
|
331
|
-
|
332
|
-
# A female voice.
|
333
|
-
SSML_VOICE_GENDER_FEMALE = 2
|
334
|
-
|
335
|
-
# A gender-neutral voice.
|
336
|
-
SSML_VOICE_GENDER_NEUTRAL = 3
|
337
|
-
end
|
338
|
-
end
|
339
|
-
end
|
340
|
-
end
|
341
|
-
end
|