google-cloud-speech-v1p1beta1 0.8.0 → 0.10.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/AUTHENTICATION.md +8 -8
- data/README.md +1 -1
- data/lib/google/cloud/speech/v1p1beta1/adaptation/client.rb +3 -3
- data/lib/google/cloud/speech/v1p1beta1/cloud_speech_pb.rb +4 -0
- data/lib/google/cloud/speech/v1p1beta1/speech/client.rb +3 -9
- 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 +17 -1
- data/proto_docs/google/cloud/speech/v1p1beta1/cloud_speech_adaptation.rb +2 -2
- metadata +13 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b0c8424ec1d4fc884eb071411ecfa273cbdb01fe0637d8f215e1bf2bf4459af
|
4
|
+
data.tar.gz: b279dd715988dc71c00443def08ddfd4d3e9c430754448e916c9703751ad3531
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bff979172f1a527f0b9b9420210fefbf49a473642e175e928f45fc18be43718c323e5e447cb51a596873b7a852306c501cdda68f5dd2a72c54aad1b8178dc794
|
7
|
+
data.tar.gz: 1b2acf8a9a19aa9a166b94674df26d624939a6a67e2967b72a6898d7e58a5d773036e60ad892e294c7904dee9b6ebf7db65ebc2aa8557d0a90e721b51091197b
|
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
|
@@ -175,7 +175,7 @@ module Google
|
|
175
175
|
# Format:
|
176
176
|
# \\{api_version}/projects/\\{project}/locations/\\{location}/phraseSets
|
177
177
|
# @param phrase_set_id [::String]
|
178
|
-
# The ID to use for the phrase set, which will become the final
|
178
|
+
# Required. The ID to use for the phrase set, which will become the final
|
179
179
|
# component of the phrase set's resource name.
|
180
180
|
#
|
181
181
|
# This value should be 4-63 characters, and valid characters
|
@@ -539,7 +539,7 @@ module Google
|
|
539
539
|
# Format:
|
540
540
|
# \\{api_version}/projects/\\{project}/locations/\\{location}/customClasses
|
541
541
|
# @param custom_class_id [::String]
|
542
|
-
# The ID to use for the custom class, which will become the final
|
542
|
+
# Required. The ID to use for the custom class, which will become the final
|
543
543
|
# component of the custom class' resource name.
|
544
544
|
#
|
545
545
|
# This value should be 4-63 characters, and valid characters
|
@@ -73,6 +73,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
73
73
|
value :OGG_OPUS, 6
|
74
74
|
value :SPEEX_WITH_HEADER_BYTE, 7
|
75
75
|
value :MP3, 8
|
76
|
+
value :WEBM_OPUS, 9
|
76
77
|
end
|
77
78
|
add_message "google.cloud.speech.v1p1beta1.SpeakerDiarizationConfig" do
|
78
79
|
optional :enable_speaker_diarization, :bool, 1
|
@@ -134,9 +135,11 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
134
135
|
end
|
135
136
|
add_message "google.cloud.speech.v1p1beta1.RecognizeResponse" do
|
136
137
|
repeated :results, :message, 2, "google.cloud.speech.v1p1beta1.SpeechRecognitionResult"
|
138
|
+
optional :total_billed_time, :message, 3, "google.protobuf.Duration"
|
137
139
|
end
|
138
140
|
add_message "google.cloud.speech.v1p1beta1.LongRunningRecognizeResponse" do
|
139
141
|
repeated :results, :message, 2, "google.cloud.speech.v1p1beta1.SpeechRecognitionResult"
|
142
|
+
optional :total_billed_time, :message, 3, "google.protobuf.Duration"
|
140
143
|
optional :output_config, :message, 6, "google.cloud.speech.v1p1beta1.TranscriptOutputConfig"
|
141
144
|
optional :output_error, :message, 7, "google.rpc.Status"
|
142
145
|
end
|
@@ -151,6 +154,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
151
154
|
optional :error, :message, 1, "google.rpc.Status"
|
152
155
|
repeated :results, :message, 2, "google.cloud.speech.v1p1beta1.StreamingRecognitionResult"
|
153
156
|
optional :speech_event_type, :enum, 4, "google.cloud.speech.v1p1beta1.StreamingRecognizeResponse.SpeechEventType"
|
157
|
+
optional :total_billed_time, :message, 5, "google.protobuf.Duration"
|
154
158
|
end
|
155
159
|
add_enum "google.cloud.speech.v1p1beta1.StreamingRecognizeResponse.SpeechEventType" do
|
156
160
|
value :SPEECH_EVENT_UNSPECIFIED, 0
|
@@ -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
|
@@ -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
|
@@ -291,7 +291,7 @@ module Google
|
|
291
291
|
# </tr>
|
292
292
|
# <tr>
|
293
293
|
# <td><code>video</code></td>
|
294
|
-
# <td>Best for audio that originated from
|
294
|
+
# <td>Best for audio that originated from video or includes multiple
|
295
295
|
# speakers. Ideally the audio is recorded at a 16khz or greater
|
296
296
|
# sampling rate. This is a premium model that costs more than the
|
297
297
|
# standard rate.</td>
|
@@ -388,6 +388,12 @@ module Google
|
|
388
388
|
# kbps). When using this encoding, `sample_rate_hertz` has to match the
|
389
389
|
# sample rate of the file being used.
|
390
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
|
391
397
|
end
|
392
398
|
end
|
393
399
|
|
@@ -610,6 +616,9 @@ module Google
|
|
610
616
|
# @return [::Array<::Google::Cloud::Speech::V1p1beta1::SpeechRecognitionResult>]
|
611
617
|
# Sequential list of transcription results corresponding to
|
612
618
|
# sequential portions of audio.
|
619
|
+
# @!attribute [rw] total_billed_time
|
620
|
+
# @return [::Google::Protobuf::Duration]
|
621
|
+
# When available, billed audio seconds for the corresponding request.
|
613
622
|
class RecognizeResponse
|
614
623
|
include ::Google::Protobuf::MessageExts
|
615
624
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -624,6 +633,9 @@ module Google
|
|
624
633
|
# @return [::Array<::Google::Cloud::Speech::V1p1beta1::SpeechRecognitionResult>]
|
625
634
|
# Sequential list of transcription results corresponding to
|
626
635
|
# sequential portions of audio.
|
636
|
+
# @!attribute [rw] total_billed_time
|
637
|
+
# @return [::Google::Protobuf::Duration]
|
638
|
+
# When available, billed audio seconds for the corresponding request.
|
627
639
|
# @!attribute [rw] output_config
|
628
640
|
# @return [::Google::Cloud::Speech::V1p1beta1::TranscriptOutputConfig]
|
629
641
|
# Original output config if present in the request.
|
@@ -722,6 +734,10 @@ module Google
|
|
722
734
|
# @!attribute [rw] speech_event_type
|
723
735
|
# @return [::Google::Cloud::Speech::V1p1beta1::StreamingRecognizeResponse::SpeechEventType]
|
724
736
|
# Indicates the type of speech event.
|
737
|
+
# @!attribute [rw] total_billed_time
|
738
|
+
# @return [::Google::Protobuf::Duration]
|
739
|
+
# When available, billed audio seconds for the stream.
|
740
|
+
# Set only if this is the last response in the stream.
|
725
741
|
class StreamingRecognizeResponse
|
726
742
|
include ::Google::Protobuf::MessageExts
|
727
743
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -29,7 +29,7 @@ module Google
|
|
29
29
|
# \\{api_version}/projects/\\{project}/locations/\\{location}/phraseSets
|
30
30
|
# @!attribute [rw] phrase_set_id
|
31
31
|
# @return [::String]
|
32
|
-
# The ID to use for the phrase set, which will become the final
|
32
|
+
# Required. The ID to use for the phrase set, which will become the final
|
33
33
|
# component of the phrase set's resource name.
|
34
34
|
#
|
35
35
|
# This value should be 4-63 characters, and valid characters
|
@@ -125,7 +125,7 @@ module Google
|
|
125
125
|
# \\{api_version}/projects/\\{project}/locations/\\{location}/customClasses
|
126
126
|
# @!attribute [rw] custom_class_id
|
127
127
|
# @return [::String]
|
128
|
-
# The ID to use for the custom class, which will become the final
|
128
|
+
# Required. The ID to use for the custom class, which will become the final
|
129
129
|
# component of the custom class' resource name.
|
130
130
|
#
|
131
131
|
# This value should be 4-63 characters, and valid characters
|
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.10.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: 2021-
|
11
|
+
date: 2021-07-29 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
|
@@ -217,7 +223,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
217
223
|
- !ruby/object:Gem::Version
|
218
224
|
version: '0'
|
219
225
|
requirements: []
|
220
|
-
rubygems_version: 3.2.
|
226
|
+
rubygems_version: 3.2.17
|
221
227
|
signing_key:
|
222
228
|
specification_version: 4
|
223
229
|
summary: API Client library for the Cloud Speech-to-Text V1p1beta1 API
|