google-cloud-speech-v1 0.6.1 → 0.7.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/lib/google/cloud/speech/v1/cloud_speech_pb.rb +13 -0
- data/lib/google/cloud/speech/v1/resource_pb.rb +48 -0
- data/lib/google/cloud/speech/v1/speech/client.rb +2 -0
- data/lib/google/cloud/speech/v1/speech/paths.rb +71 -0
- data/lib/google/cloud/speech/v1/speech.rb +1 -0
- data/lib/google/cloud/speech/v1/version.rb +1 -1
- data/proto_docs/google/cloud/speech/v1/cloud_speech.rb +86 -4
- data/proto_docs/google/cloud/speech/v1/resource.rb +141 -0
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4df4067d98b6dde2049d349aaba7e230db5c79344083061a7836304474c8c7e4
|
4
|
+
data.tar.gz: 331c15b79d60c83e8f6f613059765b9c51587e223d7f4cfdf779eb5372661356
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d7b43c7650ab17d38e959b078bdf2d9bb339b06befca56f17f11c1c5a7000d560fa7cde22779781c0e1d598e3e0e4faf236fe3f47221456b25e0d5c0b78217e8
|
7
|
+
data.tar.gz: 7e24249767948c0e9a766993dc71c67b4c71bca11afcb2620cf1068b65b0d8afed18878d31e925dc7f00a16834f75c30513bfbeddbc3e9195964e9a968e80154
|
@@ -4,6 +4,7 @@
|
|
4
4
|
require 'google/api/annotations_pb'
|
5
5
|
require 'google/api/client_pb'
|
6
6
|
require 'google/api/field_behavior_pb'
|
7
|
+
require 'google/cloud/speech/v1/resource_pb'
|
7
8
|
require 'google/longrunning/operations_pb'
|
8
9
|
require 'google/protobuf/any_pb'
|
9
10
|
require 'google/protobuf/duration_pb'
|
@@ -45,11 +46,16 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
45
46
|
optional :audio_channel_count, :int32, 7
|
46
47
|
optional :enable_separate_recognition_per_channel, :bool, 12
|
47
48
|
optional :language_code, :string, 3
|
49
|
+
repeated :alternative_language_codes, :string, 18
|
48
50
|
optional :max_alternatives, :int32, 4
|
49
51
|
optional :profanity_filter, :bool, 5
|
52
|
+
optional :adaptation, :message, 20, "google.cloud.speech.v1.SpeechAdaptation"
|
50
53
|
repeated :speech_contexts, :message, 6, "google.cloud.speech.v1.SpeechContext"
|
51
54
|
optional :enable_word_time_offsets, :bool, 8
|
55
|
+
optional :enable_word_confidence, :bool, 15
|
52
56
|
optional :enable_automatic_punctuation, :bool, 11
|
57
|
+
optional :enable_spoken_punctuation, :message, 22, "google.protobuf.BoolValue"
|
58
|
+
optional :enable_spoken_emojis, :message, 23, "google.protobuf.BoolValue"
|
53
59
|
optional :diarization_config, :message, 19, "google.cloud.speech.v1.SpeakerDiarizationConfig"
|
54
60
|
optional :metadata, :message, 9, "google.cloud.speech.v1.RecognitionMetadata"
|
55
61
|
optional :model, :string, 13
|
@@ -64,6 +70,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
64
70
|
value :AMR_WB, 5
|
65
71
|
value :OGG_OPUS, 6
|
66
72
|
value :SPEEX_WITH_HEADER_BYTE, 7
|
73
|
+
value :WEBM_OPUS, 9
|
67
74
|
end
|
68
75
|
add_message "google.cloud.speech.v1.SpeakerDiarizationConfig" do
|
69
76
|
optional :enable_speaker_diarization, :bool, 1
|
@@ -114,6 +121,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
114
121
|
end
|
115
122
|
add_message "google.cloud.speech.v1.SpeechContext" do
|
116
123
|
repeated :phrases, :string, 1
|
124
|
+
optional :boost, :float, 4
|
117
125
|
end
|
118
126
|
add_message "google.cloud.speech.v1.RecognitionAudio" do
|
119
127
|
oneof :audio_source do
|
@@ -128,6 +136,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
128
136
|
add_message "google.cloud.speech.v1.LongRunningRecognizeResponse" do
|
129
137
|
repeated :results, :message, 2, "google.cloud.speech.v1.SpeechRecognitionResult"
|
130
138
|
optional :total_billed_time, :message, 3, "google.protobuf.Duration"
|
139
|
+
optional :output_config, :message, 6, "google.cloud.speech.v1.TranscriptOutputConfig"
|
140
|
+
optional :output_error, :message, 7, "google.rpc.Status"
|
131
141
|
end
|
132
142
|
add_message "google.cloud.speech.v1.LongRunningRecognizeMetadata" do
|
133
143
|
optional :progress_percent, :int32, 1
|
@@ -156,6 +166,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
156
166
|
add_message "google.cloud.speech.v1.SpeechRecognitionResult" do
|
157
167
|
repeated :alternatives, :message, 1, "google.cloud.speech.v1.SpeechRecognitionAlternative"
|
158
168
|
optional :channel_tag, :int32, 2
|
169
|
+
optional :result_end_time, :message, 4, "google.protobuf.Duration"
|
170
|
+
optional :language_code, :string, 5
|
159
171
|
end
|
160
172
|
add_message "google.cloud.speech.v1.SpeechRecognitionAlternative" do
|
161
173
|
optional :transcript, :string, 1
|
@@ -166,6 +178,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
166
178
|
optional :start_time, :message, 1, "google.protobuf.Duration"
|
167
179
|
optional :end_time, :message, 2, "google.protobuf.Duration"
|
168
180
|
optional :word, :string, 3
|
181
|
+
optional :confidence, :float, 4
|
169
182
|
optional :speaker_tag, :int32, 5
|
170
183
|
end
|
171
184
|
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/cloud/speech/v1/resource.proto
|
3
|
+
|
4
|
+
require 'google/api/resource_pb'
|
5
|
+
require 'google/protobuf/timestamp_pb'
|
6
|
+
require 'google/api/annotations_pb'
|
7
|
+
require 'google/protobuf'
|
8
|
+
|
9
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
10
|
+
add_file("google/cloud/speech/v1/resource.proto", :syntax => :proto3) do
|
11
|
+
add_message "google.cloud.speech.v1.CustomClass" do
|
12
|
+
optional :name, :string, 1
|
13
|
+
optional :custom_class_id, :string, 2
|
14
|
+
repeated :items, :message, 3, "google.cloud.speech.v1.CustomClass.ClassItem"
|
15
|
+
end
|
16
|
+
add_message "google.cloud.speech.v1.CustomClass.ClassItem" do
|
17
|
+
optional :value, :string, 1
|
18
|
+
end
|
19
|
+
add_message "google.cloud.speech.v1.PhraseSet" do
|
20
|
+
optional :name, :string, 1
|
21
|
+
repeated :phrases, :message, 2, "google.cloud.speech.v1.PhraseSet.Phrase"
|
22
|
+
optional :boost, :float, 4
|
23
|
+
end
|
24
|
+
add_message "google.cloud.speech.v1.PhraseSet.Phrase" do
|
25
|
+
optional :value, :string, 1
|
26
|
+
optional :boost, :float, 2
|
27
|
+
end
|
28
|
+
add_message "google.cloud.speech.v1.SpeechAdaptation" do
|
29
|
+
repeated :phrase_sets, :message, 1, "google.cloud.speech.v1.PhraseSet"
|
30
|
+
repeated :phrase_set_references, :string, 2
|
31
|
+
repeated :custom_classes, :message, 3, "google.cloud.speech.v1.CustomClass"
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
module Google
|
37
|
+
module Cloud
|
38
|
+
module Speech
|
39
|
+
module V1
|
40
|
+
CustomClass = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.CustomClass").msgclass
|
41
|
+
CustomClass::ClassItem = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.CustomClass.ClassItem").msgclass
|
42
|
+
PhraseSet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.PhraseSet").msgclass
|
43
|
+
PhraseSet::Phrase = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.PhraseSet.Phrase").msgclass
|
44
|
+
SpeechAdaptation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.SpeechAdaptation").msgclass
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,71 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2021 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
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module Speech
|
23
|
+
module V1
|
24
|
+
module Speech
|
25
|
+
# Path helper methods for the Speech API.
|
26
|
+
module Paths
|
27
|
+
##
|
28
|
+
# Create a fully-qualified CustomClass resource string.
|
29
|
+
#
|
30
|
+
# The resource will be in the following format:
|
31
|
+
#
|
32
|
+
# `projects/{project}/locations/{location}/customClasses/{custom_class}`
|
33
|
+
#
|
34
|
+
# @param project [String]
|
35
|
+
# @param location [String]
|
36
|
+
# @param custom_class [String]
|
37
|
+
#
|
38
|
+
# @return [::String]
|
39
|
+
def custom_class_path project:, location:, custom_class:
|
40
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
41
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
42
|
+
|
43
|
+
"projects/#{project}/locations/#{location}/customClasses/#{custom_class}"
|
44
|
+
end
|
45
|
+
|
46
|
+
##
|
47
|
+
# Create a fully-qualified PhraseSet resource string.
|
48
|
+
#
|
49
|
+
# The resource will be in the following format:
|
50
|
+
#
|
51
|
+
# `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
|
52
|
+
#
|
53
|
+
# @param project [String]
|
54
|
+
# @param location [String]
|
55
|
+
# @param phrase_set [String]
|
56
|
+
#
|
57
|
+
# @return [::String]
|
58
|
+
def phrase_set_path project:, location:, phrase_set:
|
59
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
60
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
61
|
+
|
62
|
+
"projects/#{project}/locations/#{location}/phraseSets/#{phrase_set}"
|
63
|
+
end
|
64
|
+
|
65
|
+
extend self
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
@@ -23,6 +23,7 @@ require "gapic/config/method"
|
|
23
23
|
require "google/cloud/speech/v1/version"
|
24
24
|
|
25
25
|
require "google/cloud/speech/v1/speech/credentials"
|
26
|
+
require "google/cloud/speech/v1/speech/paths"
|
26
27
|
require "google/cloud/speech/v1/speech/operations"
|
27
28
|
require "google/cloud/speech/v1/speech/client"
|
28
29
|
|
@@ -170,6 +170,20 @@ module Google
|
|
170
170
|
# See [Language
|
171
171
|
# Support](https://cloud.google.com/speech-to-text/docs/languages) for a list
|
172
172
|
# of the currently supported language codes.
|
173
|
+
# @!attribute [rw] alternative_language_codes
|
174
|
+
# @return [::Array<::String>]
|
175
|
+
# A list of up to 3 additional
|
176
|
+
# [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags,
|
177
|
+
# listing possible alternative languages of the supplied audio.
|
178
|
+
# See [Language
|
179
|
+
# Support](https://cloud.google.com/speech-to-text/docs/languages) for a list
|
180
|
+
# of the currently supported language codes. If alternative languages are
|
181
|
+
# listed, recognition result will contain recognition in the most likely
|
182
|
+
# language detected including the main language_code. The recognition result
|
183
|
+
# will include the language tag of the language detected in the audio. Note:
|
184
|
+
# This feature is only supported for Voice Command and Voice Search use cases
|
185
|
+
# and performance may vary for other use cases (e.g., phone call
|
186
|
+
# transcription).
|
173
187
|
# @!attribute [rw] max_alternatives
|
174
188
|
# @return [::Integer]
|
175
189
|
# Maximum number of recognition hypotheses to be returned.
|
@@ -184,6 +198,13 @@ module Google
|
|
184
198
|
# profanities, replacing all but the initial character in each filtered word
|
185
199
|
# with asterisks, e.g. "f***". If set to `false` or omitted, profanities
|
186
200
|
# won't be filtered out.
|
201
|
+
# @!attribute [rw] adaptation
|
202
|
+
# @return [::Google::Cloud::Speech::V1::SpeechAdaptation]
|
203
|
+
# Speech adaptation configuration improves the accuracy of speech
|
204
|
+
# recognition. For more information, see the [speech
|
205
|
+
# adaptation](https://cloud.google.com/speech-to-text/docs/adaptation)
|
206
|
+
# documentation.
|
207
|
+
# When speech adaptation is set it supersedes the `speech_contexts` field.
|
187
208
|
# @!attribute [rw] speech_contexts
|
188
209
|
# @return [::Array<::Google::Cloud::Speech::V1::SpeechContext>]
|
189
210
|
# Array of {::Google::Cloud::Speech::V1::SpeechContext SpeechContext}.
|
@@ -197,12 +218,33 @@ module Google
|
|
197
218
|
# the start and end time offsets (timestamps) for those words. If
|
198
219
|
# `false`, no word-level time offset information is returned. The default is
|
199
220
|
# `false`.
|
221
|
+
# @!attribute [rw] enable_word_confidence
|
222
|
+
# @return [::Boolean]
|
223
|
+
# If `true`, the top result includes a list of words and the
|
224
|
+
# confidence for those words. If `false`, no word-level confidence
|
225
|
+
# information is returned. The default is `false`.
|
200
226
|
# @!attribute [rw] enable_automatic_punctuation
|
201
227
|
# @return [::Boolean]
|
202
228
|
# If 'true', adds punctuation to recognition result hypotheses.
|
203
229
|
# This feature is only available in select languages. Setting this for
|
204
230
|
# requests in other languages has no effect at all.
|
205
231
|
# The default 'false' value does not add punctuation to result hypotheses.
|
232
|
+
# @!attribute [rw] enable_spoken_punctuation
|
233
|
+
# @return [::Google::Protobuf::BoolValue]
|
234
|
+
# The spoken punctuation behavior for the call
|
235
|
+
# If not set, uses default behavior based on model of choice
|
236
|
+
# e.g. command_and_search will enable spoken punctuation by default
|
237
|
+
# If 'true', replaces spoken punctuation with the corresponding symbols in
|
238
|
+
# the request. For example, "how are you question mark" becomes "how are
|
239
|
+
# you?". See https://cloud.google.com/speech-to-text/docs/spoken-punctuation
|
240
|
+
# for support. If 'false', spoken punctuation is not replaced.
|
241
|
+
# @!attribute [rw] enable_spoken_emojis
|
242
|
+
# @return [::Google::Protobuf::BoolValue]
|
243
|
+
# The spoken emoji behavior for the call
|
244
|
+
# If not set, uses default behavior based on model of choice
|
245
|
+
# If 'true', adds spoken emoji formatting for the request. This will replace
|
246
|
+
# spoken emojis with the corresponding Unicode symbols in the final
|
247
|
+
# transcript. If 'false', spoken emojis are not replaced.
|
206
248
|
# @!attribute [rw] diarization_config
|
207
249
|
# @return [::Google::Cloud::Speech::V1::SpeakerDiarizationConfig]
|
208
250
|
# Config to enable speaker diarization and set additional
|
@@ -274,7 +316,8 @@ module Google
|
|
274
316
|
# a lossless encoding (`FLAC` or `LINEAR16`). The accuracy of the speech
|
275
317
|
# recognition can be reduced if lossy codecs are used to capture or transmit
|
276
318
|
# audio, particularly if background noise is present. Lossy codecs include
|
277
|
-
# `MULAW`, `AMR`, `AMR_WB`, `OGG_OPUS`, `SPEEX_WITH_HEADER_BYTE`, `MP3
|
319
|
+
# `MULAW`, `AMR`, `AMR_WB`, `OGG_OPUS`, `SPEEX_WITH_HEADER_BYTE`, `MP3`,
|
320
|
+
# and `WEBM_OPUS`.
|
278
321
|
#
|
279
322
|
# The `FLAC` and `WAV` audio file formats include a header that describes the
|
280
323
|
# included audio content. You can request recognition for `WAV` files that
|
@@ -329,6 +372,11 @@ module Google
|
|
329
372
|
# is replaced with a single byte containing the block length. Only Speex
|
330
373
|
# wideband is supported. `sample_rate_hertz` must be 16000.
|
331
374
|
SPEEX_WITH_HEADER_BYTE = 7
|
375
|
+
|
376
|
+
# Opus encoded audio frames in WebM container
|
377
|
+
# ([OggOpus](https://wiki.xiph.org/OggOpus)). `sample_rate_hertz` must be
|
378
|
+
# one of 8000, 12000, 16000, 24000, or 48000.
|
379
|
+
WEBM_OPUS = 9
|
332
380
|
end
|
333
381
|
end
|
334
382
|
|
@@ -502,6 +550,16 @@ module Google
|
|
502
550
|
# providing phrase hints for every month of the year, using the $MONTH class
|
503
551
|
# improves the likelihood of correctly transcribing audio that includes
|
504
552
|
# months.
|
553
|
+
# @!attribute [rw] boost
|
554
|
+
# @return [::Float]
|
555
|
+
# Hint Boost. Positive value will increase the probability that a specific
|
556
|
+
# phrase will be recognized over other similar sounding phrases. The higher
|
557
|
+
# the boost, the higher the chance of false positive recognition as well.
|
558
|
+
# Negative boost values would correspond to anti-biasing. Anti-biasing is not
|
559
|
+
# enabled, so negative boost will simply be ignored. Though `boost` can
|
560
|
+
# accept a wide range of positive values, most use cases are best served with
|
561
|
+
# values between 0 and 20. We recommend using a binary search approach to
|
562
|
+
# finding the optimal value for your use case.
|
505
563
|
class SpeechContext
|
506
564
|
include ::Google::Protobuf::MessageExts
|
507
565
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -557,6 +615,12 @@ module Google
|
|
557
615
|
# @!attribute [rw] total_billed_time
|
558
616
|
# @return [::Google::Protobuf::Duration]
|
559
617
|
# When available, billed audio seconds for the corresponding request.
|
618
|
+
# @!attribute [rw] output_config
|
619
|
+
# @return [::Google::Cloud::Speech::V1::TranscriptOutputConfig]
|
620
|
+
# Original output config if present in the request.
|
621
|
+
# @!attribute [rw] output_error
|
622
|
+
# @return [::Google::Rpc::Status]
|
623
|
+
# If the transcript output fails this field contains the relevant error.
|
560
624
|
class LongRunningRecognizeResponse
|
561
625
|
include ::Google::Protobuf::MessageExts
|
562
626
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -703,9 +767,9 @@ module Google
|
|
703
767
|
# For audio_channel_count = N, its output values can range from '1' to 'N'.
|
704
768
|
# @!attribute [r] language_code
|
705
769
|
# @return [::String]
|
706
|
-
# The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag
|
707
|
-
# the language in this result. This language code was detected to have
|
708
|
-
# most likelihood of being spoken in the audio.
|
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.
|
709
773
|
class StreamingRecognitionResult
|
710
774
|
include ::Google::Protobuf::MessageExts
|
711
775
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -723,6 +787,15 @@ module Google
|
|
723
787
|
# For multi-channel audio, this is the channel number corresponding to the
|
724
788
|
# recognized result for the audio from that channel.
|
725
789
|
# For audio_channel_count = N, its output values can range from '1' to 'N'.
|
790
|
+
# @!attribute [rw] result_end_time
|
791
|
+
# @return [::Google::Protobuf::Duration]
|
792
|
+
# Time offset of the end of this result relative to the
|
793
|
+
# beginning of the audio.
|
794
|
+
# @!attribute [r] language_code
|
795
|
+
# @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.
|
726
799
|
class SpeechRecognitionResult
|
727
800
|
include ::Google::Protobuf::MessageExts
|
728
801
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -771,6 +844,15 @@ module Google
|
|
771
844
|
# @!attribute [rw] word
|
772
845
|
# @return [::String]
|
773
846
|
# The word corresponding to this set of information.
|
847
|
+
# @!attribute [rw] confidence
|
848
|
+
# @return [::Float]
|
849
|
+
# The confidence estimate between 0.0 and 1.0. A higher number
|
850
|
+
# indicates an estimated greater likelihood that the recognized words are
|
851
|
+
# correct. This field is set only for the top alternative of a non-streaming
|
852
|
+
# result or, of a streaming result where `is_final=true`.
|
853
|
+
# This field is not guaranteed to be accurate and users should not rely on it
|
854
|
+
# to be always provided.
|
855
|
+
# The default of 0.0 is a sentinel value indicating `confidence` was not set.
|
774
856
|
# @!attribute [r] speaker_tag
|
775
857
|
# @return [::Integer]
|
776
858
|
# Output only. A distinct integer value is assigned for every speaker within
|
@@ -0,0 +1,141 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2021 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
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module Speech
|
23
|
+
module V1
|
24
|
+
# A set of words or phrases that represents a common concept likely to appear
|
25
|
+
# in your audio, for example a list of passenger ship names. CustomClass items
|
26
|
+
# can be substituted into placeholders that you set in PhraseSet phrases.
|
27
|
+
# @!attribute [rw] name
|
28
|
+
# @return [::String]
|
29
|
+
# The resource name of the custom class.
|
30
|
+
# @!attribute [rw] custom_class_id
|
31
|
+
# @return [::String]
|
32
|
+
# If this custom class is a resource, the custom_class_id is the resource id
|
33
|
+
# of the CustomClass. Case sensitive.
|
34
|
+
# @!attribute [rw] items
|
35
|
+
# @return [::Array<::Google::Cloud::Speech::V1::CustomClass::ClassItem>]
|
36
|
+
# A collection of class items.
|
37
|
+
class CustomClass
|
38
|
+
include ::Google::Protobuf::MessageExts
|
39
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
40
|
+
|
41
|
+
# An item of the class.
|
42
|
+
# @!attribute [rw] value
|
43
|
+
# @return [::String]
|
44
|
+
# The class item's value.
|
45
|
+
class ClassItem
|
46
|
+
include ::Google::Protobuf::MessageExts
|
47
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
# Provides "hints" to the speech recognizer to favor specific words and phrases
|
52
|
+
# in the results.
|
53
|
+
# @!attribute [rw] name
|
54
|
+
# @return [::String]
|
55
|
+
# The resource name of the phrase set.
|
56
|
+
# @!attribute [rw] phrases
|
57
|
+
# @return [::Array<::Google::Cloud::Speech::V1::PhraseSet::Phrase>]
|
58
|
+
# A list of word and phrases.
|
59
|
+
# @!attribute [rw] boost
|
60
|
+
# @return [::Float]
|
61
|
+
# Hint Boost. Positive value will increase the probability that a specific
|
62
|
+
# phrase will be recognized over other similar sounding phrases. The higher
|
63
|
+
# the boost, the higher the chance of false positive recognition as well.
|
64
|
+
# Negative boost values would correspond to anti-biasing. Anti-biasing is not
|
65
|
+
# enabled, so negative boost will simply be ignored. Though `boost` can
|
66
|
+
# accept a wide range of positive values, most use cases are best served with
|
67
|
+
# values between 0 (exclusive) and 20. We recommend using a binary search
|
68
|
+
# approach to finding the optimal value for your use case. Speech recognition
|
69
|
+
# will skip PhraseSets with a boost value of 0.
|
70
|
+
class PhraseSet
|
71
|
+
include ::Google::Protobuf::MessageExts
|
72
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
73
|
+
|
74
|
+
# A phrases containing words and phrase "hints" so that
|
75
|
+
# the speech recognition is more likely to recognize them. This can be used
|
76
|
+
# to improve the accuracy for specific words and phrases, for example, if
|
77
|
+
# specific commands are typically spoken by the user. This can also be used
|
78
|
+
# to add additional words to the vocabulary of the recognizer. See
|
79
|
+
# [usage limits](https://cloud.google.com/speech-to-text/quotas#content).
|
80
|
+
#
|
81
|
+
# List items can also include pre-built or custom classes containing groups
|
82
|
+
# of words that represent common concepts that occur in natural language. For
|
83
|
+
# example, rather than providing a phrase hint for every month of the
|
84
|
+
# year (e.g. "i was born in january", "i was born in febuary", ...), use the
|
85
|
+
# pre-built `$MONTH` class improves the likelihood of correctly transcribing
|
86
|
+
# audio that includes months (e.g. "i was born in $month").
|
87
|
+
# To refer to pre-built classes, use the class' symbol prepended with `$`
|
88
|
+
# e.g. `$MONTH`. To refer to custom classes that were defined inline in the
|
89
|
+
# request, set the class's `custom_class_id` to a string unique to all class
|
90
|
+
# resources and inline classes. Then use the class' id wrapped in $`{...}`
|
91
|
+
# e.g. "$\\{my-months}". To refer to custom classes resources, use the class'
|
92
|
+
# id wrapped in `${}` (e.g. `${my-months}`).
|
93
|
+
#
|
94
|
+
# Speech-to-Text supports three locations: `global`, `us` (US North America),
|
95
|
+
# and `eu` (Europe). If you are calling the `speech.googleapis.com`
|
96
|
+
# endpoint, use the `global` location. To specify a region, use a
|
97
|
+
# [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
|
98
|
+
# `eu` location value.
|
99
|
+
# @!attribute [rw] value
|
100
|
+
# @return [::String]
|
101
|
+
# The phrase itself.
|
102
|
+
# @!attribute [rw] boost
|
103
|
+
# @return [::Float]
|
104
|
+
# Hint Boost. Overrides the boost set at the phrase set level.
|
105
|
+
# Positive value will increase the probability that a specific phrase will
|
106
|
+
# be recognized over other similar sounding phrases. The higher the boost,
|
107
|
+
# the higher the chance of false positive recognition as well. Negative
|
108
|
+
# boost will simply be ignored. Though `boost` can accept a wide range of
|
109
|
+
# positive values, most use cases are best served
|
110
|
+
# with values between 0 and 20. We recommend using a binary search approach
|
111
|
+
# to finding the optimal value for your use case. Speech recognition
|
112
|
+
# will skip PhraseSets with a boost value of 0.
|
113
|
+
class Phrase
|
114
|
+
include ::Google::Protobuf::MessageExts
|
115
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
119
|
+
# Speech adaptation configuration.
|
120
|
+
# @!attribute [rw] phrase_sets
|
121
|
+
# @return [::Array<::Google::Cloud::Speech::V1::PhraseSet>]
|
122
|
+
# A collection of phrase sets. To specify the hints inline, leave the
|
123
|
+
# phrase set's `name` blank and fill in the rest of its fields. Any
|
124
|
+
# phrase set can use any custom class.
|
125
|
+
# @!attribute [rw] phrase_set_references
|
126
|
+
# @return [::Array<::String>]
|
127
|
+
# A collection of phrase set resource names to use.
|
128
|
+
# @!attribute [rw] custom_classes
|
129
|
+
# @return [::Array<::Google::Cloud::Speech::V1::CustomClass>]
|
130
|
+
# A collection of custom classes. To specify the classes inline, leave the
|
131
|
+
# class' `name` blank and fill in the rest of its fields, giving it a unique
|
132
|
+
# `custom_class_id`. Refer to the inline defined class in phrase hints by its
|
133
|
+
# `custom_class_id`.
|
134
|
+
class SpeechAdaptation
|
135
|
+
include ::Google::Protobuf::MessageExts
|
136
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
137
|
+
end
|
138
|
+
end
|
139
|
+
end
|
140
|
+
end
|
141
|
+
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.7.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-12-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
@@ -177,15 +177,18 @@ files:
|
|
177
177
|
- lib/google/cloud/speech/v1.rb
|
178
178
|
- lib/google/cloud/speech/v1/cloud_speech_pb.rb
|
179
179
|
- lib/google/cloud/speech/v1/cloud_speech_services_pb.rb
|
180
|
+
- lib/google/cloud/speech/v1/resource_pb.rb
|
180
181
|
- lib/google/cloud/speech/v1/speech.rb
|
181
182
|
- lib/google/cloud/speech/v1/speech/client.rb
|
182
183
|
- lib/google/cloud/speech/v1/speech/credentials.rb
|
183
184
|
- lib/google/cloud/speech/v1/speech/operations.rb
|
185
|
+
- lib/google/cloud/speech/v1/speech/paths.rb
|
184
186
|
- lib/google/cloud/speech/v1/version.rb
|
185
187
|
- proto_docs/README.md
|
186
188
|
- proto_docs/google/api/field_behavior.rb
|
187
189
|
- proto_docs/google/api/resource.rb
|
188
190
|
- proto_docs/google/cloud/speech/v1/cloud_speech.rb
|
191
|
+
- proto_docs/google/cloud/speech/v1/resource.rb
|
189
192
|
- proto_docs/google/longrunning/operations.rb
|
190
193
|
- proto_docs/google/protobuf/any.rb
|
191
194
|
- proto_docs/google/protobuf/duration.rb
|