google-cloud-speech-v1p1beta1 0.2.0 → 0.3.3

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.
@@ -35,10 +35,10 @@ module Google
35
35
  # @param location [String]
36
36
  # @param custom_class [String]
37
37
  #
38
- # @return [String]
38
+ # @return [::String]
39
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? "/"
40
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
41
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
42
42
 
43
43
  "projects/#{project}/locations/#{location}/customClasses/#{custom_class}"
44
44
  end
@@ -54,10 +54,10 @@ module Google
54
54
  # @param location [String]
55
55
  # @param phrase_set [String]
56
56
  #
57
- # @return [String]
57
+ # @return [::String]
58
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? "/"
59
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
60
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
61
61
 
62
62
  "projects/#{project}/locations/#{location}/phraseSets/#{phrase_set}"
63
63
  end
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Speech
23
23
  module V1p1beta1
24
- VERSION = "0.2.0"
24
+ VERSION = "0.3.3"
25
25
  end
26
26
  end
27
27
  end
@@ -128,7 +128,7 @@ module Google
128
128
  # - pattern: "shelves/{shelf}"
129
129
  # parent_type: "cloudresourcemanager.googleapis.com/Folder"
130
130
  # @!attribute [rw] type
131
- # @return [String]
131
+ # @return [::String]
132
132
  # The resource type. It must be in the format of
133
133
  # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be
134
134
  # singular and must not include version numbers.
@@ -140,7 +140,7 @@ module Google
140
140
  # should use PascalCase (UpperCamelCase). The maximum number of
141
141
  # characters allowed for the `resource_type_kind` is 100.
142
142
  # @!attribute [rw] pattern
143
- # @return [Array<String>]
143
+ # @return [::Array<::String>]
144
144
  # Optional. The relative resource name pattern associated with this resource
145
145
  # type. The DNS prefix of the full resource name shouldn't be specified here.
146
146
  #
@@ -161,11 +161,11 @@ module Google
161
161
  # the same component name (e.g. "project") refers to IDs of the same
162
162
  # type of resource.
163
163
  # @!attribute [rw] name_field
164
- # @return [String]
164
+ # @return [::String]
165
165
  # Optional. The field on the resource that designates the resource name
166
166
  # field. If omitted, this is assumed to be "name".
167
167
  # @!attribute [rw] history
168
- # @return [Google::Api::ResourceDescriptor::History]
168
+ # @return [::Google::Api::ResourceDescriptor::History]
169
169
  # Optional. The historical or future-looking state of the resource pattern.
170
170
  #
171
171
  # Example:
@@ -182,19 +182,19 @@ module Google
182
182
  # };
183
183
  # }
184
184
  # @!attribute [rw] plural
185
- # @return [String]
185
+ # @return [::String]
186
186
  # The plural name used in the resource name, such as 'projects' for
187
187
  # the name of 'projects/\\{project}'. It is the same concept of the `plural`
188
188
  # field in k8s CRD spec
189
189
  # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
190
190
  # @!attribute [rw] singular
191
- # @return [String]
191
+ # @return [::String]
192
192
  # The same concept of the `singular` field in k8s CRD spec
193
193
  # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
194
194
  # Such as "project" for the `resourcemanager.googleapis.com/Project` type.
195
195
  class ResourceDescriptor
196
- include Google::Protobuf::MessageExts
197
- extend Google::Protobuf::MessageExts::ClassMethods
196
+ include ::Google::Protobuf::MessageExts
197
+ extend ::Google::Protobuf::MessageExts::ClassMethods
198
198
 
199
199
  # A description of the historical or future-looking state of the
200
200
  # resource pattern.
@@ -216,7 +216,7 @@ module Google
216
216
  # Defines a proto annotation that describes a string field that refers to
217
217
  # an API resource.
218
218
  # @!attribute [rw] type
219
- # @return [String]
219
+ # @return [::String]
220
220
  # The resource type that the annotated field references.
221
221
  #
222
222
  # Example:
@@ -227,7 +227,7 @@ module Google
227
227
  # }];
228
228
  # }
229
229
  # @!attribute [rw] child_type
230
- # @return [String]
230
+ # @return [::String]
231
231
  # The resource type of a child collection that the annotated field
232
232
  # references. This is useful for annotating the `parent` field that
233
233
  # doesn't have a fixed resource type.
@@ -240,8 +240,8 @@ module Google
240
240
  # };
241
241
  # }
242
242
  class ResourceReference
243
- include Google::Protobuf::MessageExts
244
- extend Google::Protobuf::MessageExts::ClassMethods
243
+ include ::Google::Protobuf::MessageExts
244
+ extend ::Google::Protobuf::MessageExts::ClassMethods
245
245
  end
246
246
  end
247
247
  end
@@ -23,29 +23,29 @@ module Google
23
23
  module V1p1beta1
24
24
  # The top-level message sent by the client for the `Recognize` method.
25
25
  # @!attribute [rw] config
26
- # @return [Google::Cloud::Speech::V1p1beta1::RecognitionConfig]
26
+ # @return [::Google::Cloud::Speech::V1p1beta1::RecognitionConfig]
27
27
  # Required. Provides information to the recognizer that specifies how to
28
28
  # process the request.
29
29
  # @!attribute [rw] audio
30
- # @return [Google::Cloud::Speech::V1p1beta1::RecognitionAudio]
30
+ # @return [::Google::Cloud::Speech::V1p1beta1::RecognitionAudio]
31
31
  # Required. The audio data to be recognized.
32
32
  class RecognizeRequest
33
- include Google::Protobuf::MessageExts
34
- extend Google::Protobuf::MessageExts::ClassMethods
33
+ include ::Google::Protobuf::MessageExts
34
+ extend ::Google::Protobuf::MessageExts::ClassMethods
35
35
  end
36
36
 
37
37
  # The top-level message sent by the client for the `LongRunningRecognize`
38
38
  # method.
39
39
  # @!attribute [rw] config
40
- # @return [Google::Cloud::Speech::V1p1beta1::RecognitionConfig]
40
+ # @return [::Google::Cloud::Speech::V1p1beta1::RecognitionConfig]
41
41
  # Required. Provides information to the recognizer that specifies how to
42
42
  # process the request.
43
43
  # @!attribute [rw] audio
44
- # @return [Google::Cloud::Speech::V1p1beta1::RecognitionAudio]
44
+ # @return [::Google::Cloud::Speech::V1p1beta1::RecognitionAudio]
45
45
  # Required. The audio data to be recognized.
46
46
  class LongRunningRecognizeRequest
47
- include Google::Protobuf::MessageExts
48
- extend Google::Protobuf::MessageExts::ClassMethods
47
+ include ::Google::Protobuf::MessageExts
48
+ extend ::Google::Protobuf::MessageExts::ClassMethods
49
49
  end
50
50
 
51
51
  # The top-level message sent by the client for the `StreamingRecognize` method.
@@ -54,12 +54,12 @@ module Google
54
54
  # `audio_content`. All subsequent messages must contain `audio_content` and
55
55
  # must not contain a `streaming_config` message.
56
56
  # @!attribute [rw] streaming_config
57
- # @return [Google::Cloud::Speech::V1p1beta1::StreamingRecognitionConfig]
57
+ # @return [::Google::Cloud::Speech::V1p1beta1::StreamingRecognitionConfig]
58
58
  # Provides information to the recognizer that specifies how to process the
59
59
  # request. The first `StreamingRecognizeRequest` message must contain a
60
60
  # `streaming_config` message.
61
61
  # @!attribute [rw] audio_content
62
- # @return [String]
62
+ # @return [::String]
63
63
  # The audio data to be recognized. Sequential chunks of audio data are sent
64
64
  # in sequential `StreamingRecognizeRequest` messages. The first
65
65
  # `StreamingRecognizeRequest` message must not contain `audio_content` data
@@ -69,18 +69,18 @@ module Google
69
69
  # pure binary representation (not base64). See
70
70
  # [content limits](https://cloud.google.com/speech-to-text/quotas#content).
71
71
  class StreamingRecognizeRequest
72
- include Google::Protobuf::MessageExts
73
- extend Google::Protobuf::MessageExts::ClassMethods
72
+ include ::Google::Protobuf::MessageExts
73
+ extend ::Google::Protobuf::MessageExts::ClassMethods
74
74
  end
75
75
 
76
76
  # Provides information to the recognizer that specifies how to process the
77
77
  # request.
78
78
  # @!attribute [rw] config
79
- # @return [Google::Cloud::Speech::V1p1beta1::RecognitionConfig]
79
+ # @return [::Google::Cloud::Speech::V1p1beta1::RecognitionConfig]
80
80
  # Required. Provides information to the recognizer that specifies how to
81
81
  # process the request.
82
82
  # @!attribute [rw] single_utterance
83
- # @return [Boolean]
83
+ # @return [::Boolean]
84
84
  # If `false` or omitted, the recognizer will perform continuous
85
85
  # recognition (continuing to wait for and process audio even if the user
86
86
  # pauses speaking) until the client closes the input stream (gRPC API) or
@@ -93,26 +93,26 @@ module Google
93
93
  # more than one `StreamingRecognitionResult` with the `is_final` flag set to
94
94
  # `true`.
95
95
  # @!attribute [rw] interim_results
96
- # @return [Boolean]
96
+ # @return [::Boolean]
97
97
  # If `true`, interim results (tentative hypotheses) may be
98
98
  # returned as they become available (these interim results are indicated with
99
99
  # the `is_final=false` flag).
100
100
  # If `false` or omitted, only `is_final=true` result(s) are returned.
101
101
  class StreamingRecognitionConfig
102
- include Google::Protobuf::MessageExts
103
- extend Google::Protobuf::MessageExts::ClassMethods
102
+ include ::Google::Protobuf::MessageExts
103
+ extend ::Google::Protobuf::MessageExts::ClassMethods
104
104
  end
105
105
 
106
106
  # Provides information to the recognizer that specifies how to process the
107
107
  # request.
108
108
  # @!attribute [rw] encoding
109
- # @return [Google::Cloud::Speech::V1p1beta1::RecognitionConfig::AudioEncoding]
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
112
  # for all other audio formats. For details, see
113
- # {Google::Cloud::Speech::V1p1beta1::RecognitionConfig::AudioEncoding AudioEncoding}.
113
+ # {::Google::Cloud::Speech::V1p1beta1::RecognitionConfig::AudioEncoding AudioEncoding}.
114
114
  # @!attribute [rw] sample_rate_hertz
115
- # @return [Integer]
115
+ # @return [::Integer]
116
116
  # Sample rate in Hertz of the audio data sent in all
117
117
  # `RecognitionAudio` messages. Valid values are: 8000-48000.
118
118
  # 16000 is optimal. For best results, set the sampling rate of the audio
@@ -120,9 +120,9 @@ module Google
120
120
  # the audio source (instead of re-sampling).
121
121
  # This field is optional for FLAC and WAV audio files, but is
122
122
  # required for all other audio formats. For details, see
123
- # {Google::Cloud::Speech::V1p1beta1::RecognitionConfig::AudioEncoding AudioEncoding}.
123
+ # {::Google::Cloud::Speech::V1p1beta1::RecognitionConfig::AudioEncoding AudioEncoding}.
124
124
  # @!attribute [rw] audio_channel_count
125
- # @return [Integer]
125
+ # @return [::Integer]
126
126
  # The number of channels in the input audio data.
127
127
  # ONLY set this for MULTI-CHANNEL recognition.
128
128
  # Valid values for LINEAR16 and FLAC are `1`-`8`.
@@ -133,7 +133,7 @@ module Google
133
133
  # To perform independent recognition on each channel set
134
134
  # `enable_separate_recognition_per_channel` to 'true'.
135
135
  # @!attribute [rw] enable_separate_recognition_per_channel
136
- # @return [Boolean]
136
+ # @return [::Boolean]
137
137
  # This needs to be set to `true` explicitly and `audio_channel_count` > 1
138
138
  # to get each channel recognized separately. The recognition result will
139
139
  # contain a `channel_tag` field to state which channel that result belongs
@@ -141,7 +141,7 @@ module Google
141
141
  # request is billed cumulatively for all channels recognized:
142
142
  # `audio_channel_count` multiplied by the length of the audio.
143
143
  # @!attribute [rw] language_code
144
- # @return [String]
144
+ # @return [::String]
145
145
  # Required. The language of the supplied audio as a
146
146
  # [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
147
147
  # Example: "en-US".
@@ -149,7 +149,7 @@ module Google
149
149
  # Support](https://cloud.google.com/speech-to-text/docs/languages) for a list
150
150
  # of the currently supported language codes.
151
151
  # @!attribute [rw] alternative_language_codes
152
- # @return [Array<String>]
152
+ # @return [::Array<::String>]
153
153
  # A list of up to 3 additional
154
154
  # [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags,
155
155
  # listing possible alternative languages of the supplied audio.
@@ -163,7 +163,7 @@ module Google
163
163
  # and performance may vary for other use cases (e.g., phone call
164
164
  # transcription).
165
165
  # @!attribute [rw] max_alternatives
166
- # @return [Integer]
166
+ # @return [::Integer]
167
167
  # Maximum number of recognition hypotheses to be returned.
168
168
  # Specifically, the maximum number of `SpeechRecognitionAlternative` messages
169
169
  # within each `SpeechRecognitionResult`.
@@ -171,55 +171,55 @@ module Google
171
171
  # Valid values are `0`-`30`. A value of `0` or `1` will return a maximum of
172
172
  # one. If omitted, will return a maximum of one.
173
173
  # @!attribute [rw] profanity_filter
174
- # @return [Boolean]
174
+ # @return [::Boolean]
175
175
  # If set to `true`, the server will attempt to filter out
176
176
  # profanities, replacing all but the initial character in each filtered word
177
177
  # with asterisks, e.g. "f***". If set to `false` or omitted, profanities
178
178
  # won't be filtered out.
179
179
  # @!attribute [rw] adaptation
180
- # @return [Google::Cloud::Speech::V1p1beta1::SpeechAdaptation]
180
+ # @return [::Google::Cloud::Speech::V1p1beta1::SpeechAdaptation]
181
181
  # Speech adaptation configuration improves the accuracy of speech
182
182
  # recognition. When speech adaptation is set it supersedes the
183
183
  # `speech_contexts` field. For more information, see the [speech
184
184
  # adaptation](https://cloud.google.com/speech-to-text/docs/context-strength)
185
185
  # documentation.
186
186
  # @!attribute [rw] speech_contexts
187
- # @return [Array<Google::Cloud::Speech::V1p1beta1::SpeechContext>]
188
- # Array of {Google::Cloud::Speech::V1p1beta1::SpeechContext SpeechContext}.
187
+ # @return [::Array<::Google::Cloud::Speech::V1p1beta1::SpeechContext>]
188
+ # Array of {::Google::Cloud::Speech::V1p1beta1::SpeechContext SpeechContext}.
189
189
  # A means to provide context to assist the speech recognition. For more
190
190
  # information, see
191
191
  # [speech
192
192
  # adaptation](https://cloud.google.com/speech-to-text/docs/context-strength).
193
193
  # @!attribute [rw] enable_word_time_offsets
194
- # @return [Boolean]
194
+ # @return [::Boolean]
195
195
  # If `true`, the top result includes a list of words and
196
196
  # the start and end time offsets (timestamps) for those words. If
197
197
  # `false`, no word-level time offset information is returned. The default is
198
198
  # `false`.
199
199
  # @!attribute [rw] enable_word_confidence
200
- # @return [Boolean]
200
+ # @return [::Boolean]
201
201
  # If `true`, the top result includes a list of words and the
202
202
  # confidence for those words. If `false`, no word-level confidence
203
203
  # information is returned. The default is `false`.
204
204
  # @!attribute [rw] enable_automatic_punctuation
205
- # @return [Boolean]
205
+ # @return [::Boolean]
206
206
  # If 'true', adds punctuation to recognition result hypotheses.
207
207
  # This feature is only available in select languages. Setting this for
208
208
  # requests in other languages has no effect at all.
209
209
  # The default 'false' value does not add punctuation to result hypotheses.
210
210
  # @!attribute [rw] enable_speaker_diarization
211
- # @return [Boolean]
211
+ # @return [::Boolean]
212
212
  # If 'true', enables speaker detection for each recognized word in
213
213
  # the top alternative of the recognition result using a speaker_tag provided
214
214
  # in the WordInfo.
215
215
  # Note: Use diarization_config instead.
216
216
  # @!attribute [rw] diarization_speaker_count
217
- # @return [Integer]
217
+ # @return [::Integer]
218
218
  # If set, specifies the estimated number of speakers in the conversation.
219
219
  # Defaults to '2'. Ignored unless enable_speaker_diarization is set to true.
220
220
  # Note: Use diarization_config instead.
221
221
  # @!attribute [rw] diarization_config
222
- # @return [Google::Cloud::Speech::V1p1beta1::SpeakerDiarizationConfig]
222
+ # @return [::Google::Cloud::Speech::V1p1beta1::SpeakerDiarizationConfig]
223
223
  # Config to enable speaker diarization and set additional
224
224
  # parameters to make diarization better suited for your application.
225
225
  # Note: When this is enabled, we send all the words from the beginning of the
@@ -229,10 +229,10 @@ module Google
229
229
  # For non-streaming requests, the diarization results will be provided only
230
230
  # in the top alternative of the FINAL SpeechRecognitionResult.
231
231
  # @!attribute [rw] metadata
232
- # @return [Google::Cloud::Speech::V1p1beta1::RecognitionMetadata]
232
+ # @return [::Google::Cloud::Speech::V1p1beta1::RecognitionMetadata]
233
233
  # Metadata regarding this request.
234
234
  # @!attribute [rw] model
235
- # @return [String]
235
+ # @return [::String]
236
236
  # Which model to select for the given request. Select the model
237
237
  # best suited to your domain to get best results. If a model is not
238
238
  # explicitly specified, then we auto-select a model based on the parameters
@@ -266,7 +266,7 @@ module Google
266
266
  # </tr>
267
267
  # </table>
268
268
  # @!attribute [rw] use_enhanced
269
- # @return [Boolean]
269
+ # @return [::Boolean]
270
270
  # Set to true to use an enhanced model for speech recognition.
271
271
  # If `use_enhanced` is set to true and the `model` field is not set, then
272
272
  # an appropriate enhanced model is chosen if an enhanced model exists for
@@ -276,8 +276,8 @@ module Google
276
276
  # does not exist, then the speech is recognized using the standard version
277
277
  # of the specified model.
278
278
  class RecognitionConfig
279
- include Google::Protobuf::MessageExts
280
- extend Google::Protobuf::MessageExts::ClassMethods
279
+ include ::Google::Protobuf::MessageExts
280
+ extend ::Google::Protobuf::MessageExts::ClassMethods
281
281
 
282
282
  # The encoding of the audio data sent in the request.
283
283
  #
@@ -355,69 +355,69 @@ module Google
355
355
 
356
356
  # Config to enable speaker diarization.
357
357
  # @!attribute [rw] enable_speaker_diarization
358
- # @return [Boolean]
358
+ # @return [::Boolean]
359
359
  # If 'true', enables speaker detection for each recognized word in
360
360
  # the top alternative of the recognition result using a speaker_tag provided
361
361
  # in the WordInfo.
362
362
  # @!attribute [rw] min_speaker_count
363
- # @return [Integer]
363
+ # @return [::Integer]
364
364
  # Minimum number of speakers in the conversation. This range gives you more
365
365
  # flexibility by allowing the system to automatically determine the correct
366
366
  # number of speakers. If not set, the default value is 2.
367
367
  # @!attribute [rw] max_speaker_count
368
- # @return [Integer]
368
+ # @return [::Integer]
369
369
  # Maximum number of speakers in the conversation. This range gives you more
370
370
  # flexibility by allowing the system to automatically determine the correct
371
371
  # number of speakers. If not set, the default value is 6.
372
372
  # @!attribute [r] speaker_tag
373
- # @return [Integer]
373
+ # @return [::Integer]
374
374
  # Output only. Unused.
375
375
  class SpeakerDiarizationConfig
376
- include Google::Protobuf::MessageExts
377
- extend Google::Protobuf::MessageExts::ClassMethods
376
+ include ::Google::Protobuf::MessageExts
377
+ extend ::Google::Protobuf::MessageExts::ClassMethods
378
378
  end
379
379
 
380
380
  # Description of audio data to be recognized.
381
381
  # @!attribute [rw] interaction_type
382
- # @return [Google::Cloud::Speech::V1p1beta1::RecognitionMetadata::InteractionType]
382
+ # @return [::Google::Cloud::Speech::V1p1beta1::RecognitionMetadata::InteractionType]
383
383
  # The use case most closely describing the audio content to be recognized.
384
384
  # @!attribute [rw] industry_naics_code_of_audio
385
- # @return [Integer]
385
+ # @return [::Integer]
386
386
  # The industry vertical to which this speech recognition request most
387
387
  # closely applies. This is most indicative of the topics contained
388
388
  # in the audio. Use the 6-digit NAICS code to identify the industry
389
389
  # vertical - see https://www.naics.com/search/.
390
390
  # @!attribute [rw] microphone_distance
391
- # @return [Google::Cloud::Speech::V1p1beta1::RecognitionMetadata::MicrophoneDistance]
391
+ # @return [::Google::Cloud::Speech::V1p1beta1::RecognitionMetadata::MicrophoneDistance]
392
392
  # The audio type that most closely describes the audio being recognized.
393
393
  # @!attribute [rw] original_media_type
394
- # @return [Google::Cloud::Speech::V1p1beta1::RecognitionMetadata::OriginalMediaType]
394
+ # @return [::Google::Cloud::Speech::V1p1beta1::RecognitionMetadata::OriginalMediaType]
395
395
  # The original media the speech was recorded on.
396
396
  # @!attribute [rw] recording_device_type
397
- # @return [Google::Cloud::Speech::V1p1beta1::RecognitionMetadata::RecordingDeviceType]
397
+ # @return [::Google::Cloud::Speech::V1p1beta1::RecognitionMetadata::RecordingDeviceType]
398
398
  # The type of device the speech was recorded with.
399
399
  # @!attribute [rw] recording_device_name
400
- # @return [String]
400
+ # @return [::String]
401
401
  # The device used to make the recording. Examples 'Nexus 5X' or
402
402
  # 'Polycom SoundStation IP 6000' or 'POTS' or 'VoIP' or
403
403
  # 'Cardioid Microphone'.
404
404
  # @!attribute [rw] original_mime_type
405
- # @return [String]
405
+ # @return [::String]
406
406
  # Mime type of the original audio file. For example `audio/m4a`,
407
407
  # `audio/x-alaw-basic`, `audio/mp3`, `audio/3gpp`.
408
408
  # A list of possible audio mime types is maintained at
409
409
  # http://www.iana.org/assignments/media-types/media-types.xhtml#audio
410
410
  # @!attribute [rw] obfuscated_id
411
- # @return [Integer]
411
+ # @return [::Integer]
412
412
  # Obfuscated (privacy-protected) ID of the user, to identify number of
413
413
  # unique users using the service.
414
414
  # @!attribute [rw] audio_topic
415
- # @return [String]
415
+ # @return [::String]
416
416
  # Description of the content. Eg. "Recordings of federal supreme court
417
417
  # hearings from 2012".
418
418
  class RecognitionMetadata
419
- include Google::Protobuf::MessageExts
420
- extend Google::Protobuf::MessageExts::ClassMethods
419
+ include ::Google::Protobuf::MessageExts
420
+ extend ::Google::Protobuf::MessageExts::ClassMethods
421
421
 
422
422
  # Use case categories that the audio recognition request can be described
423
423
  # by.
@@ -514,7 +514,7 @@ module Google
514
514
  # Provides "hints" to the speech recognizer to favor specific words and phrases
515
515
  # in the results.
516
516
  # @!attribute [rw] phrases
517
- # @return [Array<String>]
517
+ # @return [::Array<::String>]
518
518
  # A list of strings containing words and phrases "hints" so that
519
519
  # the speech recognition is more likely to recognize them. This can be used
520
520
  # to improve the accuracy for specific words and phrases, for example, if
@@ -528,7 +528,7 @@ module Google
528
528
  # improves the likelihood of correctly transcribing audio that includes
529
529
  # months.
530
530
  # @!attribute [rw] boost
531
- # @return [Float]
531
+ # @return [::Float]
532
532
  # Hint Boost. Positive value will increase the probability that a specific
533
533
  # phrase will be recognized over other similar sounding phrases. The higher
534
534
  # the boost, the higher the chance of false positive recognition as well.
@@ -538,8 +538,8 @@ module Google
538
538
  # values between 0 and 20. We recommend using a binary search approach to
539
539
  # finding the optimal value for your use case.
540
540
  class SpeechContext
541
- include Google::Protobuf::MessageExts
542
- extend Google::Protobuf::MessageExts::ClassMethods
541
+ include ::Google::Protobuf::MessageExts
542
+ extend ::Google::Protobuf::MessageExts::ClassMethods
543
543
  end
544
544
 
545
545
  # Contains audio data in the encoding specified in the `RecognitionConfig`.
@@ -547,12 +547,12 @@ module Google
547
547
  # returns [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
548
548
  # See [content limits](https://cloud.google.com/speech-to-text/quotas#content).
549
549
  # @!attribute [rw] content
550
- # @return [String]
550
+ # @return [::String]
551
551
  # The audio data bytes encoded as specified in
552
552
  # `RecognitionConfig`. Note: as with all bytes fields, proto buffers use a
553
553
  # pure binary representation, whereas JSON representations use base64.
554
554
  # @!attribute [rw] uri
555
- # @return [String]
555
+ # @return [::String]
556
556
  # URI that points to a file that contains audio data bytes as specified in
557
557
  # `RecognitionConfig`. The file must not be compressed (for example, gzip).
558
558
  # Currently, only Google Cloud Storage URIs are
@@ -562,20 +562,20 @@ module Google
562
562
  # For more information, see [Request
563
563
  # URIs](https://cloud.google.com/storage/docs/reference-uris).
564
564
  class RecognitionAudio
565
- include Google::Protobuf::MessageExts
566
- extend Google::Protobuf::MessageExts::ClassMethods
565
+ include ::Google::Protobuf::MessageExts
566
+ extend ::Google::Protobuf::MessageExts::ClassMethods
567
567
  end
568
568
 
569
569
  # The only message returned to the client by the `Recognize` method. It
570
570
  # contains the result as zero or more sequential `SpeechRecognitionResult`
571
571
  # messages.
572
572
  # @!attribute [rw] results
573
- # @return [Array<Google::Cloud::Speech::V1p1beta1::SpeechRecognitionResult>]
573
+ # @return [::Array<::Google::Cloud::Speech::V1p1beta1::SpeechRecognitionResult>]
574
574
  # Sequential list of transcription results corresponding to
575
575
  # sequential portions of audio.
576
576
  class RecognizeResponse
577
- include Google::Protobuf::MessageExts
578
- extend Google::Protobuf::MessageExts::ClassMethods
577
+ include ::Google::Protobuf::MessageExts
578
+ extend ::Google::Protobuf::MessageExts::ClassMethods
579
579
  end
580
580
 
581
581
  # The only message returned to the client by the `LongRunningRecognize` method.
@@ -584,34 +584,34 @@ module Google
584
584
  # returned by the `GetOperation` call of the `google::longrunning::Operations`
585
585
  # service.
586
586
  # @!attribute [rw] results
587
- # @return [Array<Google::Cloud::Speech::V1p1beta1::SpeechRecognitionResult>]
587
+ # @return [::Array<::Google::Cloud::Speech::V1p1beta1::SpeechRecognitionResult>]
588
588
  # Sequential list of transcription results corresponding to
589
589
  # sequential portions of audio.
590
590
  class LongRunningRecognizeResponse
591
- include Google::Protobuf::MessageExts
592
- extend Google::Protobuf::MessageExts::ClassMethods
591
+ include ::Google::Protobuf::MessageExts
592
+ extend ::Google::Protobuf::MessageExts::ClassMethods
593
593
  end
594
594
 
595
595
  # Describes the progress of a long-running `LongRunningRecognize` call. It is
596
596
  # included in the `metadata` field of the `Operation` returned by the
597
597
  # `GetOperation` call of the `google::longrunning::Operations` service.
598
598
  # @!attribute [rw] progress_percent
599
- # @return [Integer]
599
+ # @return [::Integer]
600
600
  # Approximate percentage of audio processed thus far. Guaranteed to be 100
601
601
  # when the audio is fully processed and the results are available.
602
602
  # @!attribute [rw] start_time
603
- # @return [Google::Protobuf::Timestamp]
603
+ # @return [::Google::Protobuf::Timestamp]
604
604
  # Time when the request was received.
605
605
  # @!attribute [rw] last_update_time
606
- # @return [Google::Protobuf::Timestamp]
606
+ # @return [::Google::Protobuf::Timestamp]
607
607
  # Time of the most recent processing update.
608
608
  # @!attribute [r] uri
609
- # @return [String]
609
+ # @return [::String]
610
610
  # The URI of the audio file being transcribed. Empty if the audio was sent
611
611
  # as byte content.
612
612
  class LongRunningRecognizeMetadata
613
- include Google::Protobuf::MessageExts
614
- extend Google::Protobuf::MessageExts::ClassMethods
613
+ include ::Google::Protobuf::MessageExts
614
+ extend ::Google::Protobuf::MessageExts::ClassMethods
615
615
  end
616
616
 
617
617
  # `StreamingRecognizeResponse` is the only message returned to the client by
@@ -664,21 +664,21 @@ module Google
664
664
  # `speech_event_type`, or
665
665
  # one or more (repeated) `results`.
666
666
  # @!attribute [rw] error
667
- # @return [Google::Rpc::Status]
668
- # If set, returns a {Google::Rpc::Status google.rpc.Status} message that
667
+ # @return [::Google::Rpc::Status]
668
+ # If set, returns a {::Google::Rpc::Status google.rpc.Status} message that
669
669
  # specifies the error for the operation.
670
670
  # @!attribute [rw] results
671
- # @return [Array<Google::Cloud::Speech::V1p1beta1::StreamingRecognitionResult>]
671
+ # @return [::Array<::Google::Cloud::Speech::V1p1beta1::StreamingRecognitionResult>]
672
672
  # This repeated list contains zero or more results that
673
673
  # correspond to consecutive portions of the audio currently being processed.
674
674
  # It contains zero or one `is_final=true` result (the newly settled portion),
675
675
  # followed by zero or more `is_final=false` results (the interim results).
676
676
  # @!attribute [rw] speech_event_type
677
- # @return [Google::Cloud::Speech::V1p1beta1::StreamingRecognizeResponse::SpeechEventType]
677
+ # @return [::Google::Cloud::Speech::V1p1beta1::StreamingRecognizeResponse::SpeechEventType]
678
678
  # Indicates the type of speech event.
679
679
  class StreamingRecognizeResponse
680
- include Google::Protobuf::MessageExts
681
- extend Google::Protobuf::MessageExts::ClassMethods
680
+ include ::Google::Protobuf::MessageExts
681
+ extend ::Google::Protobuf::MessageExts::ClassMethods
682
682
 
683
683
  # Indicates the type of speech event.
684
684
  module SpeechEventType
@@ -699,72 +699,72 @@ module Google
699
699
  # A streaming speech recognition result corresponding to a portion of the audio
700
700
  # that is currently being processed.
701
701
  # @!attribute [rw] alternatives
702
- # @return [Array<Google::Cloud::Speech::V1p1beta1::SpeechRecognitionAlternative>]
702
+ # @return [::Array<::Google::Cloud::Speech::V1p1beta1::SpeechRecognitionAlternative>]
703
703
  # May contain one or more recognition hypotheses (up to the
704
704
  # maximum specified in `max_alternatives`).
705
705
  # These alternatives are ordered in terms of accuracy, with the top (first)
706
706
  # alternative being the most probable, as ranked by the recognizer.
707
707
  # @!attribute [rw] is_final
708
- # @return [Boolean]
708
+ # @return [::Boolean]
709
709
  # If `false`, this `StreamingRecognitionResult` represents an
710
710
  # interim result that may change. If `true`, this is the final time the
711
711
  # speech service will return this particular `StreamingRecognitionResult`,
712
712
  # the recognizer will not return any further hypotheses for this portion of
713
713
  # the transcript and corresponding audio.
714
714
  # @!attribute [rw] stability
715
- # @return [Float]
715
+ # @return [::Float]
716
716
  # An estimate of the likelihood that the recognizer will not
717
717
  # change its guess about this interim result. Values range from 0.0
718
718
  # (completely unstable) to 1.0 (completely stable).
719
719
  # This field is only provided for interim results (`is_final=false`).
720
720
  # The default of 0.0 is a sentinel value indicating `stability` was not set.
721
721
  # @!attribute [rw] result_end_time
722
- # @return [Google::Protobuf::Duration]
722
+ # @return [::Google::Protobuf::Duration]
723
723
  # Time offset of the end of this result relative to the
724
724
  # beginning of the audio.
725
725
  # @!attribute [rw] channel_tag
726
- # @return [Integer]
726
+ # @return [::Integer]
727
727
  # For multi-channel audio, this is the channel number corresponding to the
728
728
  # recognized result for the audio from that channel.
729
729
  # For audio_channel_count = N, its output values can range from '1' to 'N'.
730
730
  # @!attribute [r] language_code
731
- # @return [String]
731
+ # @return [::String]
732
732
  # Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
733
733
  # language tag of the language in this result. This language code was
734
734
  # detected to have the most likelihood of being spoken in the audio.
735
735
  class StreamingRecognitionResult
736
- include Google::Protobuf::MessageExts
737
- extend Google::Protobuf::MessageExts::ClassMethods
736
+ include ::Google::Protobuf::MessageExts
737
+ extend ::Google::Protobuf::MessageExts::ClassMethods
738
738
  end
739
739
 
740
740
  # A speech recognition result corresponding to a portion of the audio.
741
741
  # @!attribute [rw] alternatives
742
- # @return [Array<Google::Cloud::Speech::V1p1beta1::SpeechRecognitionAlternative>]
742
+ # @return [::Array<::Google::Cloud::Speech::V1p1beta1::SpeechRecognitionAlternative>]
743
743
  # May contain one or more recognition hypotheses (up to the
744
744
  # maximum specified in `max_alternatives`).
745
745
  # These alternatives are ordered in terms of accuracy, with the top (first)
746
746
  # alternative being the most probable, as ranked by the recognizer.
747
747
  # @!attribute [rw] channel_tag
748
- # @return [Integer]
748
+ # @return [::Integer]
749
749
  # For multi-channel audio, this is the channel number corresponding to the
750
750
  # recognized result for the audio from that channel.
751
751
  # For audio_channel_count = N, its output values can range from '1' to 'N'.
752
752
  # @!attribute [r] language_code
753
- # @return [String]
753
+ # @return [::String]
754
754
  # Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
755
755
  # language tag of the language in this result. This language code was
756
756
  # detected to have the most likelihood of being spoken in the audio.
757
757
  class SpeechRecognitionResult
758
- include Google::Protobuf::MessageExts
759
- extend Google::Protobuf::MessageExts::ClassMethods
758
+ include ::Google::Protobuf::MessageExts
759
+ extend ::Google::Protobuf::MessageExts::ClassMethods
760
760
  end
761
761
 
762
762
  # Alternative hypotheses (a.k.a. n-best list).
763
763
  # @!attribute [rw] transcript
764
- # @return [String]
764
+ # @return [::String]
765
765
  # Transcript text representing the words that the user spoke.
766
766
  # @!attribute [rw] confidence
767
- # @return [Float]
767
+ # @return [::Float]
768
768
  # The confidence estimate between 0.0 and 1.0. A higher number
769
769
  # indicates an estimated greater likelihood that the recognized words are
770
770
  # correct. This field is set only for the top alternative of a non-streaming
@@ -773,18 +773,18 @@ module Google
773
773
  # to be always provided.
774
774
  # The default of 0.0 is a sentinel value indicating `confidence` was not set.
775
775
  # @!attribute [rw] words
776
- # @return [Array<Google::Cloud::Speech::V1p1beta1::WordInfo>]
776
+ # @return [::Array<::Google::Cloud::Speech::V1p1beta1::WordInfo>]
777
777
  # A list of word-specific information for each recognized word.
778
778
  # Note: When `enable_speaker_diarization` is true, you will see all the words
779
779
  # from the beginning of the audio.
780
780
  class SpeechRecognitionAlternative
781
- include Google::Protobuf::MessageExts
782
- extend Google::Protobuf::MessageExts::ClassMethods
781
+ include ::Google::Protobuf::MessageExts
782
+ extend ::Google::Protobuf::MessageExts::ClassMethods
783
783
  end
784
784
 
785
785
  # Word-specific information for recognized words.
786
786
  # @!attribute [rw] start_time
787
- # @return [Google::Protobuf::Duration]
787
+ # @return [::Google::Protobuf::Duration]
788
788
  # Time offset relative to the beginning of the audio,
789
789
  # and corresponding to the start of the spoken word.
790
790
  # This field is only set if `enable_word_time_offsets=true` and only
@@ -792,7 +792,7 @@ module Google
792
792
  # This is an experimental feature and the accuracy of the time offset can
793
793
  # vary.
794
794
  # @!attribute [rw] end_time
795
- # @return [Google::Protobuf::Duration]
795
+ # @return [::Google::Protobuf::Duration]
796
796
  # Time offset relative to the beginning of the audio,
797
797
  # and corresponding to the end of the spoken word.
798
798
  # This field is only set if `enable_word_time_offsets=true` and only
@@ -800,10 +800,10 @@ module Google
800
800
  # This is an experimental feature and the accuracy of the time offset can
801
801
  # vary.
802
802
  # @!attribute [rw] word
803
- # @return [String]
803
+ # @return [::String]
804
804
  # The word corresponding to this set of information.
805
805
  # @!attribute [rw] confidence
806
- # @return [Float]
806
+ # @return [::Float]
807
807
  # The confidence estimate between 0.0 and 1.0. A higher number
808
808
  # indicates an estimated greater likelihood that the recognized words are
809
809
  # correct. This field is set only for the top alternative of a non-streaming
@@ -812,15 +812,15 @@ module Google
812
812
  # to be always provided.
813
813
  # The default of 0.0 is a sentinel value indicating `confidence` was not set.
814
814
  # @!attribute [r] speaker_tag
815
- # @return [Integer]
815
+ # @return [::Integer]
816
816
  # Output only. A distinct integer value is assigned for every speaker within
817
817
  # the audio. This field specifies which one of those speakers was detected to
818
818
  # have spoken this word. Value ranges from '1' to diarization_speaker_count.
819
819
  # speaker_tag is set if enable_speaker_diarization = 'true' and only in the
820
820
  # top alternative.
821
821
  class WordInfo
822
- include Google::Protobuf::MessageExts
823
- extend Google::Protobuf::MessageExts::ClassMethods
822
+ include ::Google::Protobuf::MessageExts
823
+ extend ::Google::Protobuf::MessageExts::ClassMethods
824
824
  end
825
825
  end
826
826
  end