google-cloud-speech-v1p1beta1 0.6.0 → 0.9.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +8 -8
- data/README.md +1 -1
- data/lib/google/cloud/speech/v1p1beta1/adaptation/client.rb +1 -1
- data/lib/google/cloud/speech/v1p1beta1/cloud_speech_pb.rb +14 -1
- data/lib/google/cloud/speech/v1p1beta1/speech/client.rb +6 -10
- data/lib/google/cloud/speech/v1p1beta1/speech/operations.rb +4 -4
- data/lib/google/cloud/speech/v1p1beta1/version.rb +1 -1
- data/proto_docs/google/api/field_behavior.rb +7 -1
- data/proto_docs/google/cloud/speech/v1p1beta1/cloud_speech.rb +66 -25
- data/proto_docs/google/protobuf/wrappers.rb +121 -0
- metadata +14 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a9e32960ee7936320191b7f63876985894480b72e942695f2af63ad15eef8370
|
4
|
+
data.tar.gz: 99e8db4e9e98105a3320754d18a0ade8ff1b11c5daa1511d797a18d468e606a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 313cd2c3052cd5919312ef2ce66198a8259d68e31ff643770b83a1e6b7c996c01531af2220891f88a10d3da7b941846278dde5ec38c5d2d3d363e563a11dad7a
|
7
|
+
data.tar.gz: 81db1a40f3f8e9482f3449955f73328f431939ca491cc5a075ff7fa590de05364997e1f578c90206556646ae85841895ab3fbe1c504e4190839d6047659fc7ec
|
data/AUTHENTICATION.md
CHANGED
@@ -66,11 +66,11 @@ The environment variables that google-cloud-speech-v1p1beta1
|
|
66
66
|
checks for credentials are configured on the service Credentials class (such as
|
67
67
|
{::Google::Cloud::Speech::V1p1beta1::Speech::Credentials}):
|
68
68
|
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
69
|
+
* `SPEECH_CREDENTIALS` - Path to JSON file, or JSON contents
|
70
|
+
* `SPEECH_KEYFILE` - Path to JSON file, or JSON contents
|
71
|
+
* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
|
72
|
+
* `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
|
73
|
+
* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
|
74
74
|
|
75
75
|
```ruby
|
76
76
|
require "google/cloud/speech/v1p1beta1"
|
@@ -82,8 +82,8 @@ client = ::Google::Cloud::Speech::V1p1beta1::Speech::Client.new
|
|
82
82
|
|
83
83
|
### Configuration
|
84
84
|
|
85
|
-
The **Credentials JSON** can be configured instead of
|
86
|
-
environment
|
85
|
+
The path to the **Credentials JSON** file can be configured instead of storing
|
86
|
+
it in an environment variable. Either on an individual client initialization:
|
87
87
|
|
88
88
|
```ruby
|
89
89
|
require "google/cloud/speech/v1p1beta1"
|
@@ -93,7 +93,7 @@ client = ::Google::Cloud::Speech::V1p1beta1::Speech::Client.new do |config|
|
|
93
93
|
end
|
94
94
|
```
|
95
95
|
|
96
|
-
Or
|
96
|
+
Or globally for all clients:
|
97
97
|
|
98
98
|
```ruby
|
99
99
|
require "google/cloud/speech/v1p1beta1"
|
data/README.md
CHANGED
@@ -33,7 +33,7 @@ In order to use this library, you first need to go through the following steps:
|
|
33
33
|
require "google/cloud/speech/v1p1beta1"
|
34
34
|
|
35
35
|
client = ::Google::Cloud::Speech::V1p1beta1::Speech::Client.new
|
36
|
-
request =
|
36
|
+
request = ::Google::Cloud::Speech::V1p1beta1::RecognizeRequest.new # (request fields as keyword arguments...)
|
37
37
|
response = client.recognize request
|
38
38
|
```
|
39
39
|
|
@@ -133,7 +133,7 @@ module Google
|
|
133
133
|
!@config.endpoint.split(".").first.include?("-")
|
134
134
|
credentials ||= Credentials.default scope: @config.scope,
|
135
135
|
enable_self_signed_jwt: enable_self_signed_jwt
|
136
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
136
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
137
137
|
credentials = Credentials.new credentials, scope: @config.scope
|
138
138
|
end
|
139
139
|
@quota_project_id = @config.quota_project
|
@@ -6,12 +6,12 @@ require 'google/protobuf'
|
|
6
6
|
require 'google/api/annotations_pb'
|
7
7
|
require 'google/api/client_pb'
|
8
8
|
require 'google/api/field_behavior_pb'
|
9
|
-
require 'google/api/resource_pb'
|
10
9
|
require 'google/cloud/speech/v1p1beta1/resource_pb'
|
11
10
|
require 'google/longrunning/operations_pb'
|
12
11
|
require 'google/protobuf/any_pb'
|
13
12
|
require 'google/protobuf/duration_pb'
|
14
13
|
require 'google/protobuf/timestamp_pb'
|
14
|
+
require 'google/protobuf/wrappers_pb'
|
15
15
|
require 'google/rpc/status_pb'
|
16
16
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
17
17
|
add_file("google/cloud/speech/v1p1beta1/cloud_speech.proto", :syntax => :proto3) do
|
@@ -22,6 +22,12 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
22
22
|
add_message "google.cloud.speech.v1p1beta1.LongRunningRecognizeRequest" do
|
23
23
|
optional :config, :message, 1, "google.cloud.speech.v1p1beta1.RecognitionConfig"
|
24
24
|
optional :audio, :message, 2, "google.cloud.speech.v1p1beta1.RecognitionAudio"
|
25
|
+
optional :output_config, :message, 4, "google.cloud.speech.v1p1beta1.TranscriptOutputConfig"
|
26
|
+
end
|
27
|
+
add_message "google.cloud.speech.v1p1beta1.TranscriptOutputConfig" do
|
28
|
+
oneof :output_type do
|
29
|
+
optional :gcs_uri, :string, 1
|
30
|
+
end
|
25
31
|
end
|
26
32
|
add_message "google.cloud.speech.v1p1beta1.StreamingRecognizeRequest" do
|
27
33
|
oneof :streaming_request do
|
@@ -48,6 +54,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
48
54
|
optional :enable_word_time_offsets, :bool, 8
|
49
55
|
optional :enable_word_confidence, :bool, 15
|
50
56
|
optional :enable_automatic_punctuation, :bool, 11
|
57
|
+
optional :enable_spoken_punctuation, :message, 22, "google.protobuf.BoolValue"
|
58
|
+
optional :enable_spoken_emojis, :message, 23, "google.protobuf.BoolValue"
|
51
59
|
optional :enable_speaker_diarization, :bool, 16
|
52
60
|
optional :diarization_speaker_count, :int32, 17
|
53
61
|
optional :diarization_config, :message, 19, "google.cloud.speech.v1p1beta1.SpeakerDiarizationConfig"
|
@@ -65,6 +73,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
65
73
|
value :OGG_OPUS, 6
|
66
74
|
value :SPEEX_WITH_HEADER_BYTE, 7
|
67
75
|
value :MP3, 8
|
76
|
+
value :WEBM_OPUS, 9
|
68
77
|
end
|
69
78
|
add_message "google.cloud.speech.v1p1beta1.SpeakerDiarizationConfig" do
|
70
79
|
optional :enable_speaker_diarization, :bool, 1
|
@@ -129,12 +138,15 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
129
138
|
end
|
130
139
|
add_message "google.cloud.speech.v1p1beta1.LongRunningRecognizeResponse" do
|
131
140
|
repeated :results, :message, 2, "google.cloud.speech.v1p1beta1.SpeechRecognitionResult"
|
141
|
+
optional :output_config, :message, 6, "google.cloud.speech.v1p1beta1.TranscriptOutputConfig"
|
142
|
+
optional :output_error, :message, 7, "google.rpc.Status"
|
132
143
|
end
|
133
144
|
add_message "google.cloud.speech.v1p1beta1.LongRunningRecognizeMetadata" do
|
134
145
|
optional :progress_percent, :int32, 1
|
135
146
|
optional :start_time, :message, 2, "google.protobuf.Timestamp"
|
136
147
|
optional :last_update_time, :message, 3, "google.protobuf.Timestamp"
|
137
148
|
optional :uri, :string, 4
|
149
|
+
optional :output_config, :message, 5, "google.cloud.speech.v1p1beta1.TranscriptOutputConfig"
|
138
150
|
end
|
139
151
|
add_message "google.cloud.speech.v1p1beta1.StreamingRecognizeResponse" do
|
140
152
|
optional :error, :message, 1, "google.rpc.Status"
|
@@ -179,6 +191,7 @@ module Google
|
|
179
191
|
module V1p1beta1
|
180
192
|
RecognizeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.RecognizeRequest").msgclass
|
181
193
|
LongRunningRecognizeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.LongRunningRecognizeRequest").msgclass
|
194
|
+
TranscriptOutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.TranscriptOutputConfig").msgclass
|
182
195
|
StreamingRecognizeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.StreamingRecognizeRequest").msgclass
|
183
196
|
StreamingRecognitionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.StreamingRecognitionConfig").msgclass
|
184
197
|
RecognitionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.RecognitionConfig").msgclass
|
@@ -67,20 +67,14 @@ module Google
|
|
67
67
|
|
68
68
|
default_config.rpcs.recognize.timeout = 5000.0
|
69
69
|
default_config.rpcs.recognize.retry_policy = {
|
70
|
-
initial_delay: 0.1,
|
71
|
-
max_delay: 60.0,
|
72
|
-
multiplier: 1.3,
|
73
|
-
retry_codes: [4, 14]
|
70
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
74
71
|
}
|
75
72
|
|
76
73
|
default_config.rpcs.long_running_recognize.timeout = 5000.0
|
77
74
|
|
78
75
|
default_config.rpcs.streaming_recognize.timeout = 5000.0
|
79
76
|
default_config.rpcs.streaming_recognize.retry_policy = {
|
80
|
-
initial_delay: 0.1,
|
81
|
-
max_delay: 60.0,
|
82
|
-
multiplier: 1.3,
|
83
|
-
retry_codes: [4, 14]
|
77
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
84
78
|
}
|
85
79
|
|
86
80
|
default_config
|
@@ -151,7 +145,7 @@ module Google
|
|
151
145
|
!@config.endpoint.split(".").first.include?("-")
|
152
146
|
credentials ||= Credentials.default scope: @config.scope,
|
153
147
|
enable_self_signed_jwt: enable_self_signed_jwt
|
154
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
148
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
155
149
|
credentials = Credentials.new credentials, scope: @config.scope
|
156
150
|
end
|
157
151
|
@quota_project_id = @config.quota_project
|
@@ -262,7 +256,7 @@ module Google
|
|
262
256
|
# @param options [::Gapic::CallOptions, ::Hash]
|
263
257
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
264
258
|
#
|
265
|
-
# @overload long_running_recognize(config: nil, audio: nil)
|
259
|
+
# @overload long_running_recognize(config: nil, audio: nil, output_config: nil)
|
266
260
|
# Pass arguments to `long_running_recognize` via keyword arguments. Note that at
|
267
261
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
268
262
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -272,6 +266,8 @@ module Google
|
|
272
266
|
# process the request.
|
273
267
|
# @param audio [::Google::Cloud::Speech::V1p1beta1::RecognitionAudio, ::Hash]
|
274
268
|
# Required. The audio data to be recognized.
|
269
|
+
# @param output_config [::Google::Cloud::Speech::V1p1beta1::TranscriptOutputConfig, ::Hash]
|
270
|
+
# Optional. Specifies an optional destination for the recognition results.
|
275
271
|
#
|
276
272
|
# @yield [response, operation] Access the result along with the RPC operation
|
277
273
|
# @yieldparam response [::Gapic::Operation]
|
@@ -82,7 +82,7 @@ module Google
|
|
82
82
|
# Create credentials
|
83
83
|
credentials = @config.credentials
|
84
84
|
credentials ||= Credentials.default scope: @config.scope
|
85
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
85
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
86
86
|
credentials = Credentials.new credentials, scope: @config.scope
|
87
87
|
end
|
88
88
|
@quota_project_id = @config.quota_project
|
@@ -396,9 +396,9 @@ module Google
|
|
396
396
|
end
|
397
397
|
|
398
398
|
##
|
399
|
-
# Waits
|
400
|
-
#
|
401
|
-
#
|
399
|
+
# Waits until the specified long-running operation is done or reaches at most
|
400
|
+
# a specified timeout, returning the latest state. If the operation is
|
401
|
+
# already done, the latest state is immediately returned. If the timeout
|
402
402
|
# specified is greater than the default HTTP/RPC timeout, the HTTP/RPC
|
403
403
|
# timeout is used. If the server does not support this method, it returns
|
404
404
|
# `google.rpc.Code.UNIMPLEMENTED`.
|
@@ -57,9 +57,15 @@ module Google
|
|
57
57
|
|
58
58
|
# Denotes that a (repeated) field is an unordered list.
|
59
59
|
# This indicates that the service may provide the elements of the list
|
60
|
-
# in any arbitrary
|
60
|
+
# in any arbitrary order, rather than the order the user originally
|
61
61
|
# provided. Additionally, the list's order may or may not be stable.
|
62
62
|
UNORDERED_LIST = 6
|
63
|
+
|
64
|
+
# Denotes that this field returns a non-empty default value if not set.
|
65
|
+
# This indicates that if the user provides the empty value in a request,
|
66
|
+
# a non-empty value will be returned. The user will not be aware of what
|
67
|
+
# non-empty value to expect.
|
68
|
+
NON_EMPTY_DEFAULT = 7
|
63
69
|
end
|
64
70
|
end
|
65
71
|
end
|
@@ -43,11 +43,25 @@ module Google
|
|
43
43
|
# @!attribute [rw] audio
|
44
44
|
# @return [::Google::Cloud::Speech::V1p1beta1::RecognitionAudio]
|
45
45
|
# Required. The audio data to be recognized.
|
46
|
+
# @!attribute [rw] output_config
|
47
|
+
# @return [::Google::Cloud::Speech::V1p1beta1::TranscriptOutputConfig]
|
48
|
+
# Optional. Specifies an optional destination for the recognition results.
|
46
49
|
class LongRunningRecognizeRequest
|
47
50
|
include ::Google::Protobuf::MessageExts
|
48
51
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
49
52
|
end
|
50
53
|
|
54
|
+
# Specifies an optional destination for the recognition results.
|
55
|
+
# @!attribute [rw] gcs_uri
|
56
|
+
# @return [::String]
|
57
|
+
# Specifies a Cloud Storage URI for the recognition results. Must be
|
58
|
+
# specified in the format: `gs://bucket_name/object_name`, and the bucket
|
59
|
+
# must already exist.
|
60
|
+
class TranscriptOutputConfig
|
61
|
+
include ::Google::Protobuf::MessageExts
|
62
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
63
|
+
end
|
64
|
+
|
51
65
|
# The top-level message sent by the client for the `StreamingRecognize` method.
|
52
66
|
# Multiple `StreamingRecognizeRequest` messages are sent. The first message
|
53
67
|
# must contain a `streaming_config` message and must not contain
|
@@ -119,8 +133,7 @@ module Google
|
|
119
133
|
# @return [::Google::Cloud::Speech::V1p1beta1::RecognitionConfig::AudioEncoding]
|
120
134
|
# Encoding of audio data sent in all `RecognitionAudio` messages.
|
121
135
|
# This field is optional for `FLAC` and `WAV` audio files and required
|
122
|
-
# for all other audio formats. For details, see
|
123
|
-
# {::Google::Cloud::Speech::V1p1beta1::RecognitionConfig::AudioEncoding AudioEncoding}.
|
136
|
+
# for all other audio formats. For details, see {::Google::Cloud::Speech::V1p1beta1::RecognitionConfig::AudioEncoding AudioEncoding}.
|
124
137
|
# @!attribute [rw] sample_rate_hertz
|
125
138
|
# @return [::Integer]
|
126
139
|
# Sample rate in Hertz of the audio data sent in all
|
@@ -129,8 +142,7 @@ module Google
|
|
129
142
|
# source to 16000 Hz. If that's not possible, use the native sample rate of
|
130
143
|
# the audio source (instead of re-sampling).
|
131
144
|
# This field is optional for FLAC and WAV audio files, but is
|
132
|
-
# required for all other audio formats. For details, see
|
133
|
-
# {::Google::Cloud::Speech::V1p1beta1::RecognitionConfig::AudioEncoding AudioEncoding}.
|
145
|
+
# required for all other audio formats. For details, see {::Google::Cloud::Speech::V1p1beta1::RecognitionConfig::AudioEncoding AudioEncoding}.
|
134
146
|
# @!attribute [rw] audio_channel_count
|
135
147
|
# @return [::Integer]
|
136
148
|
# The number of channels in the input audio data.
|
@@ -191,7 +203,7 @@ module Google
|
|
191
203
|
# Speech adaptation configuration improves the accuracy of speech
|
192
204
|
# recognition. When speech adaptation is set it supersedes the
|
193
205
|
# `speech_contexts` field. For more information, see the [speech
|
194
|
-
# adaptation](https://cloud.google.com/speech-to-text/docs/
|
206
|
+
# adaptation](https://cloud.google.com/speech-to-text/docs/adaptation)
|
195
207
|
# documentation.
|
196
208
|
# @!attribute [rw] speech_contexts
|
197
209
|
# @return [::Array<::Google::Cloud::Speech::V1p1beta1::SpeechContext>]
|
@@ -199,7 +211,7 @@ module Google
|
|
199
211
|
# A means to provide context to assist the speech recognition. For more
|
200
212
|
# information, see
|
201
213
|
# [speech
|
202
|
-
# adaptation](https://cloud.google.com/speech-to-text/docs/
|
214
|
+
# adaptation](https://cloud.google.com/speech-to-text/docs/adaptation).
|
203
215
|
# @!attribute [rw] enable_word_time_offsets
|
204
216
|
# @return [::Boolean]
|
205
217
|
# If `true`, the top result includes a list of words and
|
@@ -217,6 +229,22 @@ module Google
|
|
217
229
|
# This feature is only available in select languages. Setting this for
|
218
230
|
# requests in other languages has no effect at all.
|
219
231
|
# The default 'false' value does not add punctuation to result hypotheses.
|
232
|
+
# @!attribute [rw] enable_spoken_punctuation
|
233
|
+
# @return [::Google::Protobuf::BoolValue]
|
234
|
+
# The spoken punctuation behavior for the call
|
235
|
+
# If not set, uses default behavior based on model of choice
|
236
|
+
# e.g. command_and_search will enable spoken punctuation by default
|
237
|
+
# If 'true', replaces spoken punctuation with the corresponding symbols in
|
238
|
+
# the request. For example, "how are you question mark" becomes "how are
|
239
|
+
# you?". See https://cloud.google.com/speech-to-text/docs/spoken-punctuation
|
240
|
+
# for support. If 'false', spoken punctuation is not replaced.
|
241
|
+
# @!attribute [rw] enable_spoken_emojis
|
242
|
+
# @return [::Google::Protobuf::BoolValue]
|
243
|
+
# The spoken emoji behavior for the call
|
244
|
+
# If not set, uses default behavior based on model of choice
|
245
|
+
# If 'true', adds spoken emoji formatting for the request. This will replace
|
246
|
+
# spoken emojis with the corresponding Unicode symbols in the final
|
247
|
+
# transcript. If 'false', spoken emojis are not replaced.
|
220
248
|
# @!attribute [rw] enable_speaker_diarization
|
221
249
|
# @return [::Boolean]
|
222
250
|
# If 'true', enables speaker detection for each recognized word in
|
@@ -263,7 +291,7 @@ module Google
|
|
263
291
|
# </tr>
|
264
292
|
# <tr>
|
265
293
|
# <td><code>video</code></td>
|
266
|
-
# <td>Best for audio that originated from
|
294
|
+
# <td>Best for audio that originated from video or includes multiple
|
267
295
|
# speakers. Ideally the audio is recorded at a 16khz or greater
|
268
296
|
# sampling rate. This is a premium model that costs more than the
|
269
297
|
# standard rate.</td>
|
@@ -299,7 +327,7 @@ module Google
|
|
299
327
|
# a lossless encoding (`FLAC` or `LINEAR16`). The accuracy of the speech
|
300
328
|
# recognition can be reduced if lossy codecs are used to capture or transmit
|
301
329
|
# audio, particularly if background noise is present. Lossy codecs include
|
302
|
-
# `MULAW`, `AMR`, `AMR_WB`, `OGG_OPUS`, `SPEEX_WITH_HEADER_BYTE`,
|
330
|
+
# `MULAW`, `AMR`, `AMR_WB`, `OGG_OPUS`, `SPEEX_WITH_HEADER_BYTE`, `MP3`.
|
303
331
|
#
|
304
332
|
# The `FLAC` and `WAV` audio file formats include a header that describes the
|
305
333
|
# included audio content. You can request recognition for `WAV` files that
|
@@ -310,8 +338,7 @@ module Google
|
|
310
338
|
# an `AudioEncoding` when you send send `FLAC` or `WAV` audio, the
|
311
339
|
# encoding configuration must match the encoding described in the audio
|
312
340
|
# header; otherwise the request returns an
|
313
|
-
# [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error
|
314
|
-
# code.
|
341
|
+
# [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error code.
|
315
342
|
module AudioEncoding
|
316
343
|
# Not specified.
|
317
344
|
ENCODING_UNSPECIFIED = 0
|
@@ -361,6 +388,12 @@ module Google
|
|
361
388
|
# kbps). When using this encoding, `sample_rate_hertz` has to match the
|
362
389
|
# sample rate of the file being used.
|
363
390
|
MP3 = 8
|
391
|
+
|
392
|
+
# Opus encoded audio frames in WebM container
|
393
|
+
# ([OggOpus](https://wiki.xiph.org/OggOpus)). This is a Beta features and
|
394
|
+
# only available in v1p1beta1. `sample_rate_hertz` must be one of 8000,
|
395
|
+
# 12000, 16000, 24000, or 48000.
|
396
|
+
WEBM_OPUS = 9
|
364
397
|
end
|
365
398
|
end
|
366
399
|
|
@@ -555,8 +588,8 @@ module Google
|
|
555
588
|
|
556
589
|
# Contains audio data in the encoding specified in the `RecognitionConfig`.
|
557
590
|
# Either `content` or `uri` must be supplied. Supplying both or neither
|
558
|
-
# returns [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
|
559
|
-
#
|
591
|
+
# returns [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. See
|
592
|
+
# [content limits](https://cloud.google.com/speech-to-text/quotas#content).
|
560
593
|
# @!attribute [rw] content
|
561
594
|
# @return [::String]
|
562
595
|
# The audio data bytes encoded as specified in
|
@@ -569,9 +602,8 @@ module Google
|
|
569
602
|
# Currently, only Google Cloud Storage URIs are
|
570
603
|
# supported, which must be specified in the following format:
|
571
604
|
# `gs://bucket_name/object_name` (other URI formats return
|
572
|
-
# [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]).
|
573
|
-
#
|
574
|
-
# URIs](https://cloud.google.com/storage/docs/reference-uris).
|
605
|
+
# [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see
|
606
|
+
# [Request URIs](https://cloud.google.com/storage/docs/reference-uris).
|
575
607
|
class RecognitionAudio
|
576
608
|
include ::Google::Protobuf::MessageExts
|
577
609
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -598,6 +630,12 @@ module Google
|
|
598
630
|
# @return [::Array<::Google::Cloud::Speech::V1p1beta1::SpeechRecognitionResult>]
|
599
631
|
# Sequential list of transcription results corresponding to
|
600
632
|
# sequential portions of audio.
|
633
|
+
# @!attribute [rw] output_config
|
634
|
+
# @return [::Google::Cloud::Speech::V1p1beta1::TranscriptOutputConfig]
|
635
|
+
# Original output config if present in the request.
|
636
|
+
# @!attribute [rw] output_error
|
637
|
+
# @return [::Google::Rpc::Status]
|
638
|
+
# If the transcript output fails this field contains the relevant error.
|
601
639
|
class LongRunningRecognizeResponse
|
602
640
|
include ::Google::Protobuf::MessageExts
|
603
641
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -618,8 +656,11 @@ module Google
|
|
618
656
|
# Time of the most recent processing update.
|
619
657
|
# @!attribute [r] uri
|
620
658
|
# @return [::String]
|
621
|
-
# Output only. The URI of the audio file being transcribed. Empty if the
|
622
|
-
#
|
659
|
+
# Output only. The URI of the audio file being transcribed. Empty if the audio was sent
|
660
|
+
# as byte content.
|
661
|
+
# @!attribute [r] output_config
|
662
|
+
# @return [::Google::Cloud::Speech::V1p1beta1::TranscriptOutputConfig]
|
663
|
+
# Output only. A copy of the TranscriptOutputConfig if it was set in the request.
|
623
664
|
class LongRunningRecognizeMetadata
|
624
665
|
include ::Google::Protobuf::MessageExts
|
625
666
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -631,8 +672,8 @@ module Google
|
|
631
672
|
# audio, and `single_utterance` is set to false, then no messages are streamed
|
632
673
|
# back to the client.
|
633
674
|
#
|
634
|
-
# Here's an example of a series of
|
635
|
-
#
|
675
|
+
# Here's an example of a series of `StreamingRecognizeResponse`s that might be
|
676
|
+
# returned while processing audio:
|
636
677
|
#
|
637
678
|
# 1. results { alternatives { transcript: "tube" } stability: 0.01 }
|
638
679
|
#
|
@@ -740,9 +781,9 @@ module Google
|
|
740
781
|
# For audio_channel_count = N, its output values can range from '1' to 'N'.
|
741
782
|
# @!attribute [r] language_code
|
742
783
|
# @return [::String]
|
743
|
-
# Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
|
744
|
-
#
|
745
|
-
#
|
784
|
+
# Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag
|
785
|
+
# of the language in this result. This language code was detected to have
|
786
|
+
# the most likelihood of being spoken in the audio.
|
746
787
|
class StreamingRecognitionResult
|
747
788
|
include ::Google::Protobuf::MessageExts
|
748
789
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -762,9 +803,9 @@ module Google
|
|
762
803
|
# For audio_channel_count = N, its output values can range from '1' to 'N'.
|
763
804
|
# @!attribute [r] language_code
|
764
805
|
# @return [::String]
|
765
|
-
# Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
|
766
|
-
#
|
767
|
-
#
|
806
|
+
# Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag
|
807
|
+
# of the language in this result. This language code was detected to have
|
808
|
+
# the most likelihood of being spoken in the audio.
|
768
809
|
class SpeechRecognitionResult
|
769
810
|
include ::Google::Protobuf::MessageExts
|
770
811
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -0,0 +1,121 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2021 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Protobuf
|
22
|
+
# Wrapper message for `double`.
|
23
|
+
#
|
24
|
+
# The JSON representation for `DoubleValue` is JSON number.
|
25
|
+
# @!attribute [rw] value
|
26
|
+
# @return [::Float]
|
27
|
+
# The double value.
|
28
|
+
class DoubleValue
|
29
|
+
include ::Google::Protobuf::MessageExts
|
30
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
31
|
+
end
|
32
|
+
|
33
|
+
# Wrapper message for `float`.
|
34
|
+
#
|
35
|
+
# The JSON representation for `FloatValue` is JSON number.
|
36
|
+
# @!attribute [rw] value
|
37
|
+
# @return [::Float]
|
38
|
+
# The float value.
|
39
|
+
class FloatValue
|
40
|
+
include ::Google::Protobuf::MessageExts
|
41
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
42
|
+
end
|
43
|
+
|
44
|
+
# Wrapper message for `int64`.
|
45
|
+
#
|
46
|
+
# The JSON representation for `Int64Value` is JSON string.
|
47
|
+
# @!attribute [rw] value
|
48
|
+
# @return [::Integer]
|
49
|
+
# The int64 value.
|
50
|
+
class Int64Value
|
51
|
+
include ::Google::Protobuf::MessageExts
|
52
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
53
|
+
end
|
54
|
+
|
55
|
+
# Wrapper message for `uint64`.
|
56
|
+
#
|
57
|
+
# The JSON representation for `UInt64Value` is JSON string.
|
58
|
+
# @!attribute [rw] value
|
59
|
+
# @return [::Integer]
|
60
|
+
# The uint64 value.
|
61
|
+
class UInt64Value
|
62
|
+
include ::Google::Protobuf::MessageExts
|
63
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
64
|
+
end
|
65
|
+
|
66
|
+
# Wrapper message for `int32`.
|
67
|
+
#
|
68
|
+
# The JSON representation for `Int32Value` is JSON number.
|
69
|
+
# @!attribute [rw] value
|
70
|
+
# @return [::Integer]
|
71
|
+
# The int32 value.
|
72
|
+
class Int32Value
|
73
|
+
include ::Google::Protobuf::MessageExts
|
74
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
75
|
+
end
|
76
|
+
|
77
|
+
# Wrapper message for `uint32`.
|
78
|
+
#
|
79
|
+
# The JSON representation for `UInt32Value` is JSON number.
|
80
|
+
# @!attribute [rw] value
|
81
|
+
# @return [::Integer]
|
82
|
+
# The uint32 value.
|
83
|
+
class UInt32Value
|
84
|
+
include ::Google::Protobuf::MessageExts
|
85
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
86
|
+
end
|
87
|
+
|
88
|
+
# Wrapper message for `bool`.
|
89
|
+
#
|
90
|
+
# The JSON representation for `BoolValue` is JSON `true` and `false`.
|
91
|
+
# @!attribute [rw] value
|
92
|
+
# @return [::Boolean]
|
93
|
+
# The bool value.
|
94
|
+
class BoolValue
|
95
|
+
include ::Google::Protobuf::MessageExts
|
96
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
97
|
+
end
|
98
|
+
|
99
|
+
# Wrapper message for `string`.
|
100
|
+
#
|
101
|
+
# The JSON representation for `StringValue` is JSON string.
|
102
|
+
# @!attribute [rw] value
|
103
|
+
# @return [::String]
|
104
|
+
# The string value.
|
105
|
+
class StringValue
|
106
|
+
include ::Google::Protobuf::MessageExts
|
107
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
108
|
+
end
|
109
|
+
|
110
|
+
# Wrapper message for `bytes`.
|
111
|
+
#
|
112
|
+
# The JSON representation for `BytesValue` is JSON string.
|
113
|
+
# @!attribute [rw] value
|
114
|
+
# @return [::String]
|
115
|
+
# The bytes value.
|
116
|
+
class BytesValue
|
117
|
+
include ::Google::Protobuf::MessageExts
|
118
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
119
|
+
end
|
120
|
+
end
|
121
|
+
end
|
metadata
CHANGED
@@ -1,29 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-speech-v1p1beta1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-07-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0.5'
|
20
|
+
- - "<"
|
18
21
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
22
|
+
version: 2.a
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0.5'
|
30
|
+
- - "<"
|
25
31
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
32
|
+
version: 2.a
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: google-cloud-errors
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -196,6 +202,7 @@ files:
|
|
196
202
|
- proto_docs/google/protobuf/empty.rb
|
197
203
|
- proto_docs/google/protobuf/field_mask.rb
|
198
204
|
- proto_docs/google/protobuf/timestamp.rb
|
205
|
+
- proto_docs/google/protobuf/wrappers.rb
|
199
206
|
- proto_docs/google/rpc/status.rb
|
200
207
|
homepage: https://github.com/googleapis/google-cloud-ruby
|
201
208
|
licenses:
|
@@ -216,7 +223,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
216
223
|
- !ruby/object:Gem::Version
|
217
224
|
version: '0'
|
218
225
|
requirements: []
|
219
|
-
rubygems_version: 3.2.
|
226
|
+
rubygems_version: 3.2.17
|
220
227
|
signing_key:
|
221
228
|
specification_version: 4
|
222
229
|
summary: API Client library for the Cloud Speech-to-Text V1p1beta1 API
|