google-cloud-speech-v1 0.7.0 → 0.7.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4df4067d98b6dde2049d349aaba7e230db5c79344083061a7836304474c8c7e4
4
- data.tar.gz: 331c15b79d60c83e8f6f613059765b9c51587e223d7f4cfdf779eb5372661356
3
+ metadata.gz: d9704d715d6ee3240fdd999ec6573703099c998a6bcc9fa24da6245b748c2262
4
+ data.tar.gz: 3b3464522f9039b8defd055f8c542c8a3752c45caeb6b3db056da261a3ab6174
5
5
  SHA512:
6
- metadata.gz: d7b43c7650ab17d38e959b078bdf2d9bb339b06befca56f17f11c1c5a7000d560fa7cde22779781c0e1d598e3e0e4faf236fe3f47221456b25e0d5c0b78217e8
7
- data.tar.gz: 7e24249767948c0e9a766993dc71c67b4c71bca11afcb2620cf1068b65b0d8afed18878d31e925dc7f00a16834f75c30513bfbeddbc3e9195964e9a968e80154
6
+ metadata.gz: '09cf1cbd69314a5e96e88764d86dac7cab54445d22d10e50e924715b5dbdaa473b3d928e99eb3492940f84c342845322db02f74aeb16aafc299a537d13c0ab98'
7
+ data.tar.gz: 8828db4f693acaac725ce5fc61e56ee2220963b4152450359c66b89392013f89604883754ba4731f5d62ca4ff62825b7249e68c0dbdb1874ce4525a55263f9f5
data/.yardopts CHANGED
@@ -1,5 +1,5 @@
1
1
  --no-private
2
- --title=Cloud Speech-to-Text V1 API
2
+ --title="Cloud Speech-to-Text V1 API"
3
3
  --exclude _pb\.rb$
4
4
  --markup markdown
5
5
  --markup-provider redcarpet
data/AUTHENTICATION.md CHANGED
@@ -120,15 +120,6 @@ To configure your system for this, simply:
120
120
  **NOTE:** This is _not_ recommended for running in production. The Cloud SDK
121
121
  *should* only be used during development.
122
122
 
123
- [gce-how-to]: https://cloud.google.com/compute/docs/authentication#using
124
- [dev-console]: https://console.cloud.google.com/project
125
-
126
- [enable-apis]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/enable-apis.png
127
-
128
- [create-new-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account.png
129
- [create-new-service-account-existing-keys]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account-existing-keys.png
130
- [reuse-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/reuse-service-account.png
131
-
132
123
  ## Creating a Service Account
133
124
 
134
125
  Google Cloud requires **Service Account Credentials** to
@@ -139,31 +130,22 @@ If you are not running this client within
139
130
  [Google Cloud Platform environments](#google-cloud-platform-environments), you
140
131
  need a Google Developers service account.
141
132
 
142
- 1. Visit the [Google Developers Console][dev-console].
133
+ 1. Visit the [Google Cloud Console](https://console.cloud.google.com/project).
143
134
  2. Create a new project or click on an existing project.
144
- 3. Activate the slide-out navigation tray and select **API Manager**. From
135
+ 3. Activate the menu in the upper left and select **APIs & Services**. From
145
136
  here, you will enable the APIs that your application requires.
146
137
 
147
- ![Enable the APIs that your application requires][enable-apis]
148
-
149
138
  *Note: You may need to enable billing in order to use these services.*
150
139
 
151
140
  4. Select **Credentials** from the side navigation.
152
141
 
153
- You should see a screen like one of the following.
154
-
155
- ![Create a new service account][create-new-service-account]
156
-
157
- ![Create a new service account With Existing Keys][create-new-service-account-existing-keys]
158
-
159
- Find the "Add credentials" drop down and select "Service account" to be
160
- guided through downloading a new JSON key file.
142
+ Find the "Create credentials" drop down near the top of the page, and select
143
+ "Service account" to be guided through downloading a new JSON key file.
161
144
 
162
145
  If you want to re-use an existing service account, you can easily generate a
163
- new key file. Just select the account you wish to re-use, and click "Generate
164
- new JSON key":
165
-
166
- ![Re-use an existing service account][reuse-service-account]
146
+ new key file. Just select the account you wish to re-use, click the pencil
147
+ tool on the right side to edit the service account, select the **Keys** tab,
148
+ and then select **Add Key**.
167
149
 
168
150
  The key file you download will be used by this library to authenticate API
169
151
  requests and should be stored in a secure location.
data/README.md CHANGED
@@ -37,7 +37,7 @@ request = ::Google::Cloud::Speech::V1::RecognizeRequest.new # (request fields as
37
37
  response = client.recognize request
38
38
  ```
39
39
 
40
- View the [Client Library Documentation](https://googleapis.dev/ruby/google-cloud-speech-v1/latest)
40
+ View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-speech-v1/latest)
41
41
  for class and method documentation.
42
42
 
43
43
  See also the [Product Documentation](https://cloud.google.com/speech-to-text)
@@ -1,17 +1,17 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/speech/v1/cloud_speech.proto
3
3
 
4
+ require 'google/protobuf'
5
+
4
6
  require 'google/api/annotations_pb'
5
7
  require 'google/api/client_pb'
6
8
  require 'google/api/field_behavior_pb'
7
9
  require 'google/cloud/speech/v1/resource_pb'
8
10
  require 'google/longrunning/operations_pb'
9
- require 'google/protobuf/any_pb'
10
11
  require 'google/protobuf/duration_pb'
11
12
  require 'google/protobuf/timestamp_pb'
12
13
  require 'google/protobuf/wrappers_pb'
13
14
  require 'google/rpc/status_pb'
14
- require 'google/protobuf'
15
15
 
16
16
  Google::Protobuf::DescriptorPool.generated_pool.build do
17
17
  add_file("google/cloud/speech/v1/cloud_speech.proto", :syntax => :proto3) do
@@ -1,11 +1,10 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/speech/v1/resource.proto
3
3
 
4
- require 'google/api/resource_pb'
5
- require 'google/protobuf/timestamp_pb'
6
- require 'google/api/annotations_pb'
7
4
  require 'google/protobuf'
8
5
 
6
+ require 'google/api/resource_pb'
7
+
9
8
  Google::Protobuf::DescriptorPool.generated_pool.build do
10
9
  add_file("google/cloud/speech/v1/resource.proto", :syntax => :proto3) do
11
10
  add_message "google.cloud.speech.v1.CustomClass" do
@@ -147,6 +147,7 @@ module Google
147
147
 
148
148
  @operations_client = Operations.new do |config|
149
149
  config.credentials = credentials
150
+ config.quota_project = @quota_project_id
150
151
  config.endpoint = @config.endpoint
151
152
  end
152
153
 
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Speech
23
23
  module V1
24
- VERSION = "0.7.0"
24
+ VERSION = "0.7.3"
25
25
  end
26
26
  end
27
27
  end
@@ -25,6 +25,8 @@ module Google
25
25
  ##
26
26
  # To load this package, including all its services, and instantiate a client:
27
27
  #
28
+ # @example
29
+ #
28
30
  # require "google/cloud/speech/v1"
29
31
  # client = ::Google::Cloud::Speech::V1::Speech::Client.new
30
32
  #
@@ -33,11 +33,7 @@ module Google
33
33
  # // For Kubernetes resources, the format is {api group}/{kind}.
34
34
  # option (google.api.resource) = {
35
35
  # type: "pubsub.googleapis.com/Topic"
36
- # name_descriptor: {
37
- # pattern: "projects/{project}/topics/{topic}"
38
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
39
- # parent_name_extractor: "projects/{project}"
40
- # }
36
+ # pattern: "projects/{project}/topics/{topic}"
41
37
  # };
42
38
  # }
43
39
  #
@@ -45,10 +41,7 @@ module Google
45
41
  #
46
42
  # resources:
47
43
  # - type: "pubsub.googleapis.com/Topic"
48
- # name_descriptor:
49
- # - pattern: "projects/{project}/topics/{topic}"
50
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
51
- # parent_name_extractor: "projects/{project}"
44
+ # pattern: "projects/{project}/topics/{topic}"
52
45
  #
53
46
  # Sometimes, resources have multiple patterns, typically because they can
54
47
  # live under multiple parents.
@@ -58,26 +51,10 @@ module Google
58
51
  # message LogEntry {
59
52
  # option (google.api.resource) = {
60
53
  # type: "logging.googleapis.com/LogEntry"
61
- # name_descriptor: {
62
- # pattern: "projects/{project}/logs/{log}"
63
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
64
- # parent_name_extractor: "projects/{project}"
65
- # }
66
- # name_descriptor: {
67
- # pattern: "folders/{folder}/logs/{log}"
68
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
69
- # parent_name_extractor: "folders/{folder}"
70
- # }
71
- # name_descriptor: {
72
- # pattern: "organizations/{organization}/logs/{log}"
73
- # parent_type: "cloudresourcemanager.googleapis.com/Organization"
74
- # parent_name_extractor: "organizations/{organization}"
75
- # }
76
- # name_descriptor: {
77
- # pattern: "billingAccounts/{billing_account}/logs/{log}"
78
- # parent_type: "billing.googleapis.com/BillingAccount"
79
- # parent_name_extractor: "billingAccounts/{billing_account}"
80
- # }
54
+ # pattern: "projects/{project}/logs/{log}"
55
+ # pattern: "folders/{folder}/logs/{log}"
56
+ # pattern: "organizations/{organization}/logs/{log}"
57
+ # pattern: "billingAccounts/{billing_account}/logs/{log}"
81
58
  # };
82
59
  # }
83
60
  #
@@ -85,48 +62,10 @@ module Google
85
62
  #
86
63
  # resources:
87
64
  # - type: 'logging.googleapis.com/LogEntry'
88
- # name_descriptor:
89
- # - pattern: "projects/{project}/logs/{log}"
90
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
91
- # parent_name_extractor: "projects/{project}"
92
- # - pattern: "folders/{folder}/logs/{log}"
93
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
94
- # parent_name_extractor: "folders/{folder}"
95
- # - pattern: "organizations/{organization}/logs/{log}"
96
- # parent_type: "cloudresourcemanager.googleapis.com/Organization"
97
- # parent_name_extractor: "organizations/{organization}"
98
- # - pattern: "billingAccounts/{billing_account}/logs/{log}"
99
- # parent_type: "billing.googleapis.com/BillingAccount"
100
- # parent_name_extractor: "billingAccounts/{billing_account}"
101
- #
102
- # For flexible resources, the resource name doesn't contain parent names, but
103
- # the resource itself has parents for policy evaluation.
104
- #
105
- # Example:
106
- #
107
- # message Shelf {
108
- # option (google.api.resource) = {
109
- # type: "library.googleapis.com/Shelf"
110
- # name_descriptor: {
111
- # pattern: "shelves/{shelf}"
112
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
113
- # }
114
- # name_descriptor: {
115
- # pattern: "shelves/{shelf}"
116
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
117
- # }
118
- # };
119
- # }
120
- #
121
- # The ResourceDescriptor Yaml config will look like:
122
- #
123
- # resources:
124
- # - type: 'library.googleapis.com/Shelf'
125
- # name_descriptor:
126
- # - pattern: "shelves/{shelf}"
127
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
128
- # - pattern: "shelves/{shelf}"
129
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
65
+ # pattern: "projects/{project}/logs/{log}"
66
+ # pattern: "folders/{folder}/logs/{log}"
67
+ # pattern: "organizations/{organization}/logs/{log}"
68
+ # pattern: "billingAccounts/{billing_account}/logs/{log}"
130
69
  # @!attribute [rw] type
131
70
  # @return [::String]
132
71
  # The resource type. It must be in the format of
@@ -133,7 +133,8 @@ module Google
133
133
  # @return [::Google::Cloud::Speech::V1::RecognitionConfig::AudioEncoding]
134
134
  # Encoding of audio data sent in all `RecognitionAudio` messages.
135
135
  # This field is optional for `FLAC` and `WAV` audio files and required
136
- # for all other audio formats. For details, see {::Google::Cloud::Speech::V1::RecognitionConfig::AudioEncoding AudioEncoding}.
136
+ # for all other audio formats. For details, see
137
+ # {::Google::Cloud::Speech::V1::RecognitionConfig::AudioEncoding AudioEncoding}.
137
138
  # @!attribute [rw] sample_rate_hertz
138
139
  # @return [::Integer]
139
140
  # Sample rate in Hertz of the audio data sent in all
@@ -142,7 +143,8 @@ module Google
142
143
  # source to 16000 Hz. If that's not possible, use the native sample rate of
143
144
  # the audio source (instead of re-sampling).
144
145
  # This field is optional for FLAC and WAV audio files, but is
145
- # required for all other audio formats. For details, see {::Google::Cloud::Speech::V1::RecognitionConfig::AudioEncoding AudioEncoding}.
146
+ # required for all other audio formats. For details, see
147
+ # {::Google::Cloud::Speech::V1::RecognitionConfig::AudioEncoding AudioEncoding}.
146
148
  # @!attribute [rw] audio_channel_count
147
149
  # @return [::Integer]
148
150
  # The number of channels in the input audio data.
@@ -270,6 +272,19 @@ module Google
270
272
  # <td><b>Description</b></td>
271
273
  # </tr>
272
274
  # <tr>
275
+ # <td><code>latest_long</code></td>
276
+ # <td>Best for long form content like media or conversation.</td>
277
+ # </tr>
278
+ # <tr>
279
+ # <td><code>latest_short</code></td>
280
+ # <td>Best for short form content like commands or single shot directed
281
+ # speech.</td>
282
+ # </tr>
283
+ # <tr>
284
+ # <td><code>command_and_search</code></td>
285
+ # <td>Best for short queries such as voice commands or voice search.</td>
286
+ # </tr>
287
+ # <tr>
273
288
  # <td><code>command_and_search</code></td>
274
289
  # <td>Best for short queries such as voice commands or voice search.</td>
275
290
  # </tr>
@@ -328,7 +343,8 @@ module Google
328
343
  # an `AudioEncoding` when you send send `FLAC` or `WAV` audio, the
329
344
  # encoding configuration must match the encoding described in the audio
330
345
  # header; otherwise the request returns an
331
- # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error code.
346
+ # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error
347
+ # code.
332
348
  module AudioEncoding
333
349
  # Not specified.
334
350
  ENCODING_UNSPECIFIED = 0
@@ -567,8 +583,8 @@ module Google
567
583
 
568
584
  # Contains audio data in the encoding specified in the `RecognitionConfig`.
569
585
  # Either `content` or `uri` must be supplied. Supplying both or neither
570
- # returns [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. See
571
- # [content limits](https://cloud.google.com/speech-to-text/quotas#content).
586
+ # returns [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
587
+ # See [content limits](https://cloud.google.com/speech-to-text/quotas#content).
572
588
  # @!attribute [rw] content
573
589
  # @return [::String]
574
590
  # The audio data bytes encoded as specified in
@@ -581,8 +597,9 @@ module Google
581
597
  # Currently, only Google Cloud Storage URIs are
582
598
  # supported, which must be specified in the following format:
583
599
  # `gs://bucket_name/object_name` (other URI formats return
584
- # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see
585
- # [Request URIs](https://cloud.google.com/storage/docs/reference-uris).
600
+ # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]).
601
+ # For more information, see [Request
602
+ # URIs](https://cloud.google.com/storage/docs/reference-uris).
586
603
  class RecognitionAudio
587
604
  include ::Google::Protobuf::MessageExts
588
605
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -641,8 +658,8 @@ module Google
641
658
  # Time of the most recent processing update.
642
659
  # @!attribute [r] uri
643
660
  # @return [::String]
644
- # Output only. The URI of the audio file being transcribed. Empty if the audio was sent
645
- # as byte content.
661
+ # Output only. The URI of the audio file being transcribed. Empty if the
662
+ # audio was sent as byte content.
646
663
  class LongRunningRecognizeMetadata
647
664
  include ::Google::Protobuf::MessageExts
648
665
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -767,9 +784,9 @@ module Google
767
784
  # For audio_channel_count = N, its output values can range from '1' to 'N'.
768
785
  # @!attribute [r] language_code
769
786
  # @return [::String]
770
- # Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag
771
- # of the language in this result. This language code was detected to have
772
- # the most likelihood of being spoken in the audio.
787
+ # Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
788
+ # language tag of the language in this result. This language code was
789
+ # detected to have the most likelihood of being spoken in the audio.
773
790
  class StreamingRecognitionResult
774
791
  include ::Google::Protobuf::MessageExts
775
792
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -793,9 +810,9 @@ module Google
793
810
  # beginning of the audio.
794
811
  # @!attribute [r] language_code
795
812
  # @return [::String]
796
- # Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag
797
- # of the language in this result. This language code was detected to have
798
- # the most likelihood of being spoken in the audio.
813
+ # Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
814
+ # language tag of the language in this result. This language code was
815
+ # detected to have the most likelihood of being spoken in the audio.
799
816
  class SpeechRecognitionResult
800
817
  include ::Google::Protobuf::MessageExts
801
818
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -44,7 +44,7 @@ module Google
44
44
  # foo = any.unpack(Foo.class);
45
45
  # }
46
46
  #
47
- # Example 3: Pack and unpack a message in Python.
47
+ # Example 3: Pack and unpack a message in Python.
48
48
  #
49
49
  # foo = Foo(...)
50
50
  # any = Any()
@@ -54,7 +54,7 @@ module Google
54
54
  # any.Unpack(foo)
55
55
  # ...
56
56
  #
57
- # Example 4: Pack and unpack a message in Go
57
+ # Example 4: Pack and unpack a message in Go
58
58
  #
59
59
  # foo := &pb.Foo{...}
60
60
  # any, err := anypb.New(foo)
@@ -75,7 +75,7 @@ module Google
75
75
  #
76
76
  #
77
77
  # JSON
78
- # ====
78
+ #
79
79
  # The JSON representation of an `Any` value uses the regular
80
80
  # representation of the deserialized, embedded message, with an
81
81
  # additional field `@type` which contains the type URL. Example:
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.7.0
4
+ version: 0.7.3
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-12-07 00:00:00.000000000 Z
11
+ date: 2022-05-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -215,7 +215,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
215
215
  - !ruby/object:Gem::Version
216
216
  version: '0'
217
217
  requirements: []
218
- rubygems_version: 3.2.17
218
+ rubygems_version: 3.3.5
219
219
  signing_key:
220
220
  specification_version: 4
221
221
  summary: API Client library for the Cloud Speech-to-Text V1 API