google-cloud-speech-v2 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/google/cloud/speech/v2/rest.rb +37 -0
- data/lib/google/cloud/speech/v2/speech/client.rb +71 -77
- data/lib/google/cloud/speech/v2/speech/operations.rb +12 -14
- data/lib/google/cloud/speech/v2/speech/rest/client.rb +2074 -0
- data/lib/google/cloud/speech/v2/speech/rest/operations.rb +793 -0
- data/lib/google/cloud/speech/v2/speech/rest/service_stub.rb +1358 -0
- data/lib/google/cloud/speech/v2/speech/rest.rb +53 -0
- data/lib/google/cloud/speech/v2/speech.rb +7 -1
- data/lib/google/cloud/speech/v2/version.rb +1 -1
- data/lib/google/cloud/speech/v2.rb +7 -2
- data/proto_docs/google/api/client.rb +318 -0
- data/proto_docs/google/api/launch_stage.rb +71 -0
- data/proto_docs/google/rpc/status.rb +4 -2
- 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: cf12e4d7b09605a803e9337cf9085e0e83db8d381e0c16de517c8d50dad3d88e
|
4
|
+
data.tar.gz: 7ff56273fd9befca33be9ebc2e342be9d8c7050f4a2be53c65b0126cb327382b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 178fe7e5ce4d79f4f49a0cd64cb296e8afdb6b3507fe934c03369ab20ac7070aa0ef6fef8b81ec08510c69b2730008a42fc9d4a52581d710a68dcc99018f64f2
|
7
|
+
data.tar.gz: f0789fbd8ef72e18634fc27a4becc2fccba89f17e501399398d8519373e116f6e62bb2522fdce43e5393890f48c60c03aa111ad2810e5a43fa6a48cd94fa3d17
|
data/README.md
CHANGED
@@ -46,7 +46,7 @@ for general usage information.
|
|
46
46
|
## Enabling Logging
|
47
47
|
|
48
48
|
To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
|
49
|
-
The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/
|
49
|
+
The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
|
50
50
|
or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
|
51
51
|
that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
|
52
52
|
and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2023 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
|
+
require "google/cloud/speech/v2/speech/rest"
|
20
|
+
require "google/cloud/speech/v2/version"
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Cloud
|
24
|
+
module Speech
|
25
|
+
##
|
26
|
+
# To load just the REST part of this package, including all its services, and instantiate a REST client:
|
27
|
+
#
|
28
|
+
# @example
|
29
|
+
#
|
30
|
+
# require "google/cloud/speech/v2/rest"
|
31
|
+
# client = ::Google::Cloud::Speech::V2::Speech::Rest::Client.new
|
32
|
+
#
|
33
|
+
module V2
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -215,14 +215,14 @@ module Google
|
|
215
215
|
# # Call the create_recognizer method.
|
216
216
|
# result = client.create_recognizer request
|
217
217
|
#
|
218
|
-
# # The returned object is of type Gapic::Operation. You can use
|
219
|
-
# #
|
220
|
-
# #
|
218
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
219
|
+
# # check the status of an operation, cancel it, or wait for results.
|
220
|
+
# # Here is how to wait for a response.
|
221
221
|
# result.wait_until_done! timeout: 60
|
222
222
|
# if result.response?
|
223
223
|
# p result.response
|
224
224
|
# else
|
225
|
-
# puts "
|
225
|
+
# puts "No response received."
|
226
226
|
# end
|
227
227
|
#
|
228
228
|
def create_recognizer request, options = nil
|
@@ -323,13 +323,11 @@ module Google
|
|
323
323
|
# # Call the list_recognizers method.
|
324
324
|
# result = client.list_recognizers request
|
325
325
|
#
|
326
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
327
|
-
# #
|
328
|
-
#
|
329
|
-
# # methods are also available for managing paging directly.
|
330
|
-
# result.each do |response|
|
326
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
327
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
328
|
+
# result.each do |item|
|
331
329
|
# # Each element is of type ::Google::Cloud::Speech::V2::Recognizer.
|
332
|
-
# p
|
330
|
+
# p item
|
333
331
|
# end
|
334
332
|
#
|
335
333
|
def list_recognizers request, options = nil
|
@@ -513,14 +511,14 @@ module Google
|
|
513
511
|
# # Call the update_recognizer method.
|
514
512
|
# result = client.update_recognizer request
|
515
513
|
#
|
516
|
-
# # The returned object is of type Gapic::Operation. You can use
|
517
|
-
# #
|
518
|
-
# #
|
514
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
515
|
+
# # check the status of an operation, cancel it, or wait for results.
|
516
|
+
# # Here is how to wait for a response.
|
519
517
|
# result.wait_until_done! timeout: 60
|
520
518
|
# if result.response?
|
521
519
|
# p result.response
|
522
520
|
# else
|
523
|
-
# puts "
|
521
|
+
# puts "No response received."
|
524
522
|
# end
|
525
523
|
#
|
526
524
|
def update_recognizer request, options = nil
|
@@ -617,14 +615,14 @@ module Google
|
|
617
615
|
# # Call the delete_recognizer method.
|
618
616
|
# result = client.delete_recognizer request
|
619
617
|
#
|
620
|
-
# # The returned object is of type Gapic::Operation. You can use
|
621
|
-
# #
|
622
|
-
# #
|
618
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
619
|
+
# # check the status of an operation, cancel it, or wait for results.
|
620
|
+
# # Here is how to wait for a response.
|
623
621
|
# result.wait_until_done! timeout: 60
|
624
622
|
# if result.response?
|
625
623
|
# p result.response
|
626
624
|
# else
|
627
|
-
# puts "
|
625
|
+
# puts "No response received."
|
628
626
|
# end
|
629
627
|
#
|
630
628
|
def delete_recognizer request, options = nil
|
@@ -718,14 +716,14 @@ module Google
|
|
718
716
|
# # Call the undelete_recognizer method.
|
719
717
|
# result = client.undelete_recognizer request
|
720
718
|
#
|
721
|
-
# # The returned object is of type Gapic::Operation. You can use
|
722
|
-
# #
|
723
|
-
# #
|
719
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
720
|
+
# # check the status of an operation, cancel it, or wait for results.
|
721
|
+
# # Here is how to wait for a response.
|
724
722
|
# result.wait_until_done! timeout: 60
|
725
723
|
# if result.response?
|
726
724
|
# p result.response
|
727
725
|
# else
|
728
|
-
# puts "
|
726
|
+
# puts "No response received."
|
729
727
|
# end
|
730
728
|
#
|
731
729
|
def undelete_recognizer request, options = nil
|
@@ -916,22 +914,22 @@ module Google
|
|
916
914
|
# # Create a client object. The client can be reused for multiple calls.
|
917
915
|
# client = Google::Cloud::Speech::V2::Speech::Client.new
|
918
916
|
#
|
919
|
-
# # Create an input stream
|
917
|
+
# # Create an input stream.
|
920
918
|
# input = Gapic::StreamInput.new
|
921
919
|
#
|
922
920
|
# # Call the streaming_recognize method to start streaming.
|
923
921
|
# output = client.streaming_recognize input
|
924
922
|
#
|
925
|
-
# # Send requests on the stream. For each request,
|
926
|
-
# #
|
923
|
+
# # Send requests on the stream. For each request object, set fields by
|
924
|
+
# # passing keyword arguments. Be sure to close the stream when done.
|
927
925
|
# input << Google::Cloud::Speech::V2::StreamingRecognizeRequest.new
|
928
926
|
# input << Google::Cloud::Speech::V2::StreamingRecognizeRequest.new
|
929
927
|
# input.close
|
930
928
|
#
|
931
|
-
# #
|
932
|
-
# #
|
933
|
-
# output.each do |
|
934
|
-
# p
|
929
|
+
# # The returned object is a streamed enumerable yielding elements of type
|
930
|
+
# # ::Google::Cloud::Speech::V2::StreamingRecognizeResponse
|
931
|
+
# output.each do |current_response|
|
932
|
+
# p current_response
|
935
933
|
# end
|
936
934
|
#
|
937
935
|
def streaming_recognize request, options = nil
|
@@ -1038,14 +1036,14 @@ module Google
|
|
1038
1036
|
# # Call the batch_recognize method.
|
1039
1037
|
# result = client.batch_recognize request
|
1040
1038
|
#
|
1041
|
-
# # The returned object is of type Gapic::Operation. You can use
|
1042
|
-
# #
|
1043
|
-
# #
|
1039
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1040
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1041
|
+
# # Here is how to wait for a response.
|
1044
1042
|
# result.wait_until_done! timeout: 60
|
1045
1043
|
# if result.response?
|
1046
1044
|
# p result.response
|
1047
1045
|
# else
|
1048
|
-
# puts "
|
1046
|
+
# puts "No response received."
|
1049
1047
|
# end
|
1050
1048
|
#
|
1051
1049
|
def batch_recognize request, options = nil
|
@@ -1320,14 +1318,14 @@ module Google
|
|
1320
1318
|
# # Call the create_custom_class method.
|
1321
1319
|
# result = client.create_custom_class request
|
1322
1320
|
#
|
1323
|
-
# # The returned object is of type Gapic::Operation. You can use
|
1324
|
-
# #
|
1325
|
-
# #
|
1321
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1322
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1323
|
+
# # Here is how to wait for a response.
|
1326
1324
|
# result.wait_until_done! timeout: 60
|
1327
1325
|
# if result.response?
|
1328
1326
|
# p result.response
|
1329
1327
|
# else
|
1330
|
-
# puts "
|
1328
|
+
# puts "No response received."
|
1331
1329
|
# end
|
1332
1330
|
#
|
1333
1331
|
def create_custom_class request, options = nil
|
@@ -1429,13 +1427,11 @@ module Google
|
|
1429
1427
|
# # Call the list_custom_classes method.
|
1430
1428
|
# result = client.list_custom_classes request
|
1431
1429
|
#
|
1432
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
1433
|
-
# #
|
1434
|
-
#
|
1435
|
-
# # methods are also available for managing paging directly.
|
1436
|
-
# result.each do |response|
|
1430
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
1431
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
1432
|
+
# result.each do |item|
|
1437
1433
|
# # Each element is of type ::Google::Cloud::Speech::V2::CustomClass.
|
1438
|
-
# p
|
1434
|
+
# p item
|
1439
1435
|
# end
|
1440
1436
|
#
|
1441
1437
|
def list_custom_classes request, options = nil
|
@@ -1618,14 +1614,14 @@ module Google
|
|
1618
1614
|
# # Call the update_custom_class method.
|
1619
1615
|
# result = client.update_custom_class request
|
1620
1616
|
#
|
1621
|
-
# # The returned object is of type Gapic::Operation. You can use
|
1622
|
-
# #
|
1623
|
-
# #
|
1617
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1618
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1619
|
+
# # Here is how to wait for a response.
|
1624
1620
|
# result.wait_until_done! timeout: 60
|
1625
1621
|
# if result.response?
|
1626
1622
|
# p result.response
|
1627
1623
|
# else
|
1628
|
-
# puts "
|
1624
|
+
# puts "No response received."
|
1629
1625
|
# end
|
1630
1626
|
#
|
1631
1627
|
def update_custom_class request, options = nil
|
@@ -1723,14 +1719,14 @@ module Google
|
|
1723
1719
|
# # Call the delete_custom_class method.
|
1724
1720
|
# result = client.delete_custom_class request
|
1725
1721
|
#
|
1726
|
-
# # The returned object is of type Gapic::Operation. You can use
|
1727
|
-
# #
|
1728
|
-
# #
|
1722
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1723
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1724
|
+
# # Here is how to wait for a response.
|
1729
1725
|
# result.wait_until_done! timeout: 60
|
1730
1726
|
# if result.response?
|
1731
1727
|
# p result.response
|
1732
1728
|
# else
|
1733
|
-
# puts "
|
1729
|
+
# puts "No response received."
|
1734
1730
|
# end
|
1735
1731
|
#
|
1736
1732
|
def delete_custom_class request, options = nil
|
@@ -1825,14 +1821,14 @@ module Google
|
|
1825
1821
|
# # Call the undelete_custom_class method.
|
1826
1822
|
# result = client.undelete_custom_class request
|
1827
1823
|
#
|
1828
|
-
# # The returned object is of type Gapic::Operation. You can use
|
1829
|
-
# #
|
1830
|
-
# #
|
1824
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1825
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1826
|
+
# # Here is how to wait for a response.
|
1831
1827
|
# result.wait_until_done! timeout: 60
|
1832
1828
|
# if result.response?
|
1833
1829
|
# p result.response
|
1834
1830
|
# else
|
1835
|
-
# puts "
|
1831
|
+
# puts "No response received."
|
1836
1832
|
# end
|
1837
1833
|
#
|
1838
1834
|
def undelete_custom_class request, options = nil
|
@@ -1930,14 +1926,14 @@ module Google
|
|
1930
1926
|
# # Call the create_phrase_set method.
|
1931
1927
|
# result = client.create_phrase_set request
|
1932
1928
|
#
|
1933
|
-
# # The returned object is of type Gapic::Operation. You can use
|
1934
|
-
# #
|
1935
|
-
# #
|
1929
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1930
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1931
|
+
# # Here is how to wait for a response.
|
1936
1932
|
# result.wait_until_done! timeout: 60
|
1937
1933
|
# if result.response?
|
1938
1934
|
# p result.response
|
1939
1935
|
# else
|
1940
|
-
# puts "
|
1936
|
+
# puts "No response received."
|
1941
1937
|
# end
|
1942
1938
|
#
|
1943
1939
|
def create_phrase_set request, options = nil
|
@@ -2038,13 +2034,11 @@ module Google
|
|
2038
2034
|
# # Call the list_phrase_sets method.
|
2039
2035
|
# result = client.list_phrase_sets request
|
2040
2036
|
#
|
2041
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
2042
|
-
# #
|
2043
|
-
#
|
2044
|
-
# # methods are also available for managing paging directly.
|
2045
|
-
# result.each do |response|
|
2037
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
2038
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
2039
|
+
# result.each do |item|
|
2046
2040
|
# # Each element is of type ::Google::Cloud::Speech::V2::PhraseSet.
|
2047
|
-
# p
|
2041
|
+
# p item
|
2048
2042
|
# end
|
2049
2043
|
#
|
2050
2044
|
def list_phrase_sets request, options = nil
|
@@ -2226,14 +2220,14 @@ module Google
|
|
2226
2220
|
# # Call the update_phrase_set method.
|
2227
2221
|
# result = client.update_phrase_set request
|
2228
2222
|
#
|
2229
|
-
# # The returned object is of type Gapic::Operation. You can use
|
2230
|
-
# #
|
2231
|
-
# #
|
2223
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
2224
|
+
# # check the status of an operation, cancel it, or wait for results.
|
2225
|
+
# # Here is how to wait for a response.
|
2232
2226
|
# result.wait_until_done! timeout: 60
|
2233
2227
|
# if result.response?
|
2234
2228
|
# p result.response
|
2235
2229
|
# else
|
2236
|
-
# puts "
|
2230
|
+
# puts "No response received."
|
2237
2231
|
# end
|
2238
2232
|
#
|
2239
2233
|
def update_phrase_set request, options = nil
|
@@ -2330,14 +2324,14 @@ module Google
|
|
2330
2324
|
# # Call the delete_phrase_set method.
|
2331
2325
|
# result = client.delete_phrase_set request
|
2332
2326
|
#
|
2333
|
-
# # The returned object is of type Gapic::Operation. You can use
|
2334
|
-
# #
|
2335
|
-
# #
|
2327
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
2328
|
+
# # check the status of an operation, cancel it, or wait for results.
|
2329
|
+
# # Here is how to wait for a response.
|
2336
2330
|
# result.wait_until_done! timeout: 60
|
2337
2331
|
# if result.response?
|
2338
2332
|
# p result.response
|
2339
2333
|
# else
|
2340
|
-
# puts "
|
2334
|
+
# puts "No response received."
|
2341
2335
|
# end
|
2342
2336
|
#
|
2343
2337
|
def delete_phrase_set request, options = nil
|
@@ -2431,14 +2425,14 @@ module Google
|
|
2431
2425
|
# # Call the undelete_phrase_set method.
|
2432
2426
|
# result = client.undelete_phrase_set request
|
2433
2427
|
#
|
2434
|
-
# # The returned object is of type Gapic::Operation. You can use
|
2435
|
-
# #
|
2436
|
-
# #
|
2428
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
2429
|
+
# # check the status of an operation, cancel it, or wait for results.
|
2430
|
+
# # Here is how to wait for a response.
|
2437
2431
|
# result.wait_until_done! timeout: 60
|
2438
2432
|
# if result.response?
|
2439
2433
|
# p result.response
|
2440
2434
|
# else
|
2441
|
-
# puts "
|
2435
|
+
# puts "No response received."
|
2442
2436
|
# end
|
2443
2437
|
#
|
2444
2438
|
def undelete_phrase_set request, options = nil
|
@@ -158,13 +158,11 @@ module Google
|
|
158
158
|
# # Call the list_operations method.
|
159
159
|
# result = client.list_operations request
|
160
160
|
#
|
161
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
162
|
-
# #
|
163
|
-
#
|
164
|
-
# # methods are also available for managing paging directly.
|
165
|
-
# result.each do |response|
|
161
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
162
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
163
|
+
# result.each do |item|
|
166
164
|
# # Each element is of type ::Google::Longrunning::Operation.
|
167
|
-
# p
|
165
|
+
# p item
|
168
166
|
# end
|
169
167
|
#
|
170
168
|
def list_operations request, options = nil
|
@@ -253,14 +251,14 @@ module Google
|
|
253
251
|
# # Call the get_operation method.
|
254
252
|
# result = client.get_operation request
|
255
253
|
#
|
256
|
-
# # The returned object is of type Gapic::Operation. You can use
|
257
|
-
# #
|
258
|
-
# #
|
254
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
255
|
+
# # check the status of an operation, cancel it, or wait for results.
|
256
|
+
# # Here is how to wait for a response.
|
259
257
|
# result.wait_until_done! timeout: 60
|
260
258
|
# if result.response?
|
261
259
|
# p result.response
|
262
260
|
# else
|
263
|
-
# puts "
|
261
|
+
# puts "No response received."
|
264
262
|
# end
|
265
263
|
#
|
266
264
|
def get_operation request, options = nil
|
@@ -540,14 +538,14 @@ module Google
|
|
540
538
|
# # Call the wait_operation method.
|
541
539
|
# result = client.wait_operation request
|
542
540
|
#
|
543
|
-
# # The returned object is of type Gapic::Operation. You can use
|
544
|
-
# #
|
545
|
-
# #
|
541
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
542
|
+
# # check the status of an operation, cancel it, or wait for results.
|
543
|
+
# # Here is how to wait for a response.
|
546
544
|
# result.wait_until_done! timeout: 60
|
547
545
|
# if result.response?
|
548
546
|
# p result.response
|
549
547
|
# else
|
550
|
-
# puts "
|
548
|
+
# puts "No response received."
|
551
549
|
# end
|
552
550
|
#
|
553
551
|
def wait_operation request, options = nil
|