google-cloud-speech-v1p1beta1 0.1.2 → 0.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6c6bc0706103287ffb5c7469703cf1bdb73a4026f59f4faaabd99e26031f12de
4
- data.tar.gz: 3a37318b3774468f004c6ab6a33322a575da10ff0fa39d6865e42d7c119fa90a
3
+ metadata.gz: d4ecda199a75b5174fa9f6b00e905b1a6ced13b45150008f84f81b9bae845d76
4
+ data.tar.gz: 7a12b2fb200c6f5e7e6b0a3c2e91df16fba7ff0d254fd3d56ff78d2aa732fb04
5
5
  SHA512:
6
- metadata.gz: 64d2b0d2ebca78a6cfd91ff449e5fa36c332c5f63dce229c569177945c62a3ec0eccfd9a3156465d200f7a5feda0f6e09f91f82ec25aef5f5c4f93a81e46ab6c
7
- data.tar.gz: d0814247cad779daa3b295d889fd8a075f17be06cae99ebc7cf75941d25ca31219deeaa8db141d1de0145cafe0abee5ad0d0b1c7fd7b627e1e9950a32a393738
6
+ metadata.gz: f8f77f2efa736c0b93f101f65c0808346132bd9e739c3a5bd956adc5edd0c6b9d22515e3265740524fd8b083e3ff268b93b012c4cacb6fb29eaf0f170474e792
7
+ data.tar.gz: 49546f33eace579ca0bac7b0a0f92b907f4e4e212e30a5aa26a66afe33e270995e026646babe92b582c9a700a61b5a61c4f505976f17a13ed53c8a71095dc4fd
@@ -6,6 +6,8 @@ require 'google/protobuf'
6
6
  require 'google/api/annotations_pb'
7
7
  require 'google/api/client_pb'
8
8
  require 'google/api/field_behavior_pb'
9
+ require 'google/api/resource_pb'
10
+ require 'google/cloud/speech/v1p1beta1/resource_pb'
9
11
  require 'google/longrunning/operations_pb'
10
12
  require 'google/protobuf/any_pb'
11
13
  require 'google/protobuf/duration_pb'
@@ -41,6 +43,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
41
43
  repeated :alternative_language_codes, :string, 18
42
44
  optional :max_alternatives, :int32, 4
43
45
  optional :profanity_filter, :bool, 5
46
+ optional :adaptation, :message, 20, "google.cloud.speech.v1p1beta1.SpeechAdaptation"
44
47
  repeated :speech_contexts, :message, 6, "google.cloud.speech.v1p1beta1.SpeechContext"
45
48
  optional :enable_word_time_offsets, :bool, 8
46
49
  optional :enable_word_confidence, :bool, 15
@@ -67,6 +70,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
67
70
  optional :enable_speaker_diarization, :bool, 1
68
71
  optional :min_speaker_count, :int32, 2
69
72
  optional :max_speaker_count, :int32, 3
73
+ optional :speaker_tag, :int32, 5
70
74
  end
71
75
  add_message "google.cloud.speech.v1p1beta1.RecognitionMetadata" do
72
76
  optional :interaction_type, :enum, 1, "google.cloud.speech.v1p1beta1.RecognitionMetadata.InteractionType"
@@ -130,6 +134,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
130
134
  optional :progress_percent, :int32, 1
131
135
  optional :start_time, :message, 2, "google.protobuf.Timestamp"
132
136
  optional :last_update_time, :message, 3, "google.protobuf.Timestamp"
137
+ optional :uri, :string, 4
133
138
  end
134
139
  add_message "google.cloud.speech.v1p1beta1.StreamingRecognizeResponse" do
135
140
  optional :error, :message, 1, "google.rpc.Status"
@@ -1,7 +1,7 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # Source: google/cloud/speech/v1p1beta1/cloud_speech.proto for package 'google.cloud.speech.v1p1beta1'
3
3
  # Original file comments:
4
- # Copyright 2019 Google LLC.
4
+ # Copyright 2020 Google LLC
5
5
  #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License");
7
7
  # you may not use this file except in compliance with the License.
@@ -15,7 +15,6 @@
15
15
  # See the License for the specific language governing permissions and
16
16
  # limitations under the License.
17
17
  #
18
- #
19
18
 
20
19
  require 'grpc'
21
20
  require 'google/cloud/speech/v1p1beta1/cloud_speech_pb'
@@ -0,0 +1,46 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/cloud/speech/v1p1beta1/resource.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'google/api/annotations_pb'
7
+ require 'google/api/resource_pb'
8
+ Google::Protobuf::DescriptorPool.generated_pool.build do
9
+ add_file("google/cloud/speech/v1p1beta1/resource.proto", :syntax => :proto3) do
10
+ add_message "google.cloud.speech.v1p1beta1.CustomClass" do
11
+ optional :name, :string, 1
12
+ optional :custom_class_id, :string, 2
13
+ repeated :items, :message, 3, "google.cloud.speech.v1p1beta1.CustomClass.ClassItem"
14
+ end
15
+ add_message "google.cloud.speech.v1p1beta1.CustomClass.ClassItem" do
16
+ optional :value, :string, 1
17
+ end
18
+ add_message "google.cloud.speech.v1p1beta1.PhraseSet" do
19
+ optional :name, :string, 1
20
+ repeated :phrases, :message, 2, "google.cloud.speech.v1p1beta1.PhraseSet.Phrase"
21
+ optional :boost, :float, 4
22
+ end
23
+ add_message "google.cloud.speech.v1p1beta1.PhraseSet.Phrase" do
24
+ optional :value, :string, 1
25
+ optional :boost, :float, 2
26
+ end
27
+ add_message "google.cloud.speech.v1p1beta1.SpeechAdaptation" do
28
+ repeated :phrase_sets, :message, 1, "google.cloud.speech.v1p1beta1.PhraseSet"
29
+ repeated :custom_classes, :message, 2, "google.cloud.speech.v1p1beta1.CustomClass"
30
+ end
31
+ end
32
+ end
33
+
34
+ module Google
35
+ module Cloud
36
+ module Speech
37
+ module V1p1beta1
38
+ CustomClass = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.CustomClass").msgclass
39
+ CustomClass::ClassItem = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.CustomClass.ClassItem").msgclass
40
+ PhraseSet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.PhraseSet").msgclass
41
+ PhraseSet::Phrase = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.PhraseSet.Phrase").msgclass
42
+ SpeechAdaptation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.SpeechAdaptation").msgclass
43
+ end
44
+ end
45
+ end
46
+ end
@@ -23,6 +23,7 @@ require "gapic/config/method"
23
23
  require "google/cloud/speech/v1p1beta1/version"
24
24
 
25
25
  require "google/cloud/speech/v1p1beta1/speech/credentials"
26
+ require "google/cloud/speech/v1p1beta1/speech/paths"
26
27
  require "google/cloud/speech/v1p1beta1/speech/operations"
27
28
  require "google/cloud/speech/v1p1beta1/speech/client"
28
29
 
@@ -30,6 +30,8 @@ module Google
30
30
  # Service that implements Google Cloud Speech API.
31
31
  #
32
32
  class Client
33
+ include Paths
34
+
33
35
  # @private
34
36
  attr_reader :speech_stub
35
37
 
@@ -150,6 +152,7 @@ module Google
150
152
 
151
153
  @operations_client = Operations.new do |config|
152
154
  config.credentials = credentials
155
+ config.endpoint = @config.endpoint
153
156
  end
154
157
 
155
158
  @speech_stub = Gapic::ServiceStub.new(
@@ -161,6 +164,13 @@ module Google
161
164
  )
162
165
  end
163
166
 
167
+ ##
168
+ # Get the associated client for long-running operations.
169
+ #
170
+ # @return [Google::Cloud::Speech::V1p1beta1::Speech::Operations]
171
+ #
172
+ attr_reader :operations_client
173
+
164
174
  # Service calls
165
175
 
166
176
  ##
@@ -0,0 +1,71 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 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 V1p1beta1
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
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Speech
23
23
  module V1p1beta1
24
- VERSION = "0.1.2"
24
+ VERSION = "0.2.0"
25
25
  end
26
26
  end
27
27
  end
@@ -109,7 +109,8 @@ module Google
109
109
  # @return [Google::Cloud::Speech::V1p1beta1::RecognitionConfig::AudioEncoding]
110
110
  # Encoding of audio data sent in all `RecognitionAudio` messages.
111
111
  # This field is optional for `FLAC` and `WAV` audio files and required
112
- # for all other audio formats. For details, see {Google::Cloud::Speech::V1p1beta1::RecognitionConfig::AudioEncoding AudioEncoding}.
112
+ # for all other audio formats. For details, see
113
+ # {Google::Cloud::Speech::V1p1beta1::RecognitionConfig::AudioEncoding AudioEncoding}.
113
114
  # @!attribute [rw] sample_rate_hertz
114
115
  # @return [Integer]
115
116
  # Sample rate in Hertz of the audio data sent in all
@@ -118,7 +119,8 @@ module Google
118
119
  # source to 16000 Hz. If that's not possible, use the native sample rate of
119
120
  # the audio source (instead of re-sampling).
120
121
  # This field is optional for FLAC and WAV audio files, but is
121
- # required for all other audio formats. For details, see {Google::Cloud::Speech::V1p1beta1::RecognitionConfig::AudioEncoding AudioEncoding}.
122
+ # required for all other audio formats. For details, see
123
+ # {Google::Cloud::Speech::V1p1beta1::RecognitionConfig::AudioEncoding AudioEncoding}.
122
124
  # @!attribute [rw] audio_channel_count
123
125
  # @return [Integer]
124
126
  # The number of channels in the input audio data.
@@ -174,6 +176,13 @@ module Google
174
176
  # profanities, replacing all but the initial character in each filtered word
175
177
  # with asterisks, e.g. "f***". If set to `false` or omitted, profanities
176
178
  # won't be filtered out.
179
+ # @!attribute [rw] adaptation
180
+ # @return [Google::Cloud::Speech::V1p1beta1::SpeechAdaptation]
181
+ # Speech adaptation configuration improves the accuracy of speech
182
+ # recognition. When speech adaptation is set it supersedes the
183
+ # `speech_contexts` field. For more information, see the [speech
184
+ # adaptation](https://cloud.google.com/speech-to-text/docs/context-strength)
185
+ # documentation.
177
186
  # @!attribute [rw] speech_contexts
178
187
  # @return [Array<Google::Cloud::Speech::V1p1beta1::SpeechContext>]
179
188
  # Array of {Google::Cloud::Speech::V1p1beta1::SpeechContext SpeechContext}.
@@ -198,9 +207,6 @@ module Google
198
207
  # This feature is only available in select languages. Setting this for
199
208
  # requests in other languages has no effect at all.
200
209
  # The default 'false' value does not add punctuation to result hypotheses.
201
- # Note: This is currently offered as an experimental service, complimentary
202
- # to all users. In the future this may be exclusively available as a
203
- # premium feature.
204
210
  # @!attribute [rw] enable_speaker_diarization
205
211
  # @return [Boolean]
206
212
  # If 'true', enables speaker detection for each recognized word in
@@ -294,7 +300,8 @@ module Google
294
300
  # an `AudioEncoding` when you send send `FLAC` or `WAV` audio, the
295
301
  # encoding configuration must match the encoding described in the audio
296
302
  # header; otherwise the request returns an
297
- # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error code.
303
+ # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error
304
+ # code.
298
305
  module AudioEncoding
299
306
  # Not specified.
300
307
  ENCODING_UNSPECIFIED = 0
@@ -340,8 +347,8 @@ module Google
340
347
  SPEEX_WITH_HEADER_BYTE = 7
341
348
 
342
349
  # MP3 audio. Support all standard MP3 bitrates (which range from 32-320
343
- # kbps). When using this encoding, `sample_rate_hertz` can be optionally
344
- # unset if not known.
350
+ # kbps). When using this encoding, `sample_rate_hertz` has to match the
351
+ # sample rate of the file being used.
345
352
  MP3 = 8
346
353
  end
347
354
  end
@@ -362,6 +369,9 @@ module Google
362
369
  # Maximum number of speakers in the conversation. This range gives you more
363
370
  # flexibility by allowing the system to automatically determine the correct
364
371
  # number of speakers. If not set, the default value is 6.
372
+ # @!attribute [r] speaker_tag
373
+ # @return [Integer]
374
+ # Output only. Unused.
365
375
  class SpeakerDiarizationConfig
366
376
  include Google::Protobuf::MessageExts
367
377
  extend Google::Protobuf::MessageExts::ClassMethods
@@ -534,8 +544,8 @@ module Google
534
544
 
535
545
  # Contains audio data in the encoding specified in the `RecognitionConfig`.
536
546
  # Either `content` or `uri` must be supplied. Supplying both or neither
537
- # returns [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. See
538
- # [content limits](https://cloud.google.com/speech-to-text/quotas#content).
547
+ # returns [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
548
+ # See [content limits](https://cloud.google.com/speech-to-text/quotas#content).
539
549
  # @!attribute [rw] content
540
550
  # @return [String]
541
551
  # The audio data bytes encoded as specified in
@@ -548,8 +558,9 @@ module Google
548
558
  # Currently, only Google Cloud Storage URIs are
549
559
  # supported, which must be specified in the following format:
550
560
  # `gs://bucket_name/object_name` (other URI formats return
551
- # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see
552
- # [Request URIs](https://cloud.google.com/storage/docs/reference-uris).
561
+ # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]).
562
+ # For more information, see [Request
563
+ # URIs](https://cloud.google.com/storage/docs/reference-uris).
553
564
  class RecognitionAudio
554
565
  include Google::Protobuf::MessageExts
555
566
  extend Google::Protobuf::MessageExts::ClassMethods
@@ -594,6 +605,10 @@ module Google
594
605
  # @!attribute [rw] last_update_time
595
606
  # @return [Google::Protobuf::Timestamp]
596
607
  # Time of the most recent processing update.
608
+ # @!attribute [r] uri
609
+ # @return [String]
610
+ # The URI of the audio file being transcribed. Empty if the audio was sent
611
+ # as byte content.
597
612
  class LongRunningRecognizeMetadata
598
613
  include Google::Protobuf::MessageExts
599
614
  extend Google::Protobuf::MessageExts::ClassMethods
@@ -712,11 +727,11 @@ module Google
712
727
  # For multi-channel audio, this is the channel number corresponding to the
713
728
  # recognized result for the audio from that channel.
714
729
  # For audio_channel_count = N, its output values can range from '1' to 'N'.
715
- # @!attribute [rw] language_code
730
+ # @!attribute [r] language_code
716
731
  # @return [String]
717
- # The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag
718
- # of the language in this result. This language code was detected to have
719
- # the most likelihood of being spoken in the audio.
732
+ # Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
733
+ # language tag of the language in this result. This language code was
734
+ # detected to have the most likelihood of being spoken in the audio.
720
735
  class StreamingRecognitionResult
721
736
  include Google::Protobuf::MessageExts
722
737
  extend Google::Protobuf::MessageExts::ClassMethods
@@ -734,11 +749,11 @@ module Google
734
749
  # For multi-channel audio, this is the channel number corresponding to the
735
750
  # recognized result for the audio from that channel.
736
751
  # For audio_channel_count = N, its output values can range from '1' to 'N'.
737
- # @!attribute [rw] language_code
752
+ # @!attribute [r] language_code
738
753
  # @return [String]
739
- # The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag
740
- # of the language in this result. This language code was detected to have
741
- # the most likelihood of being spoken in the audio.
754
+ # Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
755
+ # language tag of the language in this result. This language code was
756
+ # detected to have the most likelihood of being spoken in the audio.
742
757
  class SpeechRecognitionResult
743
758
  include Google::Protobuf::MessageExts
744
759
  extend Google::Protobuf::MessageExts::ClassMethods
@@ -796,9 +811,9 @@ module Google
796
811
  # This field is not guaranteed to be accurate and users should not rely on it
797
812
  # to be always provided.
798
813
  # The default of 0.0 is a sentinel value indicating `confidence` was not set.
799
- # @!attribute [rw] speaker_tag
814
+ # @!attribute [r] speaker_tag
800
815
  # @return [Integer]
801
- # A distinct integer value is assigned for every speaker within
816
+ # Output only. A distinct integer value is assigned for every speaker within
802
817
  # the audio. This field specifies which one of those speakers was detected to
803
818
  # have spoken this word. Value ranges from '1' to diarization_speaker_count.
804
819
  # speaker_tag is set if enable_speaker_diarization = 'true' and only in the
@@ -0,0 +1,133 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 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 V1p1beta1
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.
34
+ # @!attribute [rw] items
35
+ # @return [Array<Google::Cloud::Speech::V1p1beta1::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::V1p1beta1::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
+ # @!attribute [rw] value
94
+ # @return [String]
95
+ # The phrase itself.
96
+ # @!attribute [rw] boost
97
+ # @return [Float]
98
+ # Hint Boost. Overrides the boost set at the phrase set level.
99
+ # Positive value will increase the probability that a specific phrase will
100
+ # be recognized over other similar sounding phrases. The higher the boost,
101
+ # the higher the chance of false positive recognition as well. Negative
102
+ # boost values would correspond to anti-biasing. Anti-biasing is not
103
+ # enabled, so negative boost will simply be ignored. Though `boost` can
104
+ # accept a wide range of positive values, most use cases are best served
105
+ # with values between 0 and 20. We recommend using a binary search approach
106
+ # to finding the optimal value for your use case. Speech recognition
107
+ # will skip PhraseSets with a boost value of 0.
108
+ class Phrase
109
+ include Google::Protobuf::MessageExts
110
+ extend Google::Protobuf::MessageExts::ClassMethods
111
+ end
112
+ end
113
+
114
+ # Speech adaptation configuration.
115
+ # @!attribute [rw] phrase_sets
116
+ # @return [Array<Google::Cloud::Speech::V1p1beta1::PhraseSet>]
117
+ # A collection of phrase sets. To specify the hints inline, leave the
118
+ # phrase set's `name` blank and fill in the rest of its fields. Any
119
+ # phrase set can use any custom class.
120
+ # @!attribute [rw] custom_classes
121
+ # @return [Array<Google::Cloud::Speech::V1p1beta1::CustomClass>]
122
+ # A collection of custom classes. To specify the classes inline, leave the
123
+ # class' `name` blank and fill in the rest of its fields, giving it a unique
124
+ # `custom_class_id`. Refer to the inline defined class in phrase hints by its
125
+ # `custom_class_id`.
126
+ class SpeechAdaptation
127
+ include Google::Protobuf::MessageExts
128
+ extend Google::Protobuf::MessageExts::ClassMethods
129
+ end
130
+ end
131
+ end
132
+ end
133
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-speech-v1p1beta1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.2.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: 2020-04-13 00:00:00.000000000 Z
11
+ date: 2020-04-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -142,15 +142,18 @@ files:
142
142
  - lib/google/cloud/speech/v1p1beta1.rb
143
143
  - lib/google/cloud/speech/v1p1beta1/cloud_speech_pb.rb
144
144
  - lib/google/cloud/speech/v1p1beta1/cloud_speech_services_pb.rb
145
+ - lib/google/cloud/speech/v1p1beta1/resource_pb.rb
145
146
  - lib/google/cloud/speech/v1p1beta1/speech.rb
146
147
  - lib/google/cloud/speech/v1p1beta1/speech/client.rb
147
148
  - lib/google/cloud/speech/v1p1beta1/speech/credentials.rb
148
149
  - lib/google/cloud/speech/v1p1beta1/speech/operations.rb
150
+ - lib/google/cloud/speech/v1p1beta1/speech/paths.rb
149
151
  - lib/google/cloud/speech/v1p1beta1/version.rb
150
152
  - proto_docs/README.md
151
153
  - proto_docs/google/api/field_behavior.rb
152
154
  - proto_docs/google/api/resource.rb
153
155
  - proto_docs/google/cloud/speech/v1p1beta1/cloud_speech.rb
156
+ - proto_docs/google/cloud/speech/v1p1beta1/resource.rb
154
157
  - proto_docs/google/longrunning/operations.rb
155
158
  - proto_docs/google/protobuf/any.rb
156
159
  - proto_docs/google/protobuf/duration.rb