google-cloud-speech-v1 0.1.4 → 0.2.4
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/README.md +4 -0
- data/lib/google/cloud/speech/v1/cloud_speech_services_pb.rb +3 -3
- data/lib/google/cloud/speech/v1/speech/client.rb +19 -14
- data/lib/google/cloud/speech/v1/speech/operations.rb +17 -11
- data/lib/google/cloud/speech/v1/version.rb +1 -1
- metadata +35 -8
- data/lib/google/cloud/common_resources_pb.rb +0 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 669b006b4418754372cba923b977d2ba683ac763c2561845dbde00c060066ad8
|
4
|
+
data.tar.gz: 3ab78c9578a005002e30a00fddf84a3b652ea7940b6988064eb7f4a7d2c35c86
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6ee168be86d6969404ef2f85a299258ea54a365c4ee9fef3e9086f702175dac7d593a353fe59b6a492ae8fc00f5d5b730848cfe3fc3b1345af4fd40a92a49aec
|
7
|
+
data.tar.gz: 619ffde5af2aa7cb73b3a7e3d48698758e06abc7ae115399b26988367a8bbb3bee072514f4f3c10f11be02ac96a00ebbddfe6e845e2b908ca7cbe94bb2383fae
|
data/README.md
CHANGED
@@ -18,6 +18,7 @@ In order to use this library, you first need to go through the following steps:
|
|
18
18
|
|
19
19
|
1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
|
20
20
|
1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
|
21
|
+
1. [Enable the API.](https://console.cloud.google.com/apis/library/speech.googleapis.com)
|
21
22
|
1. {file:AUTHENTICATION.md Set up authentication.}
|
22
23
|
|
23
24
|
## Quick Start
|
@@ -33,6 +34,9 @@ response = client.recognize request
|
|
33
34
|
View the [Client Library Documentation](https://googleapis.dev/ruby/google-cloud-speech-v1/latest)
|
34
35
|
for class and method documentation.
|
35
36
|
|
37
|
+
See also the [Product Documentation](https://cloud.google.com/speech-to-text)
|
38
|
+
for general usage information.
|
39
|
+
|
36
40
|
## Enabling Logging
|
37
41
|
|
38
42
|
To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
|
@@ -36,17 +36,17 @@ module Google
|
|
36
36
|
|
37
37
|
# Performs synchronous speech recognition: receive results after all audio
|
38
38
|
# has been sent and processed.
|
39
|
-
rpc :Recognize, RecognizeRequest, RecognizeResponse
|
39
|
+
rpc :Recognize, Google::Cloud::Speech::V1::RecognizeRequest, Google::Cloud::Speech::V1::RecognizeResponse
|
40
40
|
# Performs asynchronous speech recognition: receive results via the
|
41
41
|
# google.longrunning.Operations interface. Returns either an
|
42
42
|
# `Operation.error` or an `Operation.response` which contains
|
43
43
|
# a `LongRunningRecognizeResponse` message.
|
44
44
|
# For more information on asynchronous speech recognition, see the
|
45
45
|
# [how-to](https://cloud.google.com/speech-to-text/docs/async-recognize).
|
46
|
-
rpc :LongRunningRecognize, LongRunningRecognizeRequest, Google::Longrunning::Operation
|
46
|
+
rpc :LongRunningRecognize, Google::Cloud::Speech::V1::LongRunningRecognizeRequest, Google::Longrunning::Operation
|
47
47
|
# Performs bidirectional streaming speech recognition: receive results while
|
48
48
|
# sending audio. This method is only available via the gRPC API (not REST).
|
49
|
-
rpc :StreamingRecognize, stream(StreamingRecognizeRequest), stream(StreamingRecognizeResponse)
|
49
|
+
rpc :StreamingRecognize, stream(Google::Cloud::Speech::V1::StreamingRecognizeRequest), stream(Google::Cloud::Speech::V1::StreamingRecognizeResponse)
|
50
50
|
end
|
51
51
|
|
52
52
|
Stub = Service.rpc_stub_class
|
@@ -68,7 +68,7 @@ module Google
|
|
68
68
|
initial_delay: 0.1,
|
69
69
|
max_delay: 60.0,
|
70
70
|
multiplier: 1.3,
|
71
|
-
retry_codes: [
|
71
|
+
retry_codes: [14, 4]
|
72
72
|
}
|
73
73
|
|
74
74
|
default_config.rpcs.long_running_recognize.timeout = 5000.0
|
@@ -78,7 +78,7 @@ module Google
|
|
78
78
|
initial_delay: 0.1,
|
79
79
|
max_delay: 60.0,
|
80
80
|
multiplier: 1.3,
|
81
|
-
retry_codes: [
|
81
|
+
retry_codes: [14, 4]
|
82
82
|
}
|
83
83
|
|
84
84
|
default_config
|
@@ -146,7 +146,8 @@ module Google
|
|
146
146
|
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
147
147
|
credentials = Credentials.new credentials, scope: @config.scope
|
148
148
|
end
|
149
|
-
@quota_project_id =
|
149
|
+
@quota_project_id = @config.quota_project
|
150
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
150
151
|
|
151
152
|
@operations_client = Operations.new do |config|
|
152
153
|
config.credentials = credentials
|
@@ -433,24 +434,28 @@ module Google
|
|
433
434
|
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
434
435
|
# trigger a retry.
|
435
436
|
# @return [::Hash]
|
437
|
+
# @!attribute [rw] quota_project
|
438
|
+
# A separate project against which to charge quota.
|
439
|
+
# @return [::String]
|
436
440
|
#
|
437
441
|
class Configuration
|
438
442
|
extend ::Gapic::Config
|
439
443
|
|
440
|
-
config_attr :endpoint,
|
441
|
-
config_attr :credentials,
|
444
|
+
config_attr :endpoint, "speech.googleapis.com", ::String
|
445
|
+
config_attr :credentials, nil do |value|
|
442
446
|
allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
443
447
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
444
448
|
allowed.any? { |klass| klass === value }
|
445
449
|
end
|
446
|
-
config_attr :scope,
|
447
|
-
config_attr :lib_name,
|
448
|
-
config_attr :lib_version,
|
449
|
-
config_attr(:channel_args,
|
450
|
-
config_attr :interceptors,
|
451
|
-
config_attr :timeout,
|
452
|
-
config_attr :metadata,
|
453
|
-
config_attr :retry_policy,
|
450
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
451
|
+
config_attr :lib_name, nil, ::String, nil
|
452
|
+
config_attr :lib_version, nil, ::String, nil
|
453
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
|
454
|
+
config_attr :interceptors, nil, ::Array, nil
|
455
|
+
config_attr :timeout, nil, ::Numeric, nil
|
456
|
+
config_attr :metadata, nil, ::Hash, nil
|
457
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
458
|
+
config_attr :quota_project, nil, ::String, nil
|
454
459
|
|
455
460
|
# @private
|
456
461
|
def initialize parent_config = nil
|
@@ -466,7 +471,7 @@ module Google
|
|
466
471
|
def rpcs
|
467
472
|
@rpcs ||= begin
|
468
473
|
parent_rpcs = nil
|
469
|
-
parent_rpcs = @parent_config.rpcs if @parent_config&.respond_to?
|
474
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
|
470
475
|
Rpcs.new parent_rpcs
|
471
476
|
end
|
472
477
|
end
|
@@ -85,6 +85,8 @@ module Google
|
|
85
85
|
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
86
86
|
credentials = Credentials.new credentials, scope: @config.scope
|
87
87
|
end
|
88
|
+
@quota_project_id = @config.quota_project
|
89
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
88
90
|
|
89
91
|
@operations_stub = ::Gapic::ServiceStub.new(
|
90
92
|
::Google::Longrunning::Operations::Stub,
|
@@ -464,24 +466,28 @@ module Google
|
|
464
466
|
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
465
467
|
# trigger a retry.
|
466
468
|
# @return [::Hash]
|
469
|
+
# @!attribute [rw] quota_project
|
470
|
+
# A separate project against which to charge quota.
|
471
|
+
# @return [::String]
|
467
472
|
#
|
468
473
|
class Configuration
|
469
474
|
extend ::Gapic::Config
|
470
475
|
|
471
|
-
config_attr :endpoint,
|
472
|
-
config_attr :credentials,
|
476
|
+
config_attr :endpoint, "speech.googleapis.com", ::String
|
477
|
+
config_attr :credentials, nil do |value|
|
473
478
|
allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
474
479
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
475
480
|
allowed.any? { |klass| klass === value }
|
476
481
|
end
|
477
|
-
config_attr :scope,
|
478
|
-
config_attr :lib_name,
|
479
|
-
config_attr :lib_version,
|
480
|
-
config_attr(:channel_args,
|
481
|
-
config_attr :interceptors,
|
482
|
-
config_attr :timeout,
|
483
|
-
config_attr :metadata,
|
484
|
-
config_attr :retry_policy,
|
482
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
483
|
+
config_attr :lib_name, nil, ::String, nil
|
484
|
+
config_attr :lib_version, nil, ::String, nil
|
485
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
|
486
|
+
config_attr :interceptors, nil, ::Array, nil
|
487
|
+
config_attr :timeout, nil, ::Numeric, nil
|
488
|
+
config_attr :metadata, nil, ::Hash, nil
|
489
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
490
|
+
config_attr :quota_project, nil, ::String, nil
|
485
491
|
|
486
492
|
# @private
|
487
493
|
def initialize parent_config = nil
|
@@ -497,7 +503,7 @@ module Google
|
|
497
503
|
def rpcs
|
498
504
|
@rpcs ||= begin
|
499
505
|
parent_rpcs = nil
|
500
|
-
parent_rpcs = @parent_config.rpcs if @parent_config&.respond_to?
|
506
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
|
501
507
|
Rpcs.new parent_rpcs
|
502
508
|
end
|
503
509
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-speech-v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-08-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.3'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '0.
|
26
|
+
version: '0.3'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: google-cloud-errors
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -58,14 +58,42 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '5.
|
61
|
+
version: '5.14'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '5.
|
68
|
+
version: '5.14'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: minitest-focus
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '1.1'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '1.1'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: minitest-rg
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '5.2'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '5.2'
|
69
97
|
- !ruby/object:Gem::Dependency
|
70
98
|
name: rake
|
71
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -138,7 +166,6 @@ files:
|
|
138
166
|
- LICENSE.md
|
139
167
|
- README.md
|
140
168
|
- lib/google-cloud-speech-v1.rb
|
141
|
-
- lib/google/cloud/common_resources_pb.rb
|
142
169
|
- lib/google/cloud/speech/v1.rb
|
143
170
|
- lib/google/cloud/speech/v1/cloud_speech_pb.rb
|
144
171
|
- lib/google/cloud/speech/v1/cloud_speech_services_pb.rb
|
@@ -176,7 +203,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
176
203
|
- !ruby/object:Gem::Version
|
177
204
|
version: '0'
|
178
205
|
requirements: []
|
179
|
-
rubygems_version: 3.
|
206
|
+
rubygems_version: 3.1.3
|
180
207
|
signing_key:
|
181
208
|
specification_version: 4
|
182
209
|
summary: API Client library for the Cloud Speech-to-Text V1 API
|
@@ -1,15 +0,0 @@
|
|
1
|
-
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
-
# source: google/cloud/common_resources.proto
|
3
|
-
|
4
|
-
require 'google/protobuf'
|
5
|
-
|
6
|
-
require 'google/api/resource_pb'
|
7
|
-
Google::Protobuf::DescriptorPool.generated_pool.build do
|
8
|
-
add_file("google/cloud/common_resources.proto", :syntax => :proto3) do
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
module Google
|
13
|
-
module Cloud
|
14
|
-
end
|
15
|
-
end
|