google-apis-speech_v1 0.7.0 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +17 -0
- data/OVERVIEW.md +2 -2
- data/lib/google/apis/speech_v1/classes.rb +99 -0
- data/lib/google/apis/speech_v1/gem_version.rb +3 -3
- data/lib/google/apis/speech_v1/representations.rb +25 -0
- data/lib/google/apis/speech_v1.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a61aa91eaa2686b03a79d7673eb556a3da4ac04361b91810e1e73e6b5501473a
|
4
|
+
data.tar.gz: 07dc9d1d55f5c23a3fdc0a86d07422920b0e76d80dc2d11edcc0f34e33140069
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 88c20e87a2684d34774fccebdac9a8c864c927b66f0b5ab6f45d03f6bddd1dcafa5eb1b04710e45efeb49efbf9580d9c6dfadb388f06c4d00c5ddb87ef354044
|
7
|
+
data.tar.gz: a6f597de569c16b005b19bd93a5e896d2445628b50da095ed73328fdf25330b9f4e66cf87b15c5f60c93689903ae25417eff85e48512850d647aafd84d509782
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,22 @@
|
|
1
1
|
# Release history for google-apis-speech_v1
|
2
2
|
|
3
|
+
### v0.11.0 (2021-10-22)
|
4
|
+
|
5
|
+
* Regenerated from discovery document revision 20211008
|
6
|
+
* Unspecified changes
|
7
|
+
|
8
|
+
### v0.10.0 (2021-10-08)
|
9
|
+
|
10
|
+
* Regenerated from discovery document revision 20210929
|
11
|
+
|
12
|
+
### v0.9.0 (2021-09-03)
|
13
|
+
|
14
|
+
* Regenerated from discovery document revision 20210825
|
15
|
+
|
16
|
+
### v0.8.0 (2021-06-29)
|
17
|
+
|
18
|
+
* Regenerated using generator version 0.4.0
|
19
|
+
|
3
20
|
### v0.7.0 (2021-06-24)
|
4
21
|
|
5
22
|
* Regenerated using generator version 0.3.0
|
data/OVERVIEW.md
CHANGED
@@ -60,8 +60,8 @@ See the class reference docs for information on the methods you can call from a
|
|
60
60
|
|
61
61
|
More detailed descriptions of the Google simple REST clients are available in two documents.
|
62
62
|
|
63
|
-
* The [Usage Guide](https://github.com/googleapis/google-api-ruby-client/blob/
|
64
|
-
* The [Auth Guide](https://github.com/googleapis/google-api-ruby-client/blob/
|
63
|
+
* The [Usage Guide](https://github.com/googleapis/google-api-ruby-client/blob/main/docs/usage-guide.md) discusses how to make API calls, how to use the provided data structures, and how to work the various features of the client library, including media upload and download, error handling, retries, pagination, and logging.
|
64
|
+
* The [Auth Guide](https://github.com/googleapis/google-api-ruby-client/blob/main/docs/auth-guide.md) discusses authentication in the client libraries, including API keys, OAuth 2.0, service accounts, and environment variables.
|
65
65
|
|
66
66
|
(Note: the above documents are written for the simple REST clients in general, and their examples may not reflect the Speech service in particular.)
|
67
67
|
|
@@ -106,6 +106,11 @@ module Google
|
|
106
106
|
# @return [Google::Apis::SpeechV1::RecognitionConfig]
|
107
107
|
attr_accessor :config
|
108
108
|
|
109
|
+
# Specifies an optional destination for the recognition results.
|
110
|
+
# Corresponds to the JSON property `outputConfig`
|
111
|
+
# @return [Google::Apis::SpeechV1::TranscriptOutputConfig]
|
112
|
+
attr_accessor :output_config
|
113
|
+
|
109
114
|
def initialize(**args)
|
110
115
|
update!(**args)
|
111
116
|
end
|
@@ -114,6 +119,7 @@ module Google
|
|
114
119
|
def update!(**args)
|
115
120
|
@audio = args[:audio] if args.key?(:audio)
|
116
121
|
@config = args[:config] if args.key?(:config)
|
122
|
+
@output_config = args[:output_config] if args.key?(:output_config)
|
117
123
|
end
|
118
124
|
end
|
119
125
|
|
@@ -125,19 +131,42 @@ module Google
|
|
125
131
|
class LongRunningRecognizeResponse
|
126
132
|
include Google::Apis::Core::Hashable
|
127
133
|
|
134
|
+
# Specifies an optional destination for the recognition results.
|
135
|
+
# Corresponds to the JSON property `outputConfig`
|
136
|
+
# @return [Google::Apis::SpeechV1::TranscriptOutputConfig]
|
137
|
+
attr_accessor :output_config
|
138
|
+
|
139
|
+
# The `Status` type defines a logical error model that is suitable for different
|
140
|
+
# programming environments, including REST APIs and RPC APIs. It is used by [
|
141
|
+
# gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
|
142
|
+
# data: error code, error message, and error details. You can find out more
|
143
|
+
# about this error model and how to work with it in the [API Design Guide](https:
|
144
|
+
# //cloud.google.com/apis/design/errors).
|
145
|
+
# Corresponds to the JSON property `outputError`
|
146
|
+
# @return [Google::Apis::SpeechV1::Status]
|
147
|
+
attr_accessor :output_error
|
148
|
+
|
128
149
|
# Sequential list of transcription results corresponding to sequential portions
|
129
150
|
# of audio.
|
130
151
|
# Corresponds to the JSON property `results`
|
131
152
|
# @return [Array<Google::Apis::SpeechV1::SpeechRecognitionResult>]
|
132
153
|
attr_accessor :results
|
133
154
|
|
155
|
+
# When available, billed audio seconds for the corresponding request.
|
156
|
+
# Corresponds to the JSON property `totalBilledTime`
|
157
|
+
# @return [String]
|
158
|
+
attr_accessor :total_billed_time
|
159
|
+
|
134
160
|
def initialize(**args)
|
135
161
|
update!(**args)
|
136
162
|
end
|
137
163
|
|
138
164
|
# Update properties of this object
|
139
165
|
def update!(**args)
|
166
|
+
@output_config = args[:output_config] if args.key?(:output_config)
|
167
|
+
@output_error = args[:output_error] if args.key?(:output_error)
|
140
168
|
@results = args[:results] if args.key?(:results)
|
169
|
+
@total_billed_time = args[:total_billed_time] if args.key?(:total_billed_time)
|
141
170
|
end
|
142
171
|
end
|
143
172
|
|
@@ -244,6 +273,20 @@ module Google
|
|
244
273
|
class RecognitionConfig
|
245
274
|
include Google::Apis::Core::Hashable
|
246
275
|
|
276
|
+
# A list of up to 3 additional [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.
|
277
|
+
# txt) language tags, listing possible alternative languages of the supplied
|
278
|
+
# audio. See [Language Support](https://cloud.google.com/speech-to-text/docs/
|
279
|
+
# languages) for a list of the currently supported language codes. If
|
280
|
+
# alternative languages are listed, recognition result will contain recognition
|
281
|
+
# in the most likely language detected including the main language_code. The
|
282
|
+
# recognition result will include the language tag of the language detected in
|
283
|
+
# the audio. Note: This feature is only supported for Voice Command and Voice
|
284
|
+
# Search use cases and performance may vary for other use cases (e.g., phone
|
285
|
+
# call transcription).
|
286
|
+
# Corresponds to the JSON property `alternativeLanguageCodes`
|
287
|
+
# @return [Array<String>]
|
288
|
+
attr_accessor :alternative_language_codes
|
289
|
+
|
247
290
|
# The number of channels in the input audio data. ONLY set this for MULTI-
|
248
291
|
# CHANNEL recognition. Valid values for LINEAR16 and FLAC are `1`-`8`. Valid
|
249
292
|
# values for OGG_OPUS are '1'-'254'. Valid value for MULAW, AMR, AMR_WB and
|
@@ -280,6 +323,14 @@ module Google
|
|
280
323
|
attr_accessor :enable_separate_recognition_per_channel
|
281
324
|
alias_method :enable_separate_recognition_per_channel?, :enable_separate_recognition_per_channel
|
282
325
|
|
326
|
+
# If `true`, the top result includes a list of words and the confidence for
|
327
|
+
# those words. If `false`, no word-level confidence information is returned. The
|
328
|
+
# default is `false`.
|
329
|
+
# Corresponds to the JSON property `enableWordConfidence`
|
330
|
+
# @return [Boolean]
|
331
|
+
attr_accessor :enable_word_confidence
|
332
|
+
alias_method :enable_word_confidence?, :enable_word_confidence
|
333
|
+
|
283
334
|
# If `true`, the top result includes a list of words and the start and end time
|
284
335
|
# offsets (timestamps) for those words. If `false`, no word-level time offset
|
285
336
|
# information is returned. The default is `false`.
|
@@ -373,10 +424,12 @@ module Google
|
|
373
424
|
|
374
425
|
# Update properties of this object
|
375
426
|
def update!(**args)
|
427
|
+
@alternative_language_codes = args[:alternative_language_codes] if args.key?(:alternative_language_codes)
|
376
428
|
@audio_channel_count = args[:audio_channel_count] if args.key?(:audio_channel_count)
|
377
429
|
@diarization_config = args[:diarization_config] if args.key?(:diarization_config)
|
378
430
|
@enable_automatic_punctuation = args[:enable_automatic_punctuation] if args.key?(:enable_automatic_punctuation)
|
379
431
|
@enable_separate_recognition_per_channel = args[:enable_separate_recognition_per_channel] if args.key?(:enable_separate_recognition_per_channel)
|
432
|
+
@enable_word_confidence = args[:enable_word_confidence] if args.key?(:enable_word_confidence)
|
380
433
|
@enable_word_time_offsets = args[:enable_word_time_offsets] if args.key?(:enable_word_time_offsets)
|
381
434
|
@encoding = args[:encoding] if args.key?(:encoding)
|
382
435
|
@language_code = args[:language_code] if args.key?(:language_code)
|
@@ -499,6 +552,11 @@ module Google
|
|
499
552
|
# @return [Array<Google::Apis::SpeechV1::SpeechRecognitionResult>]
|
500
553
|
attr_accessor :results
|
501
554
|
|
555
|
+
# When available, billed audio seconds for the corresponding request.
|
556
|
+
# Corresponds to the JSON property `totalBilledTime`
|
557
|
+
# @return [String]
|
558
|
+
attr_accessor :total_billed_time
|
559
|
+
|
502
560
|
def initialize(**args)
|
503
561
|
update!(**args)
|
504
562
|
end
|
@@ -506,6 +564,7 @@ module Google
|
|
506
564
|
# Update properties of this object
|
507
565
|
def update!(**args)
|
508
566
|
@results = args[:results] if args.key?(:results)
|
567
|
+
@total_billed_time = args[:total_billed_time] if args.key?(:total_billed_time)
|
509
568
|
end
|
510
569
|
end
|
511
570
|
|
@@ -639,6 +698,13 @@ module Google
|
|
639
698
|
# @return [Fixnum]
|
640
699
|
attr_accessor :channel_tag
|
641
700
|
|
701
|
+
# Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
|
702
|
+
# language tag of the language in this result. This language code was detected
|
703
|
+
# to have the most likelihood of being spoken in the audio.
|
704
|
+
# Corresponds to the JSON property `languageCode`
|
705
|
+
# @return [String]
|
706
|
+
attr_accessor :language_code
|
707
|
+
|
642
708
|
def initialize(**args)
|
643
709
|
update!(**args)
|
644
710
|
end
|
@@ -647,6 +713,7 @@ module Google
|
|
647
713
|
def update!(**args)
|
648
714
|
@alternatives = args[:alternatives] if args.key?(:alternatives)
|
649
715
|
@channel_tag = args[:channel_tag] if args.key?(:channel_tag)
|
716
|
+
@language_code = args[:language_code] if args.key?(:language_code)
|
650
717
|
end
|
651
718
|
end
|
652
719
|
|
@@ -689,10 +756,41 @@ module Google
|
|
689
756
|
end
|
690
757
|
end
|
691
758
|
|
759
|
+
# Specifies an optional destination for the recognition results.
|
760
|
+
class TranscriptOutputConfig
|
761
|
+
include Google::Apis::Core::Hashable
|
762
|
+
|
763
|
+
# Specifies a Cloud Storage URI for the recognition results. Must be specified
|
764
|
+
# in the format: `gs://bucket_name/object_name`, and the bucket must already
|
765
|
+
# exist.
|
766
|
+
# Corresponds to the JSON property `gcsUri`
|
767
|
+
# @return [String]
|
768
|
+
attr_accessor :gcs_uri
|
769
|
+
|
770
|
+
def initialize(**args)
|
771
|
+
update!(**args)
|
772
|
+
end
|
773
|
+
|
774
|
+
# Update properties of this object
|
775
|
+
def update!(**args)
|
776
|
+
@gcs_uri = args[:gcs_uri] if args.key?(:gcs_uri)
|
777
|
+
end
|
778
|
+
end
|
779
|
+
|
692
780
|
# Word-specific information for recognized words.
|
693
781
|
class WordInfo
|
694
782
|
include Google::Apis::Core::Hashable
|
695
783
|
|
784
|
+
# The confidence estimate between 0.0 and 1.0. A higher number indicates an
|
785
|
+
# estimated greater likelihood that the recognized words are correct. This field
|
786
|
+
# is set only for the top alternative of a non-streaming result or, of a
|
787
|
+
# streaming result where `is_final=true`. This field is not guaranteed to be
|
788
|
+
# accurate and users should not rely on it to be always provided. The default of
|
789
|
+
# 0.0 is a sentinel value indicating `confidence` was not set.
|
790
|
+
# Corresponds to the JSON property `confidence`
|
791
|
+
# @return [Float]
|
792
|
+
attr_accessor :confidence
|
793
|
+
|
696
794
|
# Time offset relative to the beginning of the audio, and corresponding to the
|
697
795
|
# end of the spoken word. This field is only set if `enable_word_time_offsets=
|
698
796
|
# true` and only in the top hypothesis. This is an experimental feature and the
|
@@ -729,6 +827,7 @@ module Google
|
|
729
827
|
|
730
828
|
# Update properties of this object
|
731
829
|
def update!(**args)
|
830
|
+
@confidence = args[:confidence] if args.key?(:confidence)
|
732
831
|
@end_time = args[:end_time] if args.key?(:end_time)
|
733
832
|
@speaker_tag = args[:speaker_tag] if args.key?(:speaker_tag)
|
734
833
|
@start_time = args[:start_time] if args.key?(:start_time)
|
@@ -16,13 +16,13 @@ module Google
|
|
16
16
|
module Apis
|
17
17
|
module SpeechV1
|
18
18
|
# Version of the google-apis-speech_v1 gem
|
19
|
-
GEM_VERSION = "0.
|
19
|
+
GEM_VERSION = "0.11.0"
|
20
20
|
|
21
21
|
# Version of the code generator used to generate this client
|
22
|
-
GENERATOR_VERSION = "0.
|
22
|
+
GENERATOR_VERSION = "0.4.0"
|
23
23
|
|
24
24
|
# Revision of the discovery document this client was generated from
|
25
|
-
REVISION = "
|
25
|
+
REVISION = "20211008"
|
26
26
|
end
|
27
27
|
end
|
28
28
|
end
|
@@ -112,6 +112,12 @@ module Google
|
|
112
112
|
include Google::Apis::Core::JsonObjectSupport
|
113
113
|
end
|
114
114
|
|
115
|
+
class TranscriptOutputConfig
|
116
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
117
|
+
|
118
|
+
include Google::Apis::Core::JsonObjectSupport
|
119
|
+
end
|
120
|
+
|
115
121
|
class WordInfo
|
116
122
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
117
123
|
|
@@ -144,14 +150,21 @@ module Google
|
|
144
150
|
|
145
151
|
property :config, as: 'config', class: Google::Apis::SpeechV1::RecognitionConfig, decorator: Google::Apis::SpeechV1::RecognitionConfig::Representation
|
146
152
|
|
153
|
+
property :output_config, as: 'outputConfig', class: Google::Apis::SpeechV1::TranscriptOutputConfig, decorator: Google::Apis::SpeechV1::TranscriptOutputConfig::Representation
|
154
|
+
|
147
155
|
end
|
148
156
|
end
|
149
157
|
|
150
158
|
class LongRunningRecognizeResponse
|
151
159
|
# @private
|
152
160
|
class Representation < Google::Apis::Core::JsonRepresentation
|
161
|
+
property :output_config, as: 'outputConfig', class: Google::Apis::SpeechV1::TranscriptOutputConfig, decorator: Google::Apis::SpeechV1::TranscriptOutputConfig::Representation
|
162
|
+
|
163
|
+
property :output_error, as: 'outputError', class: Google::Apis::SpeechV1::Status, decorator: Google::Apis::SpeechV1::Status::Representation
|
164
|
+
|
153
165
|
collection :results, as: 'results', class: Google::Apis::SpeechV1::SpeechRecognitionResult, decorator: Google::Apis::SpeechV1::SpeechRecognitionResult::Representation
|
154
166
|
|
167
|
+
property :total_billed_time, as: 'totalBilledTime'
|
155
168
|
end
|
156
169
|
end
|
157
170
|
|
@@ -178,11 +191,13 @@ module Google
|
|
178
191
|
class RecognitionConfig
|
179
192
|
# @private
|
180
193
|
class Representation < Google::Apis::Core::JsonRepresentation
|
194
|
+
collection :alternative_language_codes, as: 'alternativeLanguageCodes'
|
181
195
|
property :audio_channel_count, as: 'audioChannelCount'
|
182
196
|
property :diarization_config, as: 'diarizationConfig', class: Google::Apis::SpeechV1::SpeakerDiarizationConfig, decorator: Google::Apis::SpeechV1::SpeakerDiarizationConfig::Representation
|
183
197
|
|
184
198
|
property :enable_automatic_punctuation, as: 'enableAutomaticPunctuation'
|
185
199
|
property :enable_separate_recognition_per_channel, as: 'enableSeparateRecognitionPerChannel'
|
200
|
+
property :enable_word_confidence, as: 'enableWordConfidence'
|
186
201
|
property :enable_word_time_offsets, as: 'enableWordTimeOffsets'
|
187
202
|
property :encoding, as: 'encoding'
|
188
203
|
property :language_code, as: 'languageCode'
|
@@ -227,6 +242,7 @@ module Google
|
|
227
242
|
class Representation < Google::Apis::Core::JsonRepresentation
|
228
243
|
collection :results, as: 'results', class: Google::Apis::SpeechV1::SpeechRecognitionResult, decorator: Google::Apis::SpeechV1::SpeechRecognitionResult::Representation
|
229
244
|
|
245
|
+
property :total_billed_time, as: 'totalBilledTime'
|
230
246
|
end
|
231
247
|
end
|
232
248
|
|
@@ -263,6 +279,7 @@ module Google
|
|
263
279
|
collection :alternatives, as: 'alternatives', class: Google::Apis::SpeechV1::SpeechRecognitionAlternative, decorator: Google::Apis::SpeechV1::SpeechRecognitionAlternative::Representation
|
264
280
|
|
265
281
|
property :channel_tag, as: 'channelTag'
|
282
|
+
property :language_code, as: 'languageCode'
|
266
283
|
end
|
267
284
|
end
|
268
285
|
|
@@ -275,9 +292,17 @@ module Google
|
|
275
292
|
end
|
276
293
|
end
|
277
294
|
|
295
|
+
class TranscriptOutputConfig
|
296
|
+
# @private
|
297
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
298
|
+
property :gcs_uri, as: 'gcsUri'
|
299
|
+
end
|
300
|
+
end
|
301
|
+
|
278
302
|
class WordInfo
|
279
303
|
# @private
|
280
304
|
class Representation < Google::Apis::Core::JsonRepresentation
|
305
|
+
property :confidence, as: 'confidence'
|
281
306
|
property :end_time, as: 'endTime'
|
282
307
|
property :speaker_tag, as: 'speakerTag'
|
283
308
|
property :start_time, as: 'startTime'
|
@@ -29,7 +29,7 @@ module Google
|
|
29
29
|
# This is NOT the gem version.
|
30
30
|
VERSION = 'V1'
|
31
31
|
|
32
|
-
# See, edit, configure, and delete your Google Cloud
|
32
|
+
# See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.
|
33
33
|
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
34
34
|
end
|
35
35
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-apis-speech_v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.11.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-10-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-apis-core
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.4'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: 2.a
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '0.
|
29
|
+
version: '0.4'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 2.a
|
@@ -57,9 +57,9 @@ licenses:
|
|
57
57
|
- Apache-2.0
|
58
58
|
metadata:
|
59
59
|
bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
|
60
|
-
changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/
|
61
|
-
documentation_uri: https://googleapis.dev/ruby/google-apis-speech_v1/v0.
|
62
|
-
source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/
|
60
|
+
changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-speech_v1/CHANGELOG.md
|
61
|
+
documentation_uri: https://googleapis.dev/ruby/google-apis-speech_v1/v0.11.0
|
62
|
+
source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-speech_v1
|
63
63
|
post_install_message:
|
64
64
|
rdoc_options: []
|
65
65
|
require_paths:
|