google-cloud-speech-v2 0.3.0 → 0.4.0
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/lib/google/cloud/speech/v2/cloud_speech_pb.rb +6 -0
- data/lib/google/cloud/speech/v2/speech/client.rb +10 -8
- data/lib/google/cloud/speech/v2/speech/rest/client.rb +10 -8
- data/lib/google/cloud/speech/v2/version.rb +1 -1
- data/proto_docs/google/api/client.rb +58 -1
- data/proto_docs/google/cloud/speech/v2/cloud_speech.rb +29 -52
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3cf4d4c7df13e982a4445c71f9718dec880581b5d3af5d0144375a08ebe3ffb2
|
4
|
+
data.tar.gz: 2383d5ae6a86525d679a6bd78a4e69b006dcca5fa9cd930bb845ebb9c3221bef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f38a8ad1754232f45056ad4bf2138347c8c189bcfae40f90ad22268a231a88d1cf5458ab4b14b7f1065c42ab415442b66862b09c811bfa5a63bf0539304534a
|
7
|
+
data.tar.gz: 1dcbb075133194ce0ba9ca6989735602bd514d48a7a0106f6744a36c18fcff5e3d9873d4aee9cc6d8c003f44412db03c4e21145d8d4c9ca258e1884cc9ea1af1
|
@@ -212,6 +212,11 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
212
212
|
optional :config_mask, :message, 5, "google.protobuf.FieldMask"
|
213
213
|
repeated :files, :message, 3, "google.cloud.speech.v2.BatchRecognizeFileMetadata"
|
214
214
|
optional :recognition_output_config, :message, 6, "google.cloud.speech.v2.RecognitionOutputConfig"
|
215
|
+
optional :processing_strategy, :enum, 7, "google.cloud.speech.v2.BatchRecognizeRequest.ProcessingStrategy"
|
216
|
+
end
|
217
|
+
add_enum "google.cloud.speech.v2.BatchRecognizeRequest.ProcessingStrategy" do
|
218
|
+
value :PROCESSING_STRATEGY_UNSPECIFIED, 0
|
219
|
+
value :DYNAMIC_BATCHING, 1
|
215
220
|
end
|
216
221
|
add_message "google.cloud.speech.v2.GcsOutputConfig" do
|
217
222
|
optional :uri, :string, 1
|
@@ -442,6 +447,7 @@ module Google
|
|
442
447
|
StreamingRecognitionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v2.StreamingRecognitionConfig").msgclass
|
443
448
|
StreamingRecognizeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v2.StreamingRecognizeRequest").msgclass
|
444
449
|
BatchRecognizeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v2.BatchRecognizeRequest").msgclass
|
450
|
+
BatchRecognizeRequest::ProcessingStrategy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v2.BatchRecognizeRequest.ProcessingStrategy").enummodule
|
445
451
|
GcsOutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v2.GcsOutputConfig").msgclass
|
446
452
|
InlineOutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v2.InlineOutputConfig").msgclass
|
447
453
|
RecognitionOutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v2.RecognitionOutputConfig").msgclass
|
@@ -304,8 +304,8 @@ module Google
|
|
304
304
|
# format is `projects/{project}/locations/{location}`.
|
305
305
|
# @param page_size [::Integer]
|
306
306
|
# The maximum number of Recognizers to return. The service may return fewer
|
307
|
-
# than this value. If unspecified, at most
|
308
|
-
# The maximum value is
|
307
|
+
# than this value. If unspecified, at most 5 Recognizers will be returned.
|
308
|
+
# The maximum value is 100; values above 100 will be coerced to 100.
|
309
309
|
# @param page_token [::String]
|
310
310
|
# A page token, received from a previous
|
311
311
|
# {::Google::Cloud::Speech::V2::Speech::Client#list_recognizers ListRecognizers} call.
|
@@ -999,7 +999,7 @@ module Google
|
|
999
999
|
# @param options [::Gapic::CallOptions, ::Hash]
|
1000
1000
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1001
1001
|
#
|
1002
|
-
# @overload batch_recognize(recognizer: nil, config: nil, config_mask: nil, files: nil, recognition_output_config: nil)
|
1002
|
+
# @overload batch_recognize(recognizer: nil, config: nil, config_mask: nil, files: nil, recognition_output_config: nil, processing_strategy: nil)
|
1003
1003
|
# Pass arguments to `batch_recognize` via keyword arguments. Note that at
|
1004
1004
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
1005
1005
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -1032,6 +1032,8 @@ module Google
|
|
1032
1032
|
# The maximum number of files allowed to be specified is 5.
|
1033
1033
|
# @param recognition_output_config [::Google::Cloud::Speech::V2::RecognitionOutputConfig, ::Hash]
|
1034
1034
|
# Configuration options for where to output the transcripts of each file.
|
1035
|
+
# @param processing_strategy [::Google::Cloud::Speech::V2::BatchRecognizeRequest::ProcessingStrategy]
|
1036
|
+
# Processing strategy to use for this request.
|
1035
1037
|
#
|
1036
1038
|
# @yield [response, operation] Access the result along with the RPC operation
|
1037
1039
|
# @yieldparam response [::Gapic::Operation]
|
@@ -1409,10 +1411,10 @@ module Google
|
|
1409
1411
|
# Required. The project and location of CustomClass resources to list. The
|
1410
1412
|
# expected format is `projects/{project}/locations/{location}`.
|
1411
1413
|
# @param page_size [::Integer]
|
1412
|
-
# Number of results per requests. A valid page_size ranges from 0 to
|
1414
|
+
# Number of results per requests. A valid page_size ranges from 0 to 100
|
1413
1415
|
# inclusive. If the page_size is zero or unspecified, a page size of 5 will
|
1414
|
-
# be chosen. If the page size exceeds
|
1415
|
-
# that a call might return fewer results than the requested page size.
|
1416
|
+
# be chosen. If the page size exceeds 100, it will be coerced down to 100.
|
1417
|
+
# Note that a call might return fewer results than the requested page size.
|
1416
1418
|
# @param page_token [::String]
|
1417
1419
|
# A page token, received from a previous
|
1418
1420
|
# {::Google::Cloud::Speech::V2::Speech::Client#list_custom_classes ListCustomClasses} call.
|
@@ -2018,8 +2020,8 @@ module Google
|
|
2018
2020
|
# expected format is `projects/{project}/locations/{location}`.
|
2019
2021
|
# @param page_size [::Integer]
|
2020
2022
|
# The maximum number of PhraseSets to return. The service may return fewer
|
2021
|
-
# than this value. If unspecified, at most
|
2022
|
-
# The maximum value is
|
2023
|
+
# than this value. If unspecified, at most 5 PhraseSets will be returned.
|
2024
|
+
# The maximum value is 100; values above 100 will be coerced to 100.
|
2023
2025
|
# @param page_token [::String]
|
2024
2026
|
# A page token, received from a previous
|
2025
2027
|
# {::Google::Cloud::Speech::V2::Speech::Client#list_phrase_sets ListPhraseSets} call.
|
@@ -266,8 +266,8 @@ module Google
|
|
266
266
|
# format is `projects/{project}/locations/{location}`.
|
267
267
|
# @param page_size [::Integer]
|
268
268
|
# The maximum number of Recognizers to return. The service may return fewer
|
269
|
-
# than this value. If unspecified, at most
|
270
|
-
# The maximum value is
|
269
|
+
# than this value. If unspecified, at most 5 Recognizers will be returned.
|
270
|
+
# The maximum value is 100; values above 100 will be coerced to 100.
|
271
271
|
# @param page_token [::String]
|
272
272
|
# A page token, received from a previous
|
273
273
|
# {::Google::Cloud::Speech::V2::Speech::Rest::Client#list_recognizers ListRecognizers} call.
|
@@ -719,7 +719,7 @@ module Google
|
|
719
719
|
# @param options [::Gapic::CallOptions, ::Hash]
|
720
720
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
721
721
|
#
|
722
|
-
# @overload batch_recognize(recognizer: nil, config: nil, config_mask: nil, files: nil, recognition_output_config: nil)
|
722
|
+
# @overload batch_recognize(recognizer: nil, config: nil, config_mask: nil, files: nil, recognition_output_config: nil, processing_strategy: nil)
|
723
723
|
# Pass arguments to `batch_recognize` via keyword arguments. Note that at
|
724
724
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
725
725
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -752,6 +752,8 @@ module Google
|
|
752
752
|
# The maximum number of files allowed to be specified is 5.
|
753
753
|
# @param recognition_output_config [::Google::Cloud::Speech::V2::RecognitionOutputConfig, ::Hash]
|
754
754
|
# Configuration options for where to output the transcripts of each file.
|
755
|
+
# @param processing_strategy [::Google::Cloud::Speech::V2::BatchRecognizeRequest::ProcessingStrategy]
|
756
|
+
# Processing strategy to use for this request.
|
755
757
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
756
758
|
# @yieldparam result [::Gapic::Operation]
|
757
759
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -1023,10 +1025,10 @@ module Google
|
|
1023
1025
|
# Required. The project and location of CustomClass resources to list. The
|
1024
1026
|
# expected format is `projects/{project}/locations/{location}`.
|
1025
1027
|
# @param page_size [::Integer]
|
1026
|
-
# Number of results per requests. A valid page_size ranges from 0 to
|
1028
|
+
# Number of results per requests. A valid page_size ranges from 0 to 100
|
1027
1029
|
# inclusive. If the page_size is zero or unspecified, a page size of 5 will
|
1028
|
-
# be chosen. If the page size exceeds
|
1029
|
-
# that a call might return fewer results than the requested page size.
|
1030
|
+
# be chosen. If the page size exceeds 100, it will be coerced down to 100.
|
1031
|
+
# Note that a call might return fewer results than the requested page size.
|
1030
1032
|
# @param page_token [::String]
|
1031
1033
|
# A page token, received from a previous
|
1032
1034
|
# {::Google::Cloud::Speech::V2::Speech::Rest::Client#list_custom_classes ListCustomClasses} call.
|
@@ -1462,8 +1464,8 @@ module Google
|
|
1462
1464
|
# expected format is `projects/{project}/locations/{location}`.
|
1463
1465
|
# @param page_size [::Integer]
|
1464
1466
|
# The maximum number of PhraseSets to return. The service may return fewer
|
1465
|
-
# than this value. If unspecified, at most
|
1466
|
-
# The maximum value is
|
1467
|
+
# than this value. If unspecified, at most 5 PhraseSets will be returned.
|
1468
|
+
# The maximum value is 100; values above 100 will be coerced to 100.
|
1467
1469
|
# @param page_token [::String]
|
1468
1470
|
# A page token, received from a previous
|
1469
1471
|
# {::Google::Cloud::Speech::V2::Speech::Rest::Client#list_phrase_sets ListPhraseSets} call.
|
@@ -83,7 +83,7 @@ module Google
|
|
83
83
|
# long-running operation pattern.
|
84
84
|
# @!attribute [rw] new_issue_uri
|
85
85
|
# @return [::String]
|
86
|
-
# Link to a
|
86
|
+
# Link to a *public* URI where users can report issues. Example:
|
87
87
|
# https://issuetracker.google.com/issues/new?component=190865&template=1161103
|
88
88
|
# @!attribute [rw] documentation_uri
|
89
89
|
# @return [::String]
|
@@ -209,9 +209,57 @@ module Google
|
|
209
209
|
# @!attribute [rw] common
|
210
210
|
# @return [::Google::Api::CommonLanguageSettings]
|
211
211
|
# Some settings.
|
212
|
+
# @!attribute [rw] renamed_services
|
213
|
+
# @return [::Google::Protobuf::Map{::String => ::String}]
|
214
|
+
# Map from original service names to renamed versions.
|
215
|
+
# This is used when the default generated types
|
216
|
+
# would cause a naming conflict. (Neither name is
|
217
|
+
# fully-qualified.)
|
218
|
+
# Example: Subscriber to SubscriberServiceApi.
|
219
|
+
# @!attribute [rw] renamed_resources
|
220
|
+
# @return [::Google::Protobuf::Map{::String => ::String}]
|
221
|
+
# Map from full resource types to the effective short name
|
222
|
+
# for the resource. This is used when otherwise resource
|
223
|
+
# named from different services would cause naming collisions.
|
224
|
+
# Example entry:
|
225
|
+
# "datalabeling.googleapis.com/Dataset": "DataLabelingDataset"
|
226
|
+
# @!attribute [rw] ignored_resources
|
227
|
+
# @return [::Array<::String>]
|
228
|
+
# List of full resource types to ignore during generation.
|
229
|
+
# This is typically used for API-specific Location resources,
|
230
|
+
# which should be handled by the generator as if they were actually
|
231
|
+
# the common Location resources.
|
232
|
+
# Example entry: "documentai.googleapis.com/Location"
|
233
|
+
# @!attribute [rw] forced_namespace_aliases
|
234
|
+
# @return [::Array<::String>]
|
235
|
+
# Namespaces which must be aliased in snippets due to
|
236
|
+
# a known (but non-generator-predictable) naming collision
|
237
|
+
# @!attribute [rw] handwritten_signatures
|
238
|
+
# @return [::Array<::String>]
|
239
|
+
# Method signatures (in the form "service.method(signature)")
|
240
|
+
# which are provided separately, so shouldn't be generated.
|
241
|
+
# Snippets *calling* these methods are still generated, however.
|
212
242
|
class DotnetSettings
|
213
243
|
include ::Google::Protobuf::MessageExts
|
214
244
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
245
|
+
|
246
|
+
# @!attribute [rw] key
|
247
|
+
# @return [::String]
|
248
|
+
# @!attribute [rw] value
|
249
|
+
# @return [::String]
|
250
|
+
class RenamedServicesEntry
|
251
|
+
include ::Google::Protobuf::MessageExts
|
252
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
253
|
+
end
|
254
|
+
|
255
|
+
# @!attribute [rw] key
|
256
|
+
# @return [::String]
|
257
|
+
# @!attribute [rw] value
|
258
|
+
# @return [::String]
|
259
|
+
class RenamedResourcesEntry
|
260
|
+
include ::Google::Protobuf::MessageExts
|
261
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
262
|
+
end
|
215
263
|
end
|
216
264
|
|
217
265
|
# Settings for Ruby client libraries.
|
@@ -305,6 +353,15 @@ module Google
|
|
305
353
|
|
306
354
|
# Street View Org.
|
307
355
|
STREET_VIEW = 4
|
356
|
+
|
357
|
+
# Shopping Org.
|
358
|
+
SHOPPING = 5
|
359
|
+
|
360
|
+
# Geo Org.
|
361
|
+
GEO = 6
|
362
|
+
|
363
|
+
# Generative AI - https://developers.generativeai.google
|
364
|
+
GENERATIVE_AI = 7
|
308
365
|
end
|
309
366
|
|
310
367
|
# To where should client libraries be published?
|
@@ -134,8 +134,8 @@ module Google
|
|
134
134
|
# @!attribute [rw] page_size
|
135
135
|
# @return [::Integer]
|
136
136
|
# The maximum number of Recognizers to return. The service may return fewer
|
137
|
-
# than this value. If unspecified, at most
|
138
|
-
# The maximum value is
|
137
|
+
# than this value. If unspecified, at most 5 Recognizers will be returned.
|
138
|
+
# The maximum value is 100; values above 100 will be coerced to 100.
|
139
139
|
# @!attribute [rw] page_token
|
140
140
|
# @return [::String]
|
141
141
|
# A page token, received from a previous
|
@@ -263,56 +263,19 @@ module Google
|
|
263
263
|
# Required. Which model to use for recognition requests. Select the model
|
264
264
|
# best suited to your domain to get best results.
|
265
265
|
#
|
266
|
-
#
|
267
|
-
#
|
268
|
-
# -
|
269
|
-
#
|
270
|
-
#
|
271
|
-
#
|
272
|
-
# - `latest_short`
|
273
|
-
#
|
274
|
-
# Best for short form content like commands or single shot directed speech.
|
275
|
-
# When using this model, the service will stop transcribing audio after the
|
276
|
-
# first utterance is detected and completed.
|
277
|
-
#
|
278
|
-
# When using this model,
|
279
|
-
# {::Google::Cloud::Speech::V2::RecognitionFeatures::MultiChannelMode::SEPARATE_RECOGNITION_PER_CHANNEL SEPARATE_RECOGNITION_PER_CHANNEL}
|
280
|
-
# is not supported; multi-channel audio is accepted, but only the first
|
281
|
-
# channel will be processed and transcribed.
|
282
|
-
#
|
283
|
-
# - `telephony`
|
284
|
-
#
|
285
|
-
# Best for audio that originated from a phone call (typically recorded at
|
286
|
-
# an 8khz sampling rate).
|
287
|
-
#
|
288
|
-
# - `medical_conversation`
|
289
|
-
#
|
290
|
-
# For conversations between a medical provider—for example, a doctor or
|
291
|
-
# nurse—and a patient. Use this model when both a provider and a patient
|
292
|
-
# are speaking. Words uttered by each speaker are automatically detected
|
293
|
-
# and labeled in the returned transcript.
|
294
|
-
#
|
295
|
-
# For supported features please see [medical models
|
296
|
-
# documentation](https://cloud.google.com/speech-to-text/docs/medical-models).
|
297
|
-
#
|
298
|
-
# - `medical_dictation`
|
299
|
-
#
|
300
|
-
# For dictated notes spoken by a single medical provider—for example, a
|
301
|
-
# doctor dictating notes about a patient's blood test results.
|
302
|
-
#
|
303
|
-
# For supported features please see [medical models
|
304
|
-
# documentation](https://cloud.google.com/speech-to-text/docs/medical-models).
|
305
|
-
#
|
306
|
-
# - `usm`
|
307
|
-
#
|
308
|
-
# The next generation of Speech-to-Text models from Google.
|
266
|
+
# Guidance for choosing which model to use can be found in the [Transcription
|
267
|
+
# Models
|
268
|
+
# Documentation](https://cloud.google.com/speech-to-text/v2/docs/transcription-model)
|
269
|
+
# and the models supported in each region can be found in the [Table Of
|
270
|
+
# Supported
|
271
|
+
# Models](https://cloud.google.com/speech-to-text/v2/docs/speech-to-text-supported-languages).
|
309
272
|
# @!attribute [rw] language_codes
|
310
273
|
# @return [::Array<::String>]
|
311
274
|
# Required. The language of the supplied audio as a
|
312
275
|
# [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
|
313
276
|
#
|
314
|
-
# Supported languages for each model are listed
|
315
|
-
# https://cloud.google.com/speech-to-text/docs/languages
|
277
|
+
# Supported languages for each model are listed in the [Table of Supported
|
278
|
+
# Models](https://cloud.google.com/speech-to-text/v2/docs/speech-to-text-supported-languages).
|
316
279
|
#
|
317
280
|
# If additional languages are provided, recognition result will contain
|
318
281
|
# recognition in the most likely language detected. The recognition result
|
@@ -922,9 +885,23 @@ module Google
|
|
922
885
|
# @!attribute [rw] recognition_output_config
|
923
886
|
# @return [::Google::Cloud::Speech::V2::RecognitionOutputConfig]
|
924
887
|
# Configuration options for where to output the transcripts of each file.
|
888
|
+
# @!attribute [rw] processing_strategy
|
889
|
+
# @return [::Google::Cloud::Speech::V2::BatchRecognizeRequest::ProcessingStrategy]
|
890
|
+
# Processing strategy to use for this request.
|
925
891
|
class BatchRecognizeRequest
|
926
892
|
include ::Google::Protobuf::MessageExts
|
927
893
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
894
|
+
|
895
|
+
# Possible processing strategies for batch requests.
|
896
|
+
module ProcessingStrategy
|
897
|
+
# Default value for the processing strategy. The request is processed as
|
898
|
+
# soon as its received.
|
899
|
+
PROCESSING_STRATEGY_UNSPECIFIED = 0
|
900
|
+
|
901
|
+
# If selected, processes the request during lower utilization periods for a
|
902
|
+
# price discount. The request is fulfilled within 24 hours.
|
903
|
+
DYNAMIC_BATCHING = 1
|
904
|
+
end
|
928
905
|
end
|
929
906
|
|
930
907
|
# Output configurations for Cloud Storage.
|
@@ -1528,10 +1505,10 @@ module Google
|
|
1528
1505
|
# expected format is `projects/{project}/locations/{location}`.
|
1529
1506
|
# @!attribute [rw] page_size
|
1530
1507
|
# @return [::Integer]
|
1531
|
-
# Number of results per requests. A valid page_size ranges from 0 to
|
1508
|
+
# Number of results per requests. A valid page_size ranges from 0 to 100
|
1532
1509
|
# inclusive. If the page_size is zero or unspecified, a page size of 5 will
|
1533
|
-
# be chosen. If the page size exceeds
|
1534
|
-
# that a call might return fewer results than the requested page size.
|
1510
|
+
# be chosen. If the page size exceeds 100, it will be coerced down to 100.
|
1511
|
+
# Note that a call might return fewer results than the requested page size.
|
1535
1512
|
# @!attribute [rw] page_token
|
1536
1513
|
# @return [::String]
|
1537
1514
|
# A page token, received from a previous
|
@@ -1679,8 +1656,8 @@ module Google
|
|
1679
1656
|
# @!attribute [rw] page_size
|
1680
1657
|
# @return [::Integer]
|
1681
1658
|
# The maximum number of PhraseSets to return. The service may return fewer
|
1682
|
-
# than this value. If unspecified, at most
|
1683
|
-
# The maximum value is
|
1659
|
+
# than this value. If unspecified, at most 5 PhraseSets will be returned.
|
1660
|
+
# The maximum value is 100; values above 100 will be coerced to 100.
|
1684
1661
|
# @!attribute [rw] page_token
|
1685
1662
|
# @return [::String]
|
1686
1663
|
# A page token, received from a previous
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-speech-v2
|
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: 2023-
|
11
|
+
date: 2023-05-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|