google-cloud-dialogflow 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/cloud/dialogflow/v2/agent_pb.rb +0 -1
- data/lib/google/cloud/dialogflow/v2/agents_client.rb +2 -1
- data/lib/google/cloud/dialogflow/v2/audio_config_pb.rb +26 -0
- data/lib/google/cloud/dialogflow/v2/context_pb.rb +0 -1
- data/lib/google/cloud/dialogflow/v2/contexts_client.rb +2 -1
- data/lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/audio_config.rb +124 -1
- data/lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/intent.rb +5 -2
- data/lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/session.rb +4 -78
- data/lib/google/cloud/dialogflow/v2/entity_type_pb.rb +0 -1
- data/lib/google/cloud/dialogflow/v2/entity_types_client.rb +2 -1
- data/lib/google/cloud/dialogflow/v2/intent_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/intents_client.rb +2 -1
- data/lib/google/cloud/dialogflow/v2/session_entity_type_pb.rb +0 -1
- data/lib/google/cloud/dialogflow/v2/session_entity_types_client.rb +2 -1
- data/lib/google/cloud/dialogflow/v2/session_pb.rb +0 -19
- data/lib/google/cloud/dialogflow/v2/sessions_client.rb +2 -1
- data/lib/google/cloud/dialogflow/version.rb +22 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4b78bb2993631f44a2f027980b03035c5b9212f9873f2f973387d00667780f7f
|
4
|
+
data.tar.gz: dc12bcf8e4e32772a8ed925d5afe8e3ab8e436a387e0e5af35af17913e14152f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 86021c6ba78ce2101a4ea875424fa6f70d040a7ac969232a8f790c8be7238255e1d7711bfc62a19066d475bcdb64c290106fbc568fdbd8a5d46fcc1224917b9c
|
7
|
+
data.tar.gz: 240a26fbf17b5ce988709bf9b6cc9c80a27aeabfdd8d846b1be6582b0465f9f72f16f66ec691b8c3a4ac7bc542eb32cf252c2b199e9364793425df35b2762165
|
@@ -29,6 +29,7 @@ require "google/longrunning/operations_client"
|
|
29
29
|
|
30
30
|
require "google/cloud/dialogflow/v2/agent_pb"
|
31
31
|
require "google/cloud/dialogflow/v2/credentials"
|
32
|
+
require "google/cloud/dialogflow/version"
|
32
33
|
|
33
34
|
module Google
|
34
35
|
module Cloud
|
@@ -188,7 +189,7 @@ module Google
|
|
188
189
|
updater_proc = credentials.updater_proc
|
189
190
|
end
|
190
191
|
|
191
|
-
package_version =
|
192
|
+
package_version = Google::Cloud::Dialogflow::VERSION
|
192
193
|
|
193
194
|
google_api_client = "gl-ruby/#{RUBY_VERSION}"
|
194
195
|
google_api_client << " #{lib_name}/#{lib_version}" if lib_name
|
@@ -6,6 +6,13 @@ require 'google/protobuf'
|
|
6
6
|
|
7
7
|
require 'google/api/annotations_pb'
|
8
8
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
9
|
+
add_message "google.cloud.dialogflow.v2.InputAudioConfig" do
|
10
|
+
optional :audio_encoding, :enum, 1, "google.cloud.dialogflow.v2.AudioEncoding"
|
11
|
+
optional :sample_rate_hertz, :int32, 2
|
12
|
+
optional :language_code, :string, 3
|
13
|
+
repeated :phrase_hints, :string, 4
|
14
|
+
optional :model_variant, :enum, 10, "google.cloud.dialogflow.v2.SpeechModelVariant"
|
15
|
+
end
|
9
16
|
add_message "google.cloud.dialogflow.v2.VoiceSelectionParams" do
|
10
17
|
optional :name, :string, 1
|
11
18
|
optional :ssml_gender, :enum, 2, "google.cloud.dialogflow.v2.SsmlVoiceGender"
|
@@ -22,6 +29,22 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
22
29
|
optional :sample_rate_hertz, :int32, 2
|
23
30
|
optional :synthesize_speech_config, :message, 3, "google.cloud.dialogflow.v2.SynthesizeSpeechConfig"
|
24
31
|
end
|
32
|
+
add_enum "google.cloud.dialogflow.v2.AudioEncoding" do
|
33
|
+
value :AUDIO_ENCODING_UNSPECIFIED, 0
|
34
|
+
value :AUDIO_ENCODING_LINEAR_16, 1
|
35
|
+
value :AUDIO_ENCODING_FLAC, 2
|
36
|
+
value :AUDIO_ENCODING_MULAW, 3
|
37
|
+
value :AUDIO_ENCODING_AMR, 4
|
38
|
+
value :AUDIO_ENCODING_AMR_WB, 5
|
39
|
+
value :AUDIO_ENCODING_OGG_OPUS, 6
|
40
|
+
value :AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE, 7
|
41
|
+
end
|
42
|
+
add_enum "google.cloud.dialogflow.v2.SpeechModelVariant" do
|
43
|
+
value :SPEECH_MODEL_VARIANT_UNSPECIFIED, 0
|
44
|
+
value :USE_BEST_AVAILABLE, 1
|
45
|
+
value :USE_STANDARD, 2
|
46
|
+
value :USE_ENHANCED, 3
|
47
|
+
end
|
25
48
|
add_enum "google.cloud.dialogflow.v2.SsmlVoiceGender" do
|
26
49
|
value :SSML_VOICE_GENDER_UNSPECIFIED, 0
|
27
50
|
value :SSML_VOICE_GENDER_MALE, 1
|
@@ -40,9 +63,12 @@ module Google
|
|
40
63
|
module Cloud
|
41
64
|
module Dialogflow
|
42
65
|
module V2
|
66
|
+
InputAudioConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.InputAudioConfig").msgclass
|
43
67
|
VoiceSelectionParams = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.VoiceSelectionParams").msgclass
|
44
68
|
SynthesizeSpeechConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.SynthesizeSpeechConfig").msgclass
|
45
69
|
OutputAudioConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.OutputAudioConfig").msgclass
|
70
|
+
AudioEncoding = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.AudioEncoding").enummodule
|
71
|
+
SpeechModelVariant = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.SpeechModelVariant").enummodule
|
46
72
|
SsmlVoiceGender = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.SsmlVoiceGender").enummodule
|
47
73
|
OutputAudioEncoding = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.OutputAudioEncoding").enummodule
|
48
74
|
end
|
@@ -27,6 +27,7 @@ require "google/gax"
|
|
27
27
|
|
28
28
|
require "google/cloud/dialogflow/v2/context_pb"
|
29
29
|
require "google/cloud/dialogflow/v2/credentials"
|
30
|
+
require "google/cloud/dialogflow/version"
|
30
31
|
|
31
32
|
module Google
|
32
33
|
module Cloud
|
@@ -183,7 +184,7 @@ module Google
|
|
183
184
|
updater_proc = credentials.updater_proc
|
184
185
|
end
|
185
186
|
|
186
|
-
package_version =
|
187
|
+
package_version = Google::Cloud::Dialogflow::VERSION
|
187
188
|
|
188
189
|
google_api_client = "gl-ruby/#{RUBY_VERSION}"
|
189
190
|
google_api_client << " #{lib_name}/#{lib_version}" if lib_name
|
@@ -17,6 +17,37 @@ module Google
|
|
17
17
|
module Cloud
|
18
18
|
module Dialogflow
|
19
19
|
module V2
|
20
|
+
# Instructs the speech recognizer how to process the audio content.
|
21
|
+
# @!attribute [rw] audio_encoding
|
22
|
+
# @return [Google::Cloud::Dialogflow::V2::AudioEncoding]
|
23
|
+
# Required. Audio encoding of the audio content to process.
|
24
|
+
# @!attribute [rw] sample_rate_hertz
|
25
|
+
# @return [Integer]
|
26
|
+
# Required. Sample rate (in Hertz) of the audio content sent in the query.
|
27
|
+
# Refer to
|
28
|
+
# [Cloud Speech API
|
29
|
+
# documentation](https://cloud.google.com/speech-to-text/docs/basics) for
|
30
|
+
# more details.
|
31
|
+
# @!attribute [rw] language_code
|
32
|
+
# @return [String]
|
33
|
+
# Required. The language of the supplied audio. Dialogflow does not do
|
34
|
+
# translations. See [Language
|
35
|
+
# Support](https://cloud.google.com/dialogflow-enterprise/docs/reference/language)
|
36
|
+
# for a list of the currently supported language codes. Note that queries in
|
37
|
+
# the same session do not necessarily need to specify the same language.
|
38
|
+
# @!attribute [rw] phrase_hints
|
39
|
+
# @return [Array<String>]
|
40
|
+
# Optional. The collection of phrase hints which are used to boost accuracy
|
41
|
+
# of speech recognition.
|
42
|
+
# Refer to
|
43
|
+
# [Cloud Speech API
|
44
|
+
# documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
|
45
|
+
# for more details.
|
46
|
+
# @!attribute [rw] model_variant
|
47
|
+
# @return [Google::Cloud::Dialogflow::V2::SpeechModelVariant]
|
48
|
+
# Optional. Which variant of the {Google::Cloud::Dialogflow::V2::InputAudioConfig#model Speech model} to use.
|
49
|
+
class InputAudioConfig; end
|
50
|
+
|
20
51
|
# Description of which voice to use for speech synthesis.
|
21
52
|
# @!attribute [rw] name
|
22
53
|
# @return [String]
|
@@ -63,7 +94,7 @@ module Google
|
|
63
94
|
# Optional. The desired voice of the synthesized audio.
|
64
95
|
class SynthesizeSpeechConfig; end
|
65
96
|
|
66
|
-
# Instructs the speech synthesizer how to generate the output audio content.
|
97
|
+
# Instructs the speech synthesizer on how to generate the output audio content.
|
67
98
|
# @!attribute [rw] audio_encoding
|
68
99
|
# @return [Google::Cloud::Dialogflow::V2::OutputAudioEncoding]
|
69
100
|
# Required. Audio encoding of the synthesized audio content.
|
@@ -79,6 +110,55 @@ module Google
|
|
79
110
|
# Optional. Configuration of how speech should be synthesized.
|
80
111
|
class OutputAudioConfig; end
|
81
112
|
|
113
|
+
# Audio encoding of the audio content sent in the conversational query request.
|
114
|
+
# Refer to the
|
115
|
+
# [Cloud Speech API
|
116
|
+
# documentation](https://cloud.google.com/speech-to-text/docs/basics) for more
|
117
|
+
# details.
|
118
|
+
module AudioEncoding
|
119
|
+
# Not specified.
|
120
|
+
AUDIO_ENCODING_UNSPECIFIED = 0
|
121
|
+
|
122
|
+
# Uncompressed 16-bit signed little-endian samples (Linear PCM).
|
123
|
+
AUDIO_ENCODING_LINEAR_16 = 1
|
124
|
+
|
125
|
+
# [`FLAC`](https://xiph.org/flac/documentation.html) (Free Lossless Audio
|
126
|
+
# Codec) is the recommended encoding because it is lossless (therefore
|
127
|
+
# recognition is not compromised) and requires only about half the
|
128
|
+
# bandwidth of `LINEAR16`. `FLAC` stream encoding supports 16-bit and
|
129
|
+
# 24-bit samples, however, not all fields in `STREAMINFO` are supported.
|
130
|
+
AUDIO_ENCODING_FLAC = 2
|
131
|
+
|
132
|
+
# 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law.
|
133
|
+
AUDIO_ENCODING_MULAW = 3
|
134
|
+
|
135
|
+
# Adaptive Multi-Rate Narrowband codec. `sample_rate_hertz` must be 8000.
|
136
|
+
AUDIO_ENCODING_AMR = 4
|
137
|
+
|
138
|
+
# Adaptive Multi-Rate Wideband codec. `sample_rate_hertz` must be 16000.
|
139
|
+
AUDIO_ENCODING_AMR_WB = 5
|
140
|
+
|
141
|
+
# Opus encoded audio frames in Ogg container
|
142
|
+
# ([OggOpus](https://wiki.xiph.org/OggOpus)).
|
143
|
+
# `sample_rate_hertz` must be 16000.
|
144
|
+
AUDIO_ENCODING_OGG_OPUS = 6
|
145
|
+
|
146
|
+
# Although the use of lossy encodings is not recommended, if a very low
|
147
|
+
# bitrate encoding is required, `OGG_OPUS` is highly preferred over
|
148
|
+
# Speex encoding. The [Speex](https://speex.org/) encoding supported by
|
149
|
+
# Dialogflow API has a header byte in each block, as in MIME type
|
150
|
+
# `audio/x-speex-with-header-byte`.
|
151
|
+
# It is a variant of the RTP Speex encoding defined in
|
152
|
+
# [RFC 5574](https://tools.ietf.org/html/rfc5574).
|
153
|
+
# The stream is a sequence of blocks, one block per RTP packet. Each block
|
154
|
+
# starts with a byte containing the length of the block, in bytes, followed
|
155
|
+
# by one or more frames of Speex data, padded to an integral number of
|
156
|
+
# bytes (octets) as specified in RFC 5574. In other words, each RTP header
|
157
|
+
# is replaced with a single byte containing the block length. Only Speex
|
158
|
+
# wideband is supported. `sample_rate_hertz` must be 16000.
|
159
|
+
AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE = 7
|
160
|
+
end
|
161
|
+
|
82
162
|
# Audio encoding of the output audio format in Text-To-Speech.
|
83
163
|
module OutputAudioEncoding
|
84
164
|
# Not specified.
|
@@ -98,6 +178,49 @@ module Google
|
|
98
178
|
OUTPUT_AUDIO_ENCODING_OGG_OPUS = 3
|
99
179
|
end
|
100
180
|
|
181
|
+
# Variant of the specified {Google::Cloud::Dialogflow::V2::InputAudioConfig#model Speech model} to use.
|
182
|
+
#
|
183
|
+
# See the [Cloud Speech
|
184
|
+
# documentation](https://cloud.google.com/speech-to-text/docs/enhanced-models)
|
185
|
+
# for which models have different variants. For example, the "phone_call" model
|
186
|
+
# has both a standard and an enhanced variant. When you use an enhanced model,
|
187
|
+
# you will generally receive higher quality results than for a standard model.
|
188
|
+
module SpeechModelVariant
|
189
|
+
# No model variant specified. In this case Dialogflow defaults to
|
190
|
+
# USE_BEST_AVAILABLE.
|
191
|
+
SPEECH_MODEL_VARIANT_UNSPECIFIED = 0
|
192
|
+
|
193
|
+
# Use the best available variant of the [Speech
|
194
|
+
# model][InputAudioConfig.model] that the caller is eligible for.
|
195
|
+
#
|
196
|
+
# Please see the [Dialogflow
|
197
|
+
# docs](https://cloud.google.com/dialogflow-enterprise/docs/data-logging) for
|
198
|
+
# how to make your project eligible for enhanced models.
|
199
|
+
USE_BEST_AVAILABLE = 1
|
200
|
+
|
201
|
+
# Use standard model variant even if an enhanced model is available. See the
|
202
|
+
# [Cloud Speech
|
203
|
+
# documentation](https://cloud.google.com/speech-to-text/docs/enhanced-models)
|
204
|
+
# for details about enhanced models.
|
205
|
+
USE_STANDARD = 2
|
206
|
+
|
207
|
+
# Use an enhanced model variant:
|
208
|
+
#
|
209
|
+
# * If an enhanced variant does not exist for the given
|
210
|
+
# {Google::Cloud::Dialogflow::V2::InputAudioConfig#model model} and request language, Dialogflow falls
|
211
|
+
# back to the standard variant.
|
212
|
+
#
|
213
|
+
# The [Cloud Speech
|
214
|
+
# documentation](https://cloud.google.com/speech-to-text/docs/enhanced-models)
|
215
|
+
# describes which models have enhanced variants.
|
216
|
+
#
|
217
|
+
# * If the API caller isn't eligible for enhanced models, Dialogflow returns
|
218
|
+
# an error. Please see the [Dialogflow
|
219
|
+
# docs](https://cloud.google.com/dialogflow-enterprise/docs/data-logging)
|
220
|
+
# for how to make your project eligible.
|
221
|
+
USE_ENHANCED = 3
|
222
|
+
end
|
223
|
+
|
101
224
|
# Gender of the voice as described in
|
102
225
|
# [SSML voice element](https://www.w3.org/TR/speech-synthesis11/#edef_voice).
|
103
226
|
module SsmlVoiceGender
|
@@ -86,8 +86,8 @@ module Google
|
|
86
86
|
# `Response` field in the Dialogflow console.
|
87
87
|
# @!attribute [rw] default_response_platforms
|
88
88
|
# @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::Platform>]
|
89
|
-
# Optional. The list of platforms for which the first
|
90
|
-
#
|
89
|
+
# Optional. The list of platforms for which the first responses will be
|
90
|
+
# copied from the messages in PLATFORM_UNSPECIFIED (i.e. default platform).
|
91
91
|
# @!attribute [rw] root_followup_intent_name
|
92
92
|
# @return [String]
|
93
93
|
# Read-only. The unique identifier of the root intent in the chain of
|
@@ -539,6 +539,9 @@ module Google
|
|
539
539
|
# }
|
540
540
|
# }</pre>
|
541
541
|
ACTIONS_ON_GOOGLE = 8
|
542
|
+
|
543
|
+
# Google Hangouts.
|
544
|
+
GOOGLE_HANGOUTS = 11
|
542
545
|
end
|
543
546
|
end
|
544
547
|
|
@@ -131,12 +131,14 @@ module Google
|
|
131
131
|
# @!attribute [rw] query_text
|
132
132
|
# @return [String]
|
133
133
|
# The original conversational query text:
|
134
|
+
#
|
134
135
|
# * If natural language text was provided as input, `query_text` contains
|
135
136
|
# a copy of the input.
|
136
137
|
# * If natural language speech audio was provided as input, `query_text`
|
137
138
|
# contains the speech recognition result. If speech recognizer produced
|
138
139
|
# multiple alternatives, a particular one is picked.
|
139
|
-
# * If
|
140
|
+
# * If automatic spell correction is enabled, `query_text` will contain the
|
141
|
+
# corrected user input.
|
140
142
|
# @!attribute [rw] language_code
|
141
143
|
# @return [String]
|
142
144
|
# The language that was triggered during intent detection.
|
@@ -163,6 +165,7 @@ module Google
|
|
163
165
|
# @!attribute [rw] all_required_params_present
|
164
166
|
# @return [true, false]
|
165
167
|
# This field is set to:
|
168
|
+
#
|
166
169
|
# * `false` if the matched intent has required parameters and not all of
|
167
170
|
# the required parameter values have been collected.
|
168
171
|
# * `true` if all required parameter values have been collected, or if the
|
@@ -374,34 +377,6 @@ module Google
|
|
374
377
|
end
|
375
378
|
end
|
376
379
|
|
377
|
-
# Instructs the speech recognizer how to process the audio content.
|
378
|
-
# @!attribute [rw] audio_encoding
|
379
|
-
# @return [Google::Cloud::Dialogflow::V2::AudioEncoding]
|
380
|
-
# Required. Audio encoding of the audio content to process.
|
381
|
-
# @!attribute [rw] sample_rate_hertz
|
382
|
-
# @return [Integer]
|
383
|
-
# Required. Sample rate (in Hertz) of the audio content sent in the query.
|
384
|
-
# Refer to
|
385
|
-
# [Cloud Speech API
|
386
|
-
# documentation](https://cloud.google.com/speech-to-text/docs/basics) for
|
387
|
-
# more details.
|
388
|
-
# @!attribute [rw] language_code
|
389
|
-
# @return [String]
|
390
|
-
# Required. The language of the supplied audio. Dialogflow does not do
|
391
|
-
# translations. See [Language
|
392
|
-
# Support](https://cloud.google.com/dialogflow-enterprise/docs/reference/language)
|
393
|
-
# for a list of the currently supported language codes. Note that queries in
|
394
|
-
# the same session do not necessarily need to specify the same language.
|
395
|
-
# @!attribute [rw] phrase_hints
|
396
|
-
# @return [Array<String>]
|
397
|
-
# Optional. The collection of phrase hints which are used to boost accuracy
|
398
|
-
# of speech recognition.
|
399
|
-
# Refer to
|
400
|
-
# [Cloud Speech API
|
401
|
-
# documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
|
402
|
-
# for more details.
|
403
|
-
class InputAudioConfig; end
|
404
|
-
|
405
380
|
# Represents the natural language text to be processed.
|
406
381
|
# @!attribute [rw] text
|
407
382
|
# @return [String]
|
@@ -460,55 +435,6 @@ module Google
|
|
460
435
|
# A non-negative number in the [0, +inf) range, which represents the absolute
|
461
436
|
# magnitude of sentiment, regardless of score (positive or negative).
|
462
437
|
class Sentiment; end
|
463
|
-
|
464
|
-
# Audio encoding of the audio content sent in the conversational query request.
|
465
|
-
# Refer to the
|
466
|
-
# [Cloud Speech API
|
467
|
-
# documentation](https://cloud.google.com/speech-to-text/docs/basics) for more
|
468
|
-
# details.
|
469
|
-
module AudioEncoding
|
470
|
-
# Not specified.
|
471
|
-
AUDIO_ENCODING_UNSPECIFIED = 0
|
472
|
-
|
473
|
-
# Uncompressed 16-bit signed little-endian samples (Linear PCM).
|
474
|
-
AUDIO_ENCODING_LINEAR_16 = 1
|
475
|
-
|
476
|
-
# [`FLAC`](https://xiph.org/flac/documentation.html) (Free Lossless Audio
|
477
|
-
# Codec) is the recommended encoding because it is lossless (therefore
|
478
|
-
# recognition is not compromised) and requires only about half the
|
479
|
-
# bandwidth of `LINEAR16`. `FLAC` stream encoding supports 16-bit and
|
480
|
-
# 24-bit samples, however, not all fields in `STREAMINFO` are supported.
|
481
|
-
AUDIO_ENCODING_FLAC = 2
|
482
|
-
|
483
|
-
# 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law.
|
484
|
-
AUDIO_ENCODING_MULAW = 3
|
485
|
-
|
486
|
-
# Adaptive Multi-Rate Narrowband codec. `sample_rate_hertz` must be 8000.
|
487
|
-
AUDIO_ENCODING_AMR = 4
|
488
|
-
|
489
|
-
# Adaptive Multi-Rate Wideband codec. `sample_rate_hertz` must be 16000.
|
490
|
-
AUDIO_ENCODING_AMR_WB = 5
|
491
|
-
|
492
|
-
# Opus encoded audio frames in Ogg container
|
493
|
-
# ([OggOpus](https://wiki.xiph.org/OggOpus)).
|
494
|
-
# `sample_rate_hertz` must be 16000.
|
495
|
-
AUDIO_ENCODING_OGG_OPUS = 6
|
496
|
-
|
497
|
-
# Although the use of lossy encodings is not recommended, if a very low
|
498
|
-
# bitrate encoding is required, `OGG_OPUS` is highly preferred over
|
499
|
-
# Speex encoding. The [Speex](https://speex.org/) encoding supported by
|
500
|
-
# Dialogflow API has a header byte in each block, as in MIME type
|
501
|
-
# `audio/x-speex-with-header-byte`.
|
502
|
-
# It is a variant of the RTP Speex encoding defined in
|
503
|
-
# [RFC 5574](https://tools.ietf.org/html/rfc5574).
|
504
|
-
# The stream is a sequence of blocks, one block per RTP packet. Each block
|
505
|
-
# starts with a byte containing the length of the block, in bytes, followed
|
506
|
-
# by one or more frames of Speex data, padded to an integral number of
|
507
|
-
# bytes (octets) as specified in RFC 5574. In other words, each RTP header
|
508
|
-
# is replaced with a single byte containing the block length. Only Speex
|
509
|
-
# wideband is supported. `sample_rate_hertz` must be 16000.
|
510
|
-
AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE = 7
|
511
|
-
end
|
512
438
|
end
|
513
439
|
end
|
514
440
|
end
|
@@ -29,6 +29,7 @@ require "google/longrunning/operations_client"
|
|
29
29
|
|
30
30
|
require "google/cloud/dialogflow/v2/entity_type_pb"
|
31
31
|
require "google/cloud/dialogflow/v2/credentials"
|
32
|
+
require "google/cloud/dialogflow/version"
|
32
33
|
|
33
34
|
module Google
|
34
35
|
module Cloud
|
@@ -205,7 +206,7 @@ module Google
|
|
205
206
|
updater_proc = credentials.updater_proc
|
206
207
|
end
|
207
208
|
|
208
|
-
package_version =
|
209
|
+
package_version = Google::Cloud::Dialogflow::VERSION
|
209
210
|
|
210
211
|
google_api_client = "gl-ruby/#{RUBY_VERSION}"
|
211
212
|
google_api_client << " #{lib_name}/#{lib_version}" if lib_name
|
@@ -5,7 +5,6 @@
|
|
5
5
|
require 'google/protobuf'
|
6
6
|
|
7
7
|
require 'google/api/annotations_pb'
|
8
|
-
require 'google/api/resource_pb'
|
9
8
|
require 'google/cloud/dialogflow/v2/context_pb'
|
10
9
|
require 'google/longrunning/operations_pb'
|
11
10
|
require 'google/protobuf/duration_pb'
|
@@ -162,6 +161,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
162
161
|
value :LINE, 6
|
163
162
|
value :VIBER, 7
|
164
163
|
value :ACTIONS_ON_GOOGLE, 8
|
164
|
+
value :GOOGLE_HANGOUTS, 11
|
165
165
|
end
|
166
166
|
add_message "google.cloud.dialogflow.v2.Intent.FollowupIntentInfo" do
|
167
167
|
optional :followup_intent_name, :string, 1
|
@@ -29,6 +29,7 @@ require "google/longrunning/operations_client"
|
|
29
29
|
|
30
30
|
require "google/cloud/dialogflow/v2/intent_pb"
|
31
31
|
require "google/cloud/dialogflow/v2/credentials"
|
32
|
+
require "google/cloud/dialogflow/version"
|
32
33
|
|
33
34
|
module Google
|
34
35
|
module Cloud
|
@@ -226,7 +227,7 @@ module Google
|
|
226
227
|
updater_proc = credentials.updater_proc
|
227
228
|
end
|
228
229
|
|
229
|
-
package_version =
|
230
|
+
package_version = Google::Cloud::Dialogflow::VERSION
|
230
231
|
|
231
232
|
google_api_client = "gl-ruby/#{RUBY_VERSION}"
|
232
233
|
google_api_client << " #{lib_name}/#{lib_version}" if lib_name
|
@@ -27,6 +27,7 @@ require "google/gax"
|
|
27
27
|
|
28
28
|
require "google/cloud/dialogflow/v2/session_entity_type_pb"
|
29
29
|
require "google/cloud/dialogflow/v2/credentials"
|
30
|
+
require "google/cloud/dialogflow/version"
|
30
31
|
|
31
32
|
module Google
|
32
33
|
module Cloud
|
@@ -178,7 +179,7 @@ module Google
|
|
178
179
|
updater_proc = credentials.updater_proc
|
179
180
|
end
|
180
181
|
|
181
|
-
package_version =
|
182
|
+
package_version = Google::Cloud::Dialogflow::VERSION
|
182
183
|
|
183
184
|
google_api_client = "gl-ruby/#{RUBY_VERSION}"
|
184
185
|
google_api_client << " #{lib_name}/#{lib_version}" if lib_name
|
@@ -5,7 +5,6 @@
|
|
5
5
|
require 'google/protobuf'
|
6
6
|
|
7
7
|
require 'google/api/annotations_pb'
|
8
|
-
require 'google/api/resource_pb'
|
9
8
|
require 'google/cloud/dialogflow/v2/audio_config_pb'
|
10
9
|
require 'google/cloud/dialogflow/v2/context_pb'
|
11
10
|
require 'google/cloud/dialogflow/v2/intent_pb'
|
@@ -88,12 +87,6 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
88
87
|
value :TRANSCRIPT, 1
|
89
88
|
value :END_OF_SINGLE_UTTERANCE, 2
|
90
89
|
end
|
91
|
-
add_message "google.cloud.dialogflow.v2.InputAudioConfig" do
|
92
|
-
optional :audio_encoding, :enum, 1, "google.cloud.dialogflow.v2.AudioEncoding"
|
93
|
-
optional :sample_rate_hertz, :int32, 2
|
94
|
-
optional :language_code, :string, 3
|
95
|
-
repeated :phrase_hints, :string, 4
|
96
|
-
end
|
97
90
|
add_message "google.cloud.dialogflow.v2.TextInput" do
|
98
91
|
optional :text, :string, 1
|
99
92
|
optional :language_code, :string, 2
|
@@ -113,16 +106,6 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
113
106
|
optional :score, :float, 1
|
114
107
|
optional :magnitude, :float, 2
|
115
108
|
end
|
116
|
-
add_enum "google.cloud.dialogflow.v2.AudioEncoding" do
|
117
|
-
value :AUDIO_ENCODING_UNSPECIFIED, 0
|
118
|
-
value :AUDIO_ENCODING_LINEAR_16, 1
|
119
|
-
value :AUDIO_ENCODING_FLAC, 2
|
120
|
-
value :AUDIO_ENCODING_MULAW, 3
|
121
|
-
value :AUDIO_ENCODING_AMR, 4
|
122
|
-
value :AUDIO_ENCODING_AMR_WB, 5
|
123
|
-
value :AUDIO_ENCODING_OGG_OPUS, 6
|
124
|
-
value :AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE, 7
|
125
|
-
end
|
126
109
|
end
|
127
110
|
|
128
111
|
module Google
|
@@ -138,13 +121,11 @@ module Google
|
|
138
121
|
StreamingDetectIntentResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.StreamingDetectIntentResponse").msgclass
|
139
122
|
StreamingRecognitionResult = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.StreamingRecognitionResult").msgclass
|
140
123
|
StreamingRecognitionResult::MessageType = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.StreamingRecognitionResult.MessageType").enummodule
|
141
|
-
InputAudioConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.InputAudioConfig").msgclass
|
142
124
|
TextInput = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.TextInput").msgclass
|
143
125
|
EventInput = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.EventInput").msgclass
|
144
126
|
SentimentAnalysisRequestConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.SentimentAnalysisRequestConfig").msgclass
|
145
127
|
SentimentAnalysisResult = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.SentimentAnalysisResult").msgclass
|
146
128
|
Sentiment = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.Sentiment").msgclass
|
147
|
-
AudioEncoding = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.AudioEncoding").enummodule
|
148
129
|
end
|
149
130
|
end
|
150
131
|
end
|
@@ -27,6 +27,7 @@ require "google/gax"
|
|
27
27
|
|
28
28
|
require "google/cloud/dialogflow/v2/session_pb"
|
29
29
|
require "google/cloud/dialogflow/v2/credentials"
|
30
|
+
require "google/cloud/dialogflow/version"
|
30
31
|
|
31
32
|
module Google
|
32
33
|
module Cloud
|
@@ -141,7 +142,7 @@ module Google
|
|
141
142
|
updater_proc = credentials.updater_proc
|
142
143
|
end
|
143
144
|
|
144
|
-
package_version =
|
145
|
+
package_version = Google::Cloud::Dialogflow::VERSION
|
145
146
|
|
146
147
|
google_api_client = "gl-ruby/#{RUBY_VERSION}"
|
147
148
|
google_api_client << " #{lib_name}/#{lib_version}" if lib_name
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# Copyright 2019 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
|
+
VERSION = "0.4.0".freeze
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-dialogflow
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-06-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-gax
|
@@ -167,6 +167,7 @@ files:
|
|
167
167
|
- lib/google/cloud/dialogflow/v2/sessions_client.rb
|
168
168
|
- lib/google/cloud/dialogflow/v2/sessions_client_config.json
|
169
169
|
- lib/google/cloud/dialogflow/v2/webhook_pb.rb
|
170
|
+
- lib/google/cloud/dialogflow/version.rb
|
170
171
|
homepage: https://github.com/googleapis/google-cloud-ruby/tree/master/google-cloud-dialogflow
|
171
172
|
licenses:
|
172
173
|
- Apache-2.0
|