aws-sdk-transcribestreamingservice 1.10.0 → 1.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/aws-sdk-transcribestreamingservice.rb +7 -4
- data/lib/aws-sdk-transcribestreamingservice/async_client.rb +84 -11
- data/lib/aws-sdk-transcribestreamingservice/client.rb +68 -14
- data/lib/aws-sdk-transcribestreamingservice/client_api.rb +13 -0
- data/lib/aws-sdk-transcribestreamingservice/errors.rb +22 -0
- data/lib/aws-sdk-transcribestreamingservice/event_streams.rb +5 -0
- data/lib/aws-sdk-transcribestreamingservice/resource.rb +1 -0
- data/lib/aws-sdk-transcribestreamingservice/types.rb +55 -5
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 4b85b364b036d713dd14ca91ebfc8652c78a028505c69ff71f68e4dbef43fd33
|
4
|
+
data.tar.gz: 768de24cbb18579513f9ece76487647e0d3a9cb5ee915052cd3923a8cc0e2431
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 356b3671f45c94df0653b77b991b24a83b138f2085ca8e9097368e956808df68af8281b112b02fe7d0f320ac1f8f0e1efb46933a1c68eecdb29b3382d97bb19b
|
7
|
+
data.tar.gz: 11e61d542d875edb85fa8568f368adcffdc48f0ee71e8f424a5b129214397578b0861015ade55876b2485e74e4c4068718fc9d3f5823bb5f6250d98443884523
|
@@ -26,17 +26,20 @@ require_relative 'aws-sdk-transcribestreamingservice/event_streams'
|
|
26
26
|
# methods each accept a hash of request parameters and return a response
|
27
27
|
# structure.
|
28
28
|
#
|
29
|
+
# transcribe_streaming_service = Aws::TranscribeStreamingService::Client.new
|
30
|
+
# resp = transcribe_streaming_service.start_stream_transcription(params)
|
31
|
+
#
|
29
32
|
# See {Client} for more information.
|
30
33
|
#
|
31
34
|
# # Errors
|
32
35
|
#
|
33
|
-
# Errors returned from Amazon Transcribe Streaming Service
|
34
|
-
# extend {Errors::ServiceError}.
|
36
|
+
# Errors returned from Amazon Transcribe Streaming Service are defined in the
|
37
|
+
# {Errors} module and all extend {Errors::ServiceError}.
|
35
38
|
#
|
36
39
|
# begin
|
37
40
|
# # do stuff
|
38
41
|
# rescue Aws::TranscribeStreamingService::Errors::ServiceError
|
39
|
-
# # rescues all
|
42
|
+
# # rescues all Amazon Transcribe Streaming Service API errors
|
40
43
|
# end
|
41
44
|
#
|
42
45
|
# See {Errors} for more information.
|
@@ -44,6 +47,6 @@ require_relative 'aws-sdk-transcribestreamingservice/event_streams'
|
|
44
47
|
# @service
|
45
48
|
module Aws::TranscribeStreamingService
|
46
49
|
|
47
|
-
GEM_VERSION = '1.
|
50
|
+
GEM_VERSION = '1.15.0'
|
48
51
|
|
49
52
|
end
|
@@ -88,7 +88,7 @@ module Aws::TranscribeStreamingService
|
|
88
88
|
# @option options [required, String] :region
|
89
89
|
# The AWS region to connect to. The configured `:region` is
|
90
90
|
# used to determine the service `:endpoint`. When not passed,
|
91
|
-
# a default `:region` is
|
91
|
+
# a default `:region` is searched for in the following locations:
|
92
92
|
#
|
93
93
|
# * `Aws.config[:region]`
|
94
94
|
# * `ENV['AWS_REGION']`
|
@@ -99,14 +99,24 @@ module Aws::TranscribeStreamingService
|
|
99
99
|
#
|
100
100
|
# @option options [String] :access_key_id
|
101
101
|
#
|
102
|
+
# @option options [Boolean] :adaptive_retry_wait_to_fill (true)
|
103
|
+
# Used only in `adaptive` retry mode. When true, the request will sleep
|
104
|
+
# until there is sufficent client side capacity to retry the request.
|
105
|
+
# When false, the request will raise a `RetryCapacityNotAvailableError` and will
|
106
|
+
# not retry instead of sleeping.
|
107
|
+
#
|
102
108
|
# @option options [Boolean] :convert_params (true)
|
103
109
|
# When `true`, an attempt is made to coerce request parameters into
|
104
110
|
# the required types.
|
105
111
|
#
|
112
|
+
# @option options [Boolean] :correct_clock_skew (true)
|
113
|
+
# Used only in `standard` and adaptive retry modes. Specifies whether to apply
|
114
|
+
# a clock skew correction and retry requests with skewed client clocks.
|
115
|
+
#
|
106
116
|
# @option options [String] :endpoint
|
107
117
|
# The client endpoint is normally constructed from the `:region`
|
108
118
|
# option. You should only configure an `:endpoint` when connecting
|
109
|
-
# to test endpoints. This should be
|
119
|
+
# to test endpoints. This should be a valid HTTP(S) URI.
|
110
120
|
#
|
111
121
|
# @option options [Proc] :event_stream_handler
|
112
122
|
# When an EventStream or Proc object is provided, it will be used as callback for each chunk of event stream response received along the way.
|
@@ -124,6 +134,12 @@ module Aws::TranscribeStreamingService
|
|
124
134
|
# The Logger instance to send log messages to. If this option
|
125
135
|
# is not set, logging will be disabled.
|
126
136
|
#
|
137
|
+
# @option options [Integer] :max_attempts (3)
|
138
|
+
# An integer representing the maximum number attempts that will be made for
|
139
|
+
# a single request, including the initial attempt. For example,
|
140
|
+
# setting this value to 5 will result in a request being retried up to
|
141
|
+
# 4 times. Used in `standard` and `adaptive` retry modes.
|
142
|
+
#
|
127
143
|
# @option options [Proc] :output_event_stream_handler
|
128
144
|
# When an EventStream or Proc object is provided, it will be used as callback for each chunk of event stream response received along the way.
|
129
145
|
#
|
@@ -131,11 +147,19 @@ module Aws::TranscribeStreamingService
|
|
131
147
|
# Used when loading credentials from the shared credentials file
|
132
148
|
# at HOME/.aws/credentials. When not specified, 'default' is used.
|
133
149
|
#
|
150
|
+
# @option options [Proc] :retry_backoff
|
151
|
+
# A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
|
152
|
+
# This option is only used in the `legacy` retry mode.
|
153
|
+
#
|
134
154
|
# @option options [Float] :retry_base_delay (0.3)
|
135
|
-
# The base delay in seconds used by the default backoff function.
|
155
|
+
# The base delay in seconds used by the default backoff function. This option
|
156
|
+
# is only used in the `legacy` retry mode.
|
136
157
|
#
|
137
158
|
# @option options [Symbol] :retry_jitter (:none)
|
138
|
-
# A delay randomiser function used by the default backoff function.
|
159
|
+
# A delay randomiser function used by the default backoff function.
|
160
|
+
# Some predefined functions can be referenced by name - :none, :equal, :full,
|
161
|
+
# otherwise a Proc that takes and returns a number. This option is only used
|
162
|
+
# in the `legacy` retry mode.
|
139
163
|
#
|
140
164
|
# @see https://www.awsarchitectureblog.com/2015/03/backoff.html
|
141
165
|
#
|
@@ -143,11 +167,30 @@ module Aws::TranscribeStreamingService
|
|
143
167
|
# The maximum number of times to retry failed requests. Only
|
144
168
|
# ~ 500 level server errors and certain ~ 400 level client errors
|
145
169
|
# are retried. Generally, these are throttling errors, data
|
146
|
-
# checksum errors, networking errors, timeout errors
|
147
|
-
# errors from expired credentials.
|
170
|
+
# checksum errors, networking errors, timeout errors, auth errors,
|
171
|
+
# endpoint discovery, and errors from expired credentials.
|
172
|
+
# This option is only used in the `legacy` retry mode.
|
148
173
|
#
|
149
174
|
# @option options [Integer] :retry_max_delay (0)
|
150
|
-
# The maximum number of seconds to delay between retries (0 for no limit)
|
175
|
+
# The maximum number of seconds to delay between retries (0 for no limit)
|
176
|
+
# used by the default backoff function. This option is only used in the
|
177
|
+
# `legacy` retry mode.
|
178
|
+
#
|
179
|
+
# @option options [String] :retry_mode ("legacy")
|
180
|
+
# Specifies which retry algorithm to use. Values are:
|
181
|
+
#
|
182
|
+
# * `legacy` - The pre-existing retry behavior. This is default value if
|
183
|
+
# no retry mode is provided.
|
184
|
+
#
|
185
|
+
# * `standard` - A standardized set of retry rules across the AWS SDKs.
|
186
|
+
# This includes support for retry quotas, which limit the number of
|
187
|
+
# unsuccessful retries a client can make.
|
188
|
+
#
|
189
|
+
# * `adaptive` - An experimental retry mode that includes all the
|
190
|
+
# functionality of `standard` mode along with automatic client side
|
191
|
+
# throttling. This is a provisional mode that may change behavior
|
192
|
+
# in the future.
|
193
|
+
#
|
151
194
|
#
|
152
195
|
# @option options [String] :secret_access_key
|
153
196
|
#
|
@@ -209,6 +252,19 @@ module Aws::TranscribeStreamingService
|
|
209
252
|
# Amazon Transcribe will generate one for you and return it in the
|
210
253
|
# response.
|
211
254
|
#
|
255
|
+
# @option params [String] :vocabulary_filter_name
|
256
|
+
# The name of the vocabulary filter you've created that is unique to
|
257
|
+
# your AWS accountf. Provide the name in this field to successfully use
|
258
|
+
# it in a stream.
|
259
|
+
#
|
260
|
+
# @option params [String] :vocabulary_filter_method
|
261
|
+
# The manner in which you use your vocabulary filter to filter words in
|
262
|
+
# your transcript. `Remove` removes filtered words from your
|
263
|
+
# transcription results. `Mask` masks those words with a `***` in your
|
264
|
+
# transcription results. `Tag` keeps the filtered words in your
|
265
|
+
# transcription results and tags them. The tag appears as
|
266
|
+
# `VocabularyFilterMatch` equal to `True`
|
267
|
+
#
|
212
268
|
# @return [Types::StartStreamTranscriptionResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
213
269
|
#
|
214
270
|
# * {Types::StartStreamTranscriptionResponse#request_id #request_id} => String
|
@@ -218,6 +274,8 @@ module Aws::TranscribeStreamingService
|
|
218
274
|
# * {Types::StartStreamTranscriptionResponse#vocabulary_name #vocabulary_name} => String
|
219
275
|
# * {Types::StartStreamTranscriptionResponse#session_id #session_id} => String
|
220
276
|
# * {Types::StartStreamTranscriptionResponse#transcript_result_stream #transcript_result_stream} => Types::TranscriptResultStream
|
277
|
+
# * {Types::StartStreamTranscriptionResponse#vocabulary_filter_name #vocabulary_filter_name} => String
|
278
|
+
# * {Types::StartStreamTranscriptionResponse#vocabulary_filter_method #vocabulary_filter_method} => String
|
221
279
|
#
|
222
280
|
# @example Bi-directional EventStream Operation Example
|
223
281
|
#
|
@@ -249,6 +307,9 @@ module Aws::TranscribeStreamingService
|
|
249
307
|
# out_stream.on_conflict_exception_event do |event|
|
250
308
|
# event # => Aws::TranscribeStreamingService::Types::ConflictException
|
251
309
|
# end
|
310
|
+
# out_stream.on_service_unavailable_exception_event do |event|
|
311
|
+
# event # => Aws::TranscribeStreamingService::Types::ServiceUnavailableException
|
312
|
+
# end
|
252
313
|
#
|
253
314
|
# end
|
254
315
|
# # => returns Aws::Seahorse::Client::AsyncResponse
|
@@ -284,6 +345,9 @@ module Aws::TranscribeStreamingService
|
|
284
345
|
# output_stream.on_conflict_exception_event do |event|
|
285
346
|
# event # => Aws::TranscribeStreamingService::Types::ConflictException
|
286
347
|
# end
|
348
|
+
# output_stream.on_service_unavailable_exception_event do |event|
|
349
|
+
# event # => Aws::TranscribeStreamingService::Types::ServiceUnavailableException
|
350
|
+
# end
|
287
351
|
# output_stream.on_error_event do |event|
|
288
352
|
# # catch unmodeled error event in the stream
|
289
353
|
# raise event
|
@@ -314,6 +378,8 @@ module Aws::TranscribeStreamingService
|
|
314
378
|
# vocabulary_name: "VocabularyName",
|
315
379
|
# session_id: "SessionId",
|
316
380
|
# input_event_stream_hander: EventStreams::AudioStream.new,
|
381
|
+
# vocabulary_filter_name: "VocabularyFilterName",
|
382
|
+
# vocabulary_filter_method: "remove", # accepts remove, mask, tag
|
317
383
|
# })
|
318
384
|
# # => Seahorse::Client::AsyncResponse
|
319
385
|
# async_resp.wait
|
@@ -330,7 +396,7 @@ module Aws::TranscribeStreamingService
|
|
330
396
|
# resp.session_id #=> String
|
331
397
|
# All events are available at resp.transcript_result_stream:
|
332
398
|
# resp.transcript_result_stream #=> Enumerator
|
333
|
-
# resp.transcript_result_stream.event_types #=> [:transcript_event, :bad_request_exception, :limit_exceeded_exception, :internal_failure_exception, :conflict_exception]
|
399
|
+
# resp.transcript_result_stream.event_types #=> [:transcript_event, :bad_request_exception, :limit_exceeded_exception, :internal_failure_exception, :conflict_exception, :service_unavailable_exception]
|
334
400
|
#
|
335
401
|
# For :transcript_event event available at #on_transcript_event_event callback and response eventstream enumerator:
|
336
402
|
# event.transcript.results #=> Array
|
@@ -345,6 +411,7 @@ module Aws::TranscribeStreamingService
|
|
345
411
|
# event.transcript.results[0].alternatives[0].items[0].end_time #=> Float
|
346
412
|
# event.transcript.results[0].alternatives[0].items[0].type #=> String, one of "pronunciation", "punctuation"
|
347
413
|
# event.transcript.results[0].alternatives[0].items[0].content #=> String
|
414
|
+
# event.transcript.results[0].alternatives[0].items[0].vocabulary_filter_match #=> Boolean
|
348
415
|
#
|
349
416
|
# For :bad_request_exception event available at #on_bad_request_exception_event callback and response eventstream enumerator:
|
350
417
|
# event.message #=> String
|
@@ -358,6 +425,12 @@ module Aws::TranscribeStreamingService
|
|
358
425
|
# For :conflict_exception event available at #on_conflict_exception_event callback and response eventstream enumerator:
|
359
426
|
# event.message #=> String
|
360
427
|
#
|
428
|
+
# For :service_unavailable_exception event available at #on_service_unavailable_exception_event callback and response eventstream enumerator:
|
429
|
+
# event.message #=> String
|
430
|
+
#
|
431
|
+
# resp.vocabulary_filter_name #=> String
|
432
|
+
# resp.vocabulary_filter_method #=> String, one of "remove", "mask", "tag"
|
433
|
+
#
|
361
434
|
# @see http://docs.aws.amazon.com/goto/WebAPI/transcribe-streaming-2017-10-26/StartStreamTranscription AWS API Documentation
|
362
435
|
#
|
363
436
|
# @overload start_stream_transcription(params = {})
|
@@ -401,7 +474,7 @@ module Aws::TranscribeStreamingService
|
|
401
474
|
http_response: Seahorse::Client::Http::AsyncResponse.new,
|
402
475
|
config: config)
|
403
476
|
context[:gem_name] = 'aws-sdk-transcribestreamingservice'
|
404
|
-
context[:gem_version] = '1.
|
477
|
+
context[:gem_version] = '1.15.0'
|
405
478
|
Seahorse::Client::Request.new(handlers, context)
|
406
479
|
end
|
407
480
|
|
@@ -414,8 +487,8 @@ module Aws::TranscribeStreamingService
|
|
414
487
|
when nil then event_stream_class.new
|
415
488
|
else
|
416
489
|
msg = "expected #{type}_event_stream_handler to be a block or "\
|
417
|
-
|
418
|
-
|
490
|
+
"instance of Aws::TranscribeStreamingService::#{event_stream_class}"\
|
491
|
+
", got `#{handler.inspect}` instead"
|
419
492
|
raise ArgumentError, msg
|
420
493
|
end
|
421
494
|
end
|
@@ -31,6 +31,18 @@ require 'aws-sdk-core/plugins/event_stream_configuration.rb'
|
|
31
31
|
Aws::Plugins::GlobalConfiguration.add_identifier(:transcribestreamingservice)
|
32
32
|
|
33
33
|
module Aws::TranscribeStreamingService
|
34
|
+
# An API client for TranscribeStreamingService. To construct a client, you need to configure a `:region` and `:credentials`.
|
35
|
+
#
|
36
|
+
# client = Aws::TranscribeStreamingService::Client.new(
|
37
|
+
# region: region_name,
|
38
|
+
# credentials: credentials,
|
39
|
+
# # ...
|
40
|
+
# )
|
41
|
+
#
|
42
|
+
# For details on configuring region and credentials see
|
43
|
+
# the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
|
44
|
+
#
|
45
|
+
# See {#initialize} for a full list of supported configuration options.
|
34
46
|
class Client < Seahorse::Client::Base
|
35
47
|
|
36
48
|
include Aws::ClientStubs
|
@@ -95,7 +107,7 @@ module Aws::TranscribeStreamingService
|
|
95
107
|
# @option options [required, String] :region
|
96
108
|
# The AWS region to connect to. The configured `:region` is
|
97
109
|
# used to determine the service `:endpoint`. When not passed,
|
98
|
-
# a default `:region` is
|
110
|
+
# a default `:region` is searched for in the following locations:
|
99
111
|
#
|
100
112
|
# * `Aws.config[:region]`
|
101
113
|
# * `ENV['AWS_REGION']`
|
@@ -110,6 +122,12 @@ module Aws::TranscribeStreamingService
|
|
110
122
|
# When set to `true`, a thread polling for endpoints will be running in
|
111
123
|
# the background every 60 secs (default). Defaults to `false`.
|
112
124
|
#
|
125
|
+
# @option options [Boolean] :adaptive_retry_wait_to_fill (true)
|
126
|
+
# Used only in `adaptive` retry mode. When true, the request will sleep
|
127
|
+
# until there is sufficent client side capacity to retry the request.
|
128
|
+
# When false, the request will raise a `RetryCapacityNotAvailableError` and will
|
129
|
+
# not retry instead of sleeping.
|
130
|
+
#
|
113
131
|
# @option options [Boolean] :client_side_monitoring (false)
|
114
132
|
# When `true`, client-side metrics will be collected for all API requests from
|
115
133
|
# this client.
|
@@ -134,6 +152,10 @@ module Aws::TranscribeStreamingService
|
|
134
152
|
# When `true`, an attempt is made to coerce request parameters into
|
135
153
|
# the required types.
|
136
154
|
#
|
155
|
+
# @option options [Boolean] :correct_clock_skew (true)
|
156
|
+
# Used only in `standard` and adaptive retry modes. Specifies whether to apply
|
157
|
+
# a clock skew correction and retry requests with skewed client clocks.
|
158
|
+
#
|
137
159
|
# @option options [Boolean] :disable_host_prefix_injection (false)
|
138
160
|
# Set to true to disable SDK automatically adding host prefix
|
139
161
|
# to default service endpoint when available.
|
@@ -141,7 +163,7 @@ module Aws::TranscribeStreamingService
|
|
141
163
|
# @option options [String] :endpoint
|
142
164
|
# The client endpoint is normally constructed from the `:region`
|
143
165
|
# option. You should only configure an `:endpoint` when connecting
|
144
|
-
# to test endpoints. This should be
|
166
|
+
# to test endpoints. This should be a valid HTTP(S) URI.
|
145
167
|
#
|
146
168
|
# @option options [Integer] :endpoint_cache_max_entries (1000)
|
147
169
|
# Used for the maximum size limit of the LRU cache storing endpoints data
|
@@ -156,7 +178,7 @@ module Aws::TranscribeStreamingService
|
|
156
178
|
# requests fetching endpoints information. Defaults to 60 sec.
|
157
179
|
#
|
158
180
|
# @option options [Boolean] :endpoint_discovery (false)
|
159
|
-
# When set to `true`, endpoint discovery will be enabled for operations when available.
|
181
|
+
# When set to `true`, endpoint discovery will be enabled for operations when available.
|
160
182
|
#
|
161
183
|
# @option options [Proc] :event_stream_handler
|
162
184
|
# When an EventStream or Proc object is provided, it will be used as callback for each chunk of event stream response received along the way.
|
@@ -174,6 +196,12 @@ module Aws::TranscribeStreamingService
|
|
174
196
|
# The Logger instance to send log messages to. If this option
|
175
197
|
# is not set, logging will be disabled.
|
176
198
|
#
|
199
|
+
# @option options [Integer] :max_attempts (3)
|
200
|
+
# An integer representing the maximum number attempts that will be made for
|
201
|
+
# a single request, including the initial attempt. For example,
|
202
|
+
# setting this value to 5 will result in a request being retried up to
|
203
|
+
# 4 times. Used in `standard` and `adaptive` retry modes.
|
204
|
+
#
|
177
205
|
# @option options [Proc] :output_event_stream_handler
|
178
206
|
# When an EventStream or Proc object is provided, it will be used as callback for each chunk of event stream response received along the way.
|
179
207
|
#
|
@@ -181,11 +209,19 @@ module Aws::TranscribeStreamingService
|
|
181
209
|
# Used when loading credentials from the shared credentials file
|
182
210
|
# at HOME/.aws/credentials. When not specified, 'default' is used.
|
183
211
|
#
|
212
|
+
# @option options [Proc] :retry_backoff
|
213
|
+
# A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
|
214
|
+
# This option is only used in the `legacy` retry mode.
|
215
|
+
#
|
184
216
|
# @option options [Float] :retry_base_delay (0.3)
|
185
|
-
# The base delay in seconds used by the default backoff function.
|
217
|
+
# The base delay in seconds used by the default backoff function. This option
|
218
|
+
# is only used in the `legacy` retry mode.
|
186
219
|
#
|
187
220
|
# @option options [Symbol] :retry_jitter (:none)
|
188
|
-
# A delay randomiser function used by the default backoff function.
|
221
|
+
# A delay randomiser function used by the default backoff function.
|
222
|
+
# Some predefined functions can be referenced by name - :none, :equal, :full,
|
223
|
+
# otherwise a Proc that takes and returns a number. This option is only used
|
224
|
+
# in the `legacy` retry mode.
|
189
225
|
#
|
190
226
|
# @see https://www.awsarchitectureblog.com/2015/03/backoff.html
|
191
227
|
#
|
@@ -193,11 +229,30 @@ module Aws::TranscribeStreamingService
|
|
193
229
|
# The maximum number of times to retry failed requests. Only
|
194
230
|
# ~ 500 level server errors and certain ~ 400 level client errors
|
195
231
|
# are retried. Generally, these are throttling errors, data
|
196
|
-
# checksum errors, networking errors, timeout errors
|
197
|
-
# errors from expired credentials.
|
232
|
+
# checksum errors, networking errors, timeout errors, auth errors,
|
233
|
+
# endpoint discovery, and errors from expired credentials.
|
234
|
+
# This option is only used in the `legacy` retry mode.
|
198
235
|
#
|
199
236
|
# @option options [Integer] :retry_max_delay (0)
|
200
|
-
# The maximum number of seconds to delay between retries (0 for no limit)
|
237
|
+
# The maximum number of seconds to delay between retries (0 for no limit)
|
238
|
+
# used by the default backoff function. This option is only used in the
|
239
|
+
# `legacy` retry mode.
|
240
|
+
#
|
241
|
+
# @option options [String] :retry_mode ("legacy")
|
242
|
+
# Specifies which retry algorithm to use. Values are:
|
243
|
+
#
|
244
|
+
# * `legacy` - The pre-existing retry behavior. This is default value if
|
245
|
+
# no retry mode is provided.
|
246
|
+
#
|
247
|
+
# * `standard` - A standardized set of retry rules across the AWS SDKs.
|
248
|
+
# This includes support for retry quotas, which limit the number of
|
249
|
+
# unsuccessful retries a client can make.
|
250
|
+
#
|
251
|
+
# * `adaptive` - An experimental retry mode that includes all the
|
252
|
+
# functionality of `standard` mode along with automatic client side
|
253
|
+
# throttling. This is a provisional mode that may change behavior
|
254
|
+
# in the future.
|
255
|
+
#
|
201
256
|
#
|
202
257
|
# @option options [String] :secret_access_key
|
203
258
|
#
|
@@ -220,16 +275,15 @@ module Aws::TranscribeStreamingService
|
|
220
275
|
# requests through. Formatted like 'http://proxy.com:123'.
|
221
276
|
#
|
222
277
|
# @option options [Float] :http_open_timeout (15) The number of
|
223
|
-
# seconds to wait when opening a HTTP session before
|
278
|
+
# seconds to wait when opening a HTTP session before raising a
|
224
279
|
# `Timeout::Error`.
|
225
280
|
#
|
226
281
|
# @option options [Integer] :http_read_timeout (60) The default
|
227
282
|
# number of seconds to wait for response data. This value can
|
228
|
-
# safely be set
|
229
|
-
# per-request on the session yeidled by {#session_for}.
|
283
|
+
# safely be set per-request on the session.
|
230
284
|
#
|
231
285
|
# @option options [Float] :http_idle_timeout (5) The number of
|
232
|
-
# seconds a connection is allowed to sit
|
286
|
+
# seconds a connection is allowed to sit idle before it is
|
233
287
|
# considered stale. Stale connections are closed and removed
|
234
288
|
# from the pool before making a request.
|
235
289
|
#
|
@@ -238,7 +292,7 @@ module Aws::TranscribeStreamingService
|
|
238
292
|
# request body. This option has no effect unless the request has
|
239
293
|
# "Expect" header set to "100-continue". Defaults to `nil` which
|
240
294
|
# disables this behaviour. This value can safely be set per
|
241
|
-
# request on the session
|
295
|
+
# request on the session.
|
242
296
|
#
|
243
297
|
# @option options [Boolean] :http_wire_trace (false) When `true`,
|
244
298
|
# HTTP debug output will be sent to the `:logger`.
|
@@ -278,7 +332,7 @@ module Aws::TranscribeStreamingService
|
|
278
332
|
params: params,
|
279
333
|
config: config)
|
280
334
|
context[:gem_name] = 'aws-sdk-transcribestreamingservice'
|
281
|
-
context[:gem_version] = '1.
|
335
|
+
context[:gem_version] = '1.15.0'
|
282
336
|
Seahorse::Client::Request.new(handlers, context)
|
283
337
|
end
|
284
338
|
|
@@ -31,6 +31,7 @@ module Aws::TranscribeStreamingService
|
|
31
31
|
RequestId = Shapes::StringShape.new(name: 'RequestId')
|
32
32
|
Result = Shapes::StructureShape.new(name: 'Result')
|
33
33
|
ResultList = Shapes::ListShape.new(name: 'ResultList')
|
34
|
+
ServiceUnavailableException = Shapes::StructureShape.new(name: 'ServiceUnavailableException')
|
34
35
|
SessionId = Shapes::StringShape.new(name: 'SessionId')
|
35
36
|
StartStreamTranscriptionRequest = Shapes::StructureShape.new(name: 'StartStreamTranscriptionRequest')
|
36
37
|
StartStreamTranscriptionResponse = Shapes::StructureShape.new(name: 'StartStreamTranscriptionResponse')
|
@@ -38,6 +39,8 @@ module Aws::TranscribeStreamingService
|
|
38
39
|
Transcript = Shapes::StructureShape.new(name: 'Transcript')
|
39
40
|
TranscriptEvent = Shapes::StructureShape.new(name: 'TranscriptEvent')
|
40
41
|
TranscriptResultStream = Shapes::StructureShape.new(name: 'TranscriptResultStream')
|
42
|
+
VocabularyFilterMethod = Shapes::StringShape.new(name: 'VocabularyFilterMethod')
|
43
|
+
VocabularyFilterName = Shapes::StringShape.new(name: 'VocabularyFilterName')
|
41
44
|
VocabularyName = Shapes::StringShape.new(name: 'VocabularyName')
|
42
45
|
|
43
46
|
Alternative.add_member(:transcript, Shapes::ShapeRef.new(shape: String, location_name: "Transcript"))
|
@@ -65,6 +68,7 @@ module Aws::TranscribeStreamingService
|
|
65
68
|
Item.add_member(:end_time, Shapes::ShapeRef.new(shape: Double, location_name: "EndTime"))
|
66
69
|
Item.add_member(:type, Shapes::ShapeRef.new(shape: ItemType, location_name: "Type"))
|
67
70
|
Item.add_member(:content, Shapes::ShapeRef.new(shape: String, location_name: "Content"))
|
71
|
+
Item.add_member(:vocabulary_filter_match, Shapes::ShapeRef.new(shape: Boolean, location_name: "VocabularyFilterMatch"))
|
68
72
|
Item.struct_class = Types::Item
|
69
73
|
|
70
74
|
ItemList.member = Shapes::ShapeRef.new(shape: Item)
|
@@ -81,12 +85,17 @@ module Aws::TranscribeStreamingService
|
|
81
85
|
|
82
86
|
ResultList.member = Shapes::ShapeRef.new(shape: Result)
|
83
87
|
|
88
|
+
ServiceUnavailableException.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "Message"))
|
89
|
+
ServiceUnavailableException.struct_class = Types::ServiceUnavailableException
|
90
|
+
|
84
91
|
StartStreamTranscriptionRequest.add_member(:language_code, Shapes::ShapeRef.new(shape: LanguageCode, required: true, location: "header", location_name: "x-amzn-transcribe-language-code"))
|
85
92
|
StartStreamTranscriptionRequest.add_member(:media_sample_rate_hertz, Shapes::ShapeRef.new(shape: MediaSampleRateHertz, required: true, location: "header", location_name: "x-amzn-transcribe-sample-rate"))
|
86
93
|
StartStreamTranscriptionRequest.add_member(:media_encoding, Shapes::ShapeRef.new(shape: MediaEncoding, required: true, location: "header", location_name: "x-amzn-transcribe-media-encoding"))
|
87
94
|
StartStreamTranscriptionRequest.add_member(:vocabulary_name, Shapes::ShapeRef.new(shape: VocabularyName, location: "header", location_name: "x-amzn-transcribe-vocabulary-name"))
|
88
95
|
StartStreamTranscriptionRequest.add_member(:session_id, Shapes::ShapeRef.new(shape: SessionId, location: "header", location_name: "x-amzn-transcribe-session-id"))
|
89
96
|
StartStreamTranscriptionRequest.add_member(:audio_stream, Shapes::ShapeRef.new(shape: AudioStream, required: true, eventstream: true, location_name: "AudioStream"))
|
97
|
+
StartStreamTranscriptionRequest.add_member(:vocabulary_filter_name, Shapes::ShapeRef.new(shape: VocabularyFilterName, location: "header", location_name: "x-amzn-transcribe-vocabulary-filter-name"))
|
98
|
+
StartStreamTranscriptionRequest.add_member(:vocabulary_filter_method, Shapes::ShapeRef.new(shape: VocabularyFilterMethod, location: "header", location_name: "x-amzn-transcribe-vocabulary-filter-method"))
|
90
99
|
StartStreamTranscriptionRequest.struct_class = Types::StartStreamTranscriptionRequest
|
91
100
|
StartStreamTranscriptionRequest[:payload] = :audio_stream
|
92
101
|
StartStreamTranscriptionRequest[:payload_member] = StartStreamTranscriptionRequest.member(:audio_stream)
|
@@ -98,6 +107,8 @@ module Aws::TranscribeStreamingService
|
|
98
107
|
StartStreamTranscriptionResponse.add_member(:vocabulary_name, Shapes::ShapeRef.new(shape: VocabularyName, location: "header", location_name: "x-amzn-transcribe-vocabulary-name"))
|
99
108
|
StartStreamTranscriptionResponse.add_member(:session_id, Shapes::ShapeRef.new(shape: SessionId, location: "header", location_name: "x-amzn-transcribe-session-id"))
|
100
109
|
StartStreamTranscriptionResponse.add_member(:transcript_result_stream, Shapes::ShapeRef.new(shape: TranscriptResultStream, eventstream: true, location_name: "TranscriptResultStream"))
|
110
|
+
StartStreamTranscriptionResponse.add_member(:vocabulary_filter_name, Shapes::ShapeRef.new(shape: VocabularyFilterName, location: "header", location_name: "x-amzn-transcribe-vocabulary-filter-name"))
|
111
|
+
StartStreamTranscriptionResponse.add_member(:vocabulary_filter_method, Shapes::ShapeRef.new(shape: VocabularyFilterMethod, location: "header", location_name: "x-amzn-transcribe-vocabulary-filter-method"))
|
101
112
|
StartStreamTranscriptionResponse.struct_class = Types::StartStreamTranscriptionResponse
|
102
113
|
StartStreamTranscriptionResponse[:payload] = :transcript_result_stream
|
103
114
|
StartStreamTranscriptionResponse[:payload_member] = StartStreamTranscriptionResponse.member(:transcript_result_stream)
|
@@ -113,6 +124,7 @@ module Aws::TranscribeStreamingService
|
|
113
124
|
TranscriptResultStream.add_member(:limit_exceeded_exception, Shapes::ShapeRef.new(shape: LimitExceededException, event: true, location_name: "LimitExceededException"))
|
114
125
|
TranscriptResultStream.add_member(:internal_failure_exception, Shapes::ShapeRef.new(shape: InternalFailureException, event: true, location_name: "InternalFailureException"))
|
115
126
|
TranscriptResultStream.add_member(:conflict_exception, Shapes::ShapeRef.new(shape: ConflictException, event: true, location_name: "ConflictException"))
|
127
|
+
TranscriptResultStream.add_member(:service_unavailable_exception, Shapes::ShapeRef.new(shape: ServiceUnavailableException, event: true, location_name: "ServiceUnavailableException"))
|
116
128
|
TranscriptResultStream.struct_class = Types::TranscriptResultStream
|
117
129
|
|
118
130
|
|
@@ -143,6 +155,7 @@ module Aws::TranscribeStreamingService
|
|
143
155
|
o.errors << Shapes::ShapeRef.new(shape: LimitExceededException)
|
144
156
|
o.errors << Shapes::ShapeRef.new(shape: InternalFailureException)
|
145
157
|
o.errors << Shapes::ShapeRef.new(shape: ConflictException)
|
158
|
+
o.errors << Shapes::ShapeRef.new(shape: ServiceUnavailableException)
|
146
159
|
o.async = true
|
147
160
|
end)
|
148
161
|
end
|
@@ -6,6 +6,28 @@
|
|
6
6
|
# WARNING ABOUT GENERATED CODE
|
7
7
|
|
8
8
|
module Aws::TranscribeStreamingService
|
9
|
+
|
10
|
+
# When TranscribeStreamingService returns an error response, the Ruby SDK constructs and raises an error.
|
11
|
+
# These errors all extend Aws::TranscribeStreamingService::Errors::ServiceError < {Aws::Errors::ServiceError}
|
12
|
+
#
|
13
|
+
# You can rescue all TranscribeStreamingService errors using ServiceError:
|
14
|
+
#
|
15
|
+
# begin
|
16
|
+
# # do stuff
|
17
|
+
# rescue Aws::TranscribeStreamingService::Errors::ServiceError
|
18
|
+
# # rescues all TranscribeStreamingService API errors
|
19
|
+
# end
|
20
|
+
#
|
21
|
+
#
|
22
|
+
# ## Request Context
|
23
|
+
# ServiceError objects have a {Aws::Errors::ServiceError#context #context} method that returns
|
24
|
+
# information about the request that generated the error.
|
25
|
+
# See {Seahorse::Client::RequestContext} for more information.
|
26
|
+
#
|
27
|
+
# ## Error Classes
|
28
|
+
#
|
29
|
+
# Additionally, error classes are dynamically generated for service errors based on the error code
|
30
|
+
# if they are not defined above.
|
9
31
|
module Errors
|
10
32
|
|
11
33
|
extend Aws::Errors::DynamicErrors
|
@@ -57,6 +57,10 @@ module Aws::TranscribeStreamingService
|
|
57
57
|
@event_emitter.on(:conflict_exception, block) if block_given?
|
58
58
|
end
|
59
59
|
|
60
|
+
def on_service_unavailable_exception_event(&block)
|
61
|
+
@event_emitter.on(:service_unavailable_exception, block) if block_given?
|
62
|
+
end
|
63
|
+
|
60
64
|
def on_error_event(&block)
|
61
65
|
@event_emitter.on(:error, block) if block_given?
|
62
66
|
end
|
@@ -71,6 +75,7 @@ module Aws::TranscribeStreamingService
|
|
71
75
|
on_limit_exceeded_exception_event(&block)
|
72
76
|
on_internal_failure_exception_event(&block)
|
73
77
|
on_conflict_exception_event(&block)
|
78
|
+
on_service_unavailable_exception_event(&block)
|
74
79
|
on_error_event(&block)
|
75
80
|
on_initial_response_event(&block)
|
76
81
|
end
|
@@ -114,13 +114,20 @@ module Aws::TranscribeStreamingService
|
|
114
114
|
# The word or punctuation that was recognized in the input audio.
|
115
115
|
# @return [String]
|
116
116
|
#
|
117
|
+
# @!attribute [rw] vocabulary_filter_match
|
118
|
+
# Indicates whether a word in the item matches a word in the
|
119
|
+
# vocabulary filter you've chosen for your real-time stream. If
|
120
|
+
# `true` then a word in the item matches your vocabulary filter.
|
121
|
+
# @return [Boolean]
|
122
|
+
#
|
117
123
|
# @see http://docs.aws.amazon.com/goto/WebAPI/transcribe-streaming-2017-10-26/Item AWS API Documentation
|
118
124
|
#
|
119
125
|
class Item < Struct.new(
|
120
126
|
:start_time,
|
121
127
|
:end_time,
|
122
128
|
:type,
|
123
|
-
:content
|
129
|
+
:content,
|
130
|
+
:vocabulary_filter_match)
|
124
131
|
include Aws::Structure
|
125
132
|
end
|
126
133
|
|
@@ -184,6 +191,19 @@ module Aws::TranscribeStreamingService
|
|
184
191
|
include Aws::Structure
|
185
192
|
end
|
186
193
|
|
194
|
+
# Service is currently unavailable. Try your request later.
|
195
|
+
#
|
196
|
+
# @!attribute [rw] message
|
197
|
+
# @return [String]
|
198
|
+
#
|
199
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/transcribe-streaming-2017-10-26/ServiceUnavailableException AWS API Documentation
|
200
|
+
#
|
201
|
+
class ServiceUnavailableException < Struct.new(
|
202
|
+
:message,
|
203
|
+
:event_type)
|
204
|
+
include Aws::Structure
|
205
|
+
end
|
206
|
+
|
187
207
|
# @note When making an API call, you may pass StartStreamTranscriptionRequest
|
188
208
|
# data as a hash:
|
189
209
|
#
|
@@ -194,6 +214,8 @@ module Aws::TranscribeStreamingService
|
|
194
214
|
# vocabulary_name: "VocabularyName",
|
195
215
|
# session_id: "SessionId",
|
196
216
|
# input_event_stream_hander: EventStreams::AudioStream.new,
|
217
|
+
# vocabulary_filter_name: "VocabularyFilterName",
|
218
|
+
# vocabulary_filter_method: "remove", # accepts remove, mask, tag
|
197
219
|
# }
|
198
220
|
#
|
199
221
|
# @!attribute [rw] language_code
|
@@ -227,6 +249,21 @@ module Aws::TranscribeStreamingService
|
|
227
249
|
# HTTP2 data frame.
|
228
250
|
# @return [Types::AudioStream]
|
229
251
|
#
|
252
|
+
# @!attribute [rw] vocabulary_filter_name
|
253
|
+
# The name of the vocabulary filter you've created that is unique to
|
254
|
+
# your AWS accountf. Provide the name in this field to successfully
|
255
|
+
# use it in a stream.
|
256
|
+
# @return [String]
|
257
|
+
#
|
258
|
+
# @!attribute [rw] vocabulary_filter_method
|
259
|
+
# The manner in which you use your vocabulary filter to filter words
|
260
|
+
# in your transcript. `Remove` removes filtered words from your
|
261
|
+
# transcription results. `Mask` masks those words with a `***` in your
|
262
|
+
# transcription results. `Tag` keeps the filtered words in your
|
263
|
+
# transcription results and tags them. The tag appears as
|
264
|
+
# `VocabularyFilterMatch` equal to `True`
|
265
|
+
# @return [String]
|
266
|
+
#
|
230
267
|
# @see http://docs.aws.amazon.com/goto/WebAPI/transcribe-streaming-2017-10-26/StartStreamTranscriptionRequest AWS API Documentation
|
231
268
|
#
|
232
269
|
class StartStreamTranscriptionRequest < Struct.new(
|
@@ -235,7 +272,9 @@ module Aws::TranscribeStreamingService
|
|
235
272
|
:media_encoding,
|
236
273
|
:vocabulary_name,
|
237
274
|
:session_id,
|
238
|
-
:audio_stream
|
275
|
+
:audio_stream,
|
276
|
+
:vocabulary_filter_name,
|
277
|
+
:vocabulary_filter_method)
|
239
278
|
include Aws::Structure
|
240
279
|
end
|
241
280
|
|
@@ -257,7 +296,7 @@ module Aws::TranscribeStreamingService
|
|
257
296
|
# @return [String]
|
258
297
|
#
|
259
298
|
# @!attribute [rw] vocabulary_name
|
260
|
-
# The name of the vocabulary used when processing the
|
299
|
+
# The name of the vocabulary used when processing the stream.
|
261
300
|
# @return [String]
|
262
301
|
#
|
263
302
|
# @!attribute [rw] session_id
|
@@ -269,6 +308,14 @@ module Aws::TranscribeStreamingService
|
|
269
308
|
# to your application.
|
270
309
|
# @return [Types::TranscriptResultStream]
|
271
310
|
#
|
311
|
+
# @!attribute [rw] vocabulary_filter_name
|
312
|
+
# The name of the vocabulary filter used in your real-time stream.
|
313
|
+
# @return [String]
|
314
|
+
#
|
315
|
+
# @!attribute [rw] vocabulary_filter_method
|
316
|
+
# The vocabulary filtering method used in the real-time stream.
|
317
|
+
# @return [String]
|
318
|
+
#
|
272
319
|
# @see http://docs.aws.amazon.com/goto/WebAPI/transcribe-streaming-2017-10-26/StartStreamTranscriptionResponse AWS API Documentation
|
273
320
|
#
|
274
321
|
class StartStreamTranscriptionResponse < Struct.new(
|
@@ -278,7 +325,9 @@ module Aws::TranscribeStreamingService
|
|
278
325
|
:media_encoding,
|
279
326
|
:vocabulary_name,
|
280
327
|
:session_id,
|
281
|
-
:transcript_result_stream
|
328
|
+
:transcript_result_stream,
|
329
|
+
:vocabulary_filter_name,
|
330
|
+
:vocabulary_filter_method)
|
282
331
|
include Aws::Structure
|
283
332
|
end
|
284
333
|
|
@@ -355,7 +404,8 @@ module Aws::TranscribeStreamingService
|
|
355
404
|
:bad_request_exception,
|
356
405
|
:limit_exceeded_exception,
|
357
406
|
:internal_failure_exception,
|
358
|
-
:conflict_exception
|
407
|
+
:conflict_exception,
|
408
|
+
:service_unavailable_exception
|
359
409
|
]
|
360
410
|
end
|
361
411
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-sdk-transcribestreamingservice
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.15.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Amazon Web Services
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-05-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-core
|
@@ -83,7 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
83
83
|
version: '0'
|
84
84
|
requirements: []
|
85
85
|
rubyforge_project:
|
86
|
-
rubygems_version: 2.
|
86
|
+
rubygems_version: 2.7.6.2
|
87
87
|
signing_key:
|
88
88
|
specification_version: 4
|
89
89
|
summary: AWS SDK for Ruby - Amazon Transcribe Streaming Service
|