google-cloud-speech-v1 0.4.2 → 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 +27 -2
- data/lib/google/cloud/speech/v1/cloud_speech_services_pb.rb +2 -3
- data/lib/google/cloud/speech/v1/resource_pb.rb +48 -0
- data/lib/google/cloud/speech/v1/speech/client.rb +104 -40
- data/lib/google/cloud/speech/v1/speech/operations.rb +145 -33
- 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 +130 -13
- data/proto_docs/google/cloud/speech/v1/resource.rb +141 -0
- data/proto_docs/google/protobuf/wrappers.rb +121 -0
- metadata +8 -4
@@ -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
|
@@ -0,0 +1,121 @@
|
|
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 Protobuf
|
22
|
+
# Wrapper message for `double`.
|
23
|
+
#
|
24
|
+
# The JSON representation for `DoubleValue` is JSON number.
|
25
|
+
# @!attribute [rw] value
|
26
|
+
# @return [::Float]
|
27
|
+
# The double value.
|
28
|
+
class DoubleValue
|
29
|
+
include ::Google::Protobuf::MessageExts
|
30
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
31
|
+
end
|
32
|
+
|
33
|
+
# Wrapper message for `float`.
|
34
|
+
#
|
35
|
+
# The JSON representation for `FloatValue` is JSON number.
|
36
|
+
# @!attribute [rw] value
|
37
|
+
# @return [::Float]
|
38
|
+
# The float value.
|
39
|
+
class FloatValue
|
40
|
+
include ::Google::Protobuf::MessageExts
|
41
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
42
|
+
end
|
43
|
+
|
44
|
+
# Wrapper message for `int64`.
|
45
|
+
#
|
46
|
+
# The JSON representation for `Int64Value` is JSON string.
|
47
|
+
# @!attribute [rw] value
|
48
|
+
# @return [::Integer]
|
49
|
+
# The int64 value.
|
50
|
+
class Int64Value
|
51
|
+
include ::Google::Protobuf::MessageExts
|
52
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
53
|
+
end
|
54
|
+
|
55
|
+
# Wrapper message for `uint64`.
|
56
|
+
#
|
57
|
+
# The JSON representation for `UInt64Value` is JSON string.
|
58
|
+
# @!attribute [rw] value
|
59
|
+
# @return [::Integer]
|
60
|
+
# The uint64 value.
|
61
|
+
class UInt64Value
|
62
|
+
include ::Google::Protobuf::MessageExts
|
63
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
64
|
+
end
|
65
|
+
|
66
|
+
# Wrapper message for `int32`.
|
67
|
+
#
|
68
|
+
# The JSON representation for `Int32Value` is JSON number.
|
69
|
+
# @!attribute [rw] value
|
70
|
+
# @return [::Integer]
|
71
|
+
# The int32 value.
|
72
|
+
class Int32Value
|
73
|
+
include ::Google::Protobuf::MessageExts
|
74
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
75
|
+
end
|
76
|
+
|
77
|
+
# Wrapper message for `uint32`.
|
78
|
+
#
|
79
|
+
# The JSON representation for `UInt32Value` is JSON number.
|
80
|
+
# @!attribute [rw] value
|
81
|
+
# @return [::Integer]
|
82
|
+
# The uint32 value.
|
83
|
+
class UInt32Value
|
84
|
+
include ::Google::Protobuf::MessageExts
|
85
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
86
|
+
end
|
87
|
+
|
88
|
+
# Wrapper message for `bool`.
|
89
|
+
#
|
90
|
+
# The JSON representation for `BoolValue` is JSON `true` and `false`.
|
91
|
+
# @!attribute [rw] value
|
92
|
+
# @return [::Boolean]
|
93
|
+
# The bool value.
|
94
|
+
class BoolValue
|
95
|
+
include ::Google::Protobuf::MessageExts
|
96
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
97
|
+
end
|
98
|
+
|
99
|
+
# Wrapper message for `string`.
|
100
|
+
#
|
101
|
+
# The JSON representation for `StringValue` is JSON string.
|
102
|
+
# @!attribute [rw] value
|
103
|
+
# @return [::String]
|
104
|
+
# The string value.
|
105
|
+
class StringValue
|
106
|
+
include ::Google::Protobuf::MessageExts
|
107
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
108
|
+
end
|
109
|
+
|
110
|
+
# Wrapper message for `bytes`.
|
111
|
+
#
|
112
|
+
# The JSON representation for `BytesValue` is JSON string.
|
113
|
+
# @!attribute [rw] value
|
114
|
+
# @return [::String]
|
115
|
+
# The bytes value.
|
116
|
+
class BytesValue
|
117
|
+
include ::Google::Protobuf::MessageExts
|
118
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
119
|
+
end
|
120
|
+
end
|
121
|
+
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-07
|
11
|
+
date: 2021-12-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.7'
|
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.7'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 2.a
|
@@ -177,20 +177,24 @@ 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
|
192
195
|
- proto_docs/google/protobuf/empty.rb
|
193
196
|
- proto_docs/google/protobuf/timestamp.rb
|
197
|
+
- proto_docs/google/protobuf/wrappers.rb
|
194
198
|
- proto_docs/google/rpc/status.rb
|
195
199
|
homepage: https://github.com/googleapis/google-cloud-ruby
|
196
200
|
licenses:
|