aws-sdk-transcribeservice 1.0.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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: d790cb77a331aa414839e5397453e3da86187695
4
+ data.tar.gz: c18ad387eecd0dbace26a4f93e9cff50ca576f32
5
+ SHA512:
6
+ metadata.gz: 13f701f9d0cab233b128dde6cf6f71e96984bb73a092f513df267f1567ea44a5082cce7d5f0a15577cd7b5b2010d1ed01f831dbda0f67c31aaa136422483ae71
7
+ data.tar.gz: e24ab6b4428a1d7c0963f91544f36f89b467be49240673e2d920b492e0d22789d144a41ee2d2c1314ef45e29bf3d45ee9a97ada5b4f6a7083a8752cfcde7a054
@@ -0,0 +1,47 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing guide for more information:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ require 'aws-sdk-core'
9
+ require 'aws-sigv4'
10
+
11
+ require_relative 'aws-sdk-transcribeservice/types'
12
+ require_relative 'aws-sdk-transcribeservice/client_api'
13
+ require_relative 'aws-sdk-transcribeservice/client'
14
+ require_relative 'aws-sdk-transcribeservice/errors'
15
+ require_relative 'aws-sdk-transcribeservice/resource'
16
+ require_relative 'aws-sdk-transcribeservice/customizations'
17
+
18
+ # This module provides support for Amazon Transcribe Service. This module is available in the
19
+ # `aws-sdk-transcribeservice` gem.
20
+ #
21
+ # # Client
22
+ #
23
+ # The {Client} class provides one method for each API operation. Operation
24
+ # methods each accept a hash of request parameters and return a response
25
+ # structure.
26
+ #
27
+ # See {Client} for more information.
28
+ #
29
+ # # Errors
30
+ #
31
+ # Errors returned from Amazon Transcribe Service all
32
+ # extend {Errors::ServiceError}.
33
+ #
34
+ # begin
35
+ # # do stuff
36
+ # rescue Aws::TranscribeService::Errors::ServiceError
37
+ # # rescues all service API errors
38
+ # end
39
+ #
40
+ # See {Errors} for more information.
41
+ #
42
+ # @service
43
+ module Aws::TranscribeService
44
+
45
+ GEM_VERSION = '1.0.0'
46
+
47
+ end
@@ -0,0 +1,336 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing guide for more information:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ require 'seahorse/client/plugins/content_length.rb'
9
+ require 'aws-sdk-core/plugins/credentials_configuration.rb'
10
+ require 'aws-sdk-core/plugins/logging.rb'
11
+ require 'aws-sdk-core/plugins/param_converter.rb'
12
+ require 'aws-sdk-core/plugins/param_validator.rb'
13
+ require 'aws-sdk-core/plugins/user_agent.rb'
14
+ require 'aws-sdk-core/plugins/helpful_socket_errors.rb'
15
+ require 'aws-sdk-core/plugins/retry_errors.rb'
16
+ require 'aws-sdk-core/plugins/global_configuration.rb'
17
+ require 'aws-sdk-core/plugins/regional_endpoint.rb'
18
+ require 'aws-sdk-core/plugins/response_paging.rb'
19
+ require 'aws-sdk-core/plugins/stub_responses.rb'
20
+ require 'aws-sdk-core/plugins/idempotency_token.rb'
21
+ require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
22
+ require 'aws-sdk-core/plugins/signature_v4.rb'
23
+ require 'aws-sdk-core/plugins/protocols/json_rpc.rb'
24
+
25
+ Aws::Plugins::GlobalConfiguration.add_identifier(:transcribeservice)
26
+
27
+ module Aws::TranscribeService
28
+ class Client < Seahorse::Client::Base
29
+
30
+ include Aws::ClientStubs
31
+
32
+ @identifier = :transcribeservice
33
+
34
+ set_api(ClientApi::API)
35
+
36
+ add_plugin(Seahorse::Client::Plugins::ContentLength)
37
+ add_plugin(Aws::Plugins::CredentialsConfiguration)
38
+ add_plugin(Aws::Plugins::Logging)
39
+ add_plugin(Aws::Plugins::ParamConverter)
40
+ add_plugin(Aws::Plugins::ParamValidator)
41
+ add_plugin(Aws::Plugins::UserAgent)
42
+ add_plugin(Aws::Plugins::HelpfulSocketErrors)
43
+ add_plugin(Aws::Plugins::RetryErrors)
44
+ add_plugin(Aws::Plugins::GlobalConfiguration)
45
+ add_plugin(Aws::Plugins::RegionalEndpoint)
46
+ add_plugin(Aws::Plugins::ResponsePaging)
47
+ add_plugin(Aws::Plugins::StubResponses)
48
+ add_plugin(Aws::Plugins::IdempotencyToken)
49
+ add_plugin(Aws::Plugins::JsonvalueConverter)
50
+ add_plugin(Aws::Plugins::SignatureV4)
51
+ add_plugin(Aws::Plugins::Protocols::JsonRpc)
52
+
53
+ # @option options [required, Aws::CredentialProvider] :credentials
54
+ # Your AWS credentials. This can be an instance of any one of the
55
+ # following classes:
56
+ #
57
+ # * `Aws::Credentials` - Used for configuring static, non-refreshing
58
+ # credentials.
59
+ #
60
+ # * `Aws::InstanceProfileCredentials` - Used for loading credentials
61
+ # from an EC2 IMDS on an EC2 instance.
62
+ #
63
+ # * `Aws::SharedCredentials` - Used for loading credentials from a
64
+ # shared file, such as `~/.aws/config`.
65
+ #
66
+ # * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
67
+ #
68
+ # When `:credentials` are not configured directly, the following
69
+ # locations will be searched for credentials:
70
+ #
71
+ # * `Aws.config[:credentials]`
72
+ # * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
73
+ # * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
74
+ # * `~/.aws/credentials`
75
+ # * `~/.aws/config`
76
+ # * EC2 IMDS instance profile - When used by default, the timeouts are
77
+ # very aggressive. Construct and pass an instance of
78
+ # `Aws::InstanceProfileCredentails` to enable retries and extended
79
+ # timeouts.
80
+ #
81
+ # @option options [required, String] :region
82
+ # The AWS region to connect to. The configured `:region` is
83
+ # used to determine the service `:endpoint`. When not passed,
84
+ # a default `:region` is search for in the following locations:
85
+ #
86
+ # * `Aws.config[:region]`
87
+ # * `ENV['AWS_REGION']`
88
+ # * `ENV['AMAZON_REGION']`
89
+ # * `ENV['AWS_DEFAULT_REGION']`
90
+ # * `~/.aws/credentials`
91
+ # * `~/.aws/config`
92
+ #
93
+ # @option options [String] :access_key_id
94
+ #
95
+ # @option options [Boolean] :convert_params (true)
96
+ # When `true`, an attempt is made to coerce request parameters into
97
+ # the required types.
98
+ #
99
+ # @option options [String] :endpoint
100
+ # The client endpoint is normally constructed from the `:region`
101
+ # option. You should only configure an `:endpoint` when connecting
102
+ # to test endpoints. This should be avalid HTTP(S) URI.
103
+ #
104
+ # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
105
+ # The log formatter.
106
+ #
107
+ # @option options [Symbol] :log_level (:info)
108
+ # The log level to send messages to the `:logger` at.
109
+ #
110
+ # @option options [Logger] :logger
111
+ # The Logger instance to send log messages to. If this option
112
+ # is not set, logging will be disabled.
113
+ #
114
+ # @option options [String] :profile ("default")
115
+ # Used when loading credentials from the shared credentials file
116
+ # at HOME/.aws/credentials. When not specified, 'default' is used.
117
+ #
118
+ # @option options [Integer] :retry_limit (3)
119
+ # The maximum number of times to retry failed requests. Only
120
+ # ~ 500 level server errors and certain ~ 400 level client errors
121
+ # are retried. Generally, these are throttling errors, data
122
+ # checksum errors, networking errors, timeout errors and auth
123
+ # errors from expired credentials.
124
+ #
125
+ # @option options [String] :secret_access_key
126
+ #
127
+ # @option options [String] :session_token
128
+ #
129
+ # @option options [Boolean] :simple_json (false)
130
+ # Disables request parameter conversion, validation, and formatting.
131
+ # Also disable response data type conversions. This option is useful
132
+ # when you want to ensure the highest level of performance by
133
+ # avoiding overhead of walking request parameters and response data
134
+ # structures.
135
+ #
136
+ # When `:simple_json` is enabled, the request parameters hash must
137
+ # be formatted exactly as the DynamoDB API expects.
138
+ #
139
+ # @option options [Boolean] :stub_responses (false)
140
+ # Causes the client to return stubbed responses. By default
141
+ # fake responses are generated and returned. You can specify
142
+ # the response data to return or errors to raise by calling
143
+ # {ClientStubs#stub_responses}. See {ClientStubs} for more information.
144
+ #
145
+ # ** Please note ** When response stubbing is enabled, no HTTP
146
+ # requests are made, and retries are disabled.
147
+ #
148
+ # @option options [Boolean] :validate_params (true)
149
+ # When `true`, request parameters are validated before
150
+ # sending the request.
151
+ #
152
+ def initialize(*args)
153
+ super
154
+ end
155
+
156
+ # @!group API Operations
157
+
158
+ # Returns information about a transcription job. To see the status of
159
+ # the job, check the `Status` field. If the status is `COMPLETE`, the
160
+ # job is finished and you can find the results at the location specified
161
+ # in the `TranscriptionFileUri` field.
162
+ #
163
+ # @option params [required, String] :transcription_job_name
164
+ # The name of the job.
165
+ #
166
+ # @return [Types::GetTranscriptionJobResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
167
+ #
168
+ # * {Types::GetTranscriptionJobResponse#transcription_job #transcription_job} => Types::TranscriptionJob
169
+ #
170
+ # @example Request syntax with placeholder values
171
+ #
172
+ # resp = client.get_transcription_job({
173
+ # transcription_job_name: "TranscriptionJobName", # required
174
+ # })
175
+ #
176
+ # @example Response structure
177
+ #
178
+ # resp.transcription_job.transcription_job_name #=> String
179
+ # resp.transcription_job.transcription_job_status #=> String, one of "IN_PROGRESS", "FAILED", "COMPLETED"
180
+ # resp.transcription_job.language_code #=> String, one of "en-US", "es-US"
181
+ # resp.transcription_job.media_sample_rate_hertz #=> Integer
182
+ # resp.transcription_job.media_format #=> String, one of "mp3", "mp4", "wav", "flac"
183
+ # resp.transcription_job.media.media_file_uri #=> String
184
+ # resp.transcription_job.transcript.transcript_file_uri #=> String
185
+ # resp.transcription_job.creation_time #=> Time
186
+ # resp.transcription_job.completion_time #=> Time
187
+ # resp.transcription_job.failure_reason #=> String
188
+ #
189
+ # @see http://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/GetTranscriptionJob AWS API Documentation
190
+ #
191
+ # @overload get_transcription_job(params = {})
192
+ # @param [Hash] params ({})
193
+ def get_transcription_job(params = {}, options = {})
194
+ req = build_request(:get_transcription_job, params)
195
+ req.send_request(options)
196
+ end
197
+
198
+ # Lists transcription jobs with the specified status.
199
+ #
200
+ # @option params [required, String] :status
201
+ # When specified, returns only transcription jobs with the specified
202
+ # status.
203
+ #
204
+ # @option params [String] :next_token
205
+ # If the result of the previous request to `ListTranscriptionJobs` was
206
+ # truncated, include the `NextToken` to fetch the next set of jobs.
207
+ #
208
+ # @option params [Integer] :max_results
209
+ # The maximum number of jobs to return in the response.
210
+ #
211
+ # @return [Types::ListTranscriptionJobsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
212
+ #
213
+ # * {Types::ListTranscriptionJobsResponse#status #status} => String
214
+ # * {Types::ListTranscriptionJobsResponse#next_token #next_token} => String
215
+ # * {Types::ListTranscriptionJobsResponse#transcription_job_summaries #transcription_job_summaries} => Array&lt;Types::TranscriptionJobSummary&gt;
216
+ #
217
+ # @example Request syntax with placeholder values
218
+ #
219
+ # resp = client.list_transcription_jobs({
220
+ # status: "IN_PROGRESS", # required, accepts IN_PROGRESS, FAILED, COMPLETED
221
+ # next_token: "NextToken",
222
+ # max_results: 1,
223
+ # })
224
+ #
225
+ # @example Response structure
226
+ #
227
+ # resp.status #=> String, one of "IN_PROGRESS", "FAILED", "COMPLETED"
228
+ # resp.next_token #=> String
229
+ # resp.transcription_job_summaries #=> Array
230
+ # resp.transcription_job_summaries[0].transcription_job_name #=> String
231
+ # resp.transcription_job_summaries[0].creation_time #=> Time
232
+ # resp.transcription_job_summaries[0].completion_time #=> Time
233
+ # resp.transcription_job_summaries[0].language_code #=> String, one of "en-US", "es-US"
234
+ # resp.transcription_job_summaries[0].transcription_job_status #=> String, one of "IN_PROGRESS", "FAILED", "COMPLETED"
235
+ # resp.transcription_job_summaries[0].failure_reason #=> String
236
+ #
237
+ # @see http://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/ListTranscriptionJobs AWS API Documentation
238
+ #
239
+ # @overload list_transcription_jobs(params = {})
240
+ # @param [Hash] params ({})
241
+ def list_transcription_jobs(params = {}, options = {})
242
+ req = build_request(:list_transcription_jobs, params)
243
+ req.send_request(options)
244
+ end
245
+
246
+ # Starts an asynchronous job to transcribe speech to text.
247
+ #
248
+ # @option params [required, String] :transcription_job_name
249
+ # The name of the job. The name must be unique within an AWS account.
250
+ #
251
+ # @option params [required, String] :language_code
252
+ # The language code for the language used in the input media file.
253
+ #
254
+ # @option params [Integer] :media_sample_rate_hertz
255
+ # The sample rate, in Hertz, of the audio track in the input media file.
256
+ #
257
+ # @option params [required, String] :media_format
258
+ # The format of the input media file.
259
+ #
260
+ # @option params [required, Types::Media] :media
261
+ # An object that describes the input media for a transcription job.
262
+ #
263
+ # @return [Types::StartTranscriptionJobResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
264
+ #
265
+ # * {Types::StartTranscriptionJobResponse#transcription_job #transcription_job} => Types::TranscriptionJob
266
+ #
267
+ # @example Request syntax with placeholder values
268
+ #
269
+ # resp = client.start_transcription_job({
270
+ # transcription_job_name: "TranscriptionJobName", # required
271
+ # language_code: "en-US", # required, accepts en-US, es-US
272
+ # media_sample_rate_hertz: 1,
273
+ # media_format: "mp3", # required, accepts mp3, mp4, wav, flac
274
+ # media: { # required
275
+ # media_file_uri: "Uri",
276
+ # },
277
+ # })
278
+ #
279
+ # @example Response structure
280
+ #
281
+ # resp.transcription_job.transcription_job_name #=> String
282
+ # resp.transcription_job.transcription_job_status #=> String, one of "IN_PROGRESS", "FAILED", "COMPLETED"
283
+ # resp.transcription_job.language_code #=> String, one of "en-US", "es-US"
284
+ # resp.transcription_job.media_sample_rate_hertz #=> Integer
285
+ # resp.transcription_job.media_format #=> String, one of "mp3", "mp4", "wav", "flac"
286
+ # resp.transcription_job.media.media_file_uri #=> String
287
+ # resp.transcription_job.transcript.transcript_file_uri #=> String
288
+ # resp.transcription_job.creation_time #=> Time
289
+ # resp.transcription_job.completion_time #=> Time
290
+ # resp.transcription_job.failure_reason #=> String
291
+ #
292
+ # @see http://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/StartTranscriptionJob AWS API Documentation
293
+ #
294
+ # @overload start_transcription_job(params = {})
295
+ # @param [Hash] params ({})
296
+ def start_transcription_job(params = {}, options = {})
297
+ req = build_request(:start_transcription_job, params)
298
+ req.send_request(options)
299
+ end
300
+
301
+ # @!endgroup
302
+
303
+ # @param params ({})
304
+ # @api private
305
+ def build_request(operation_name, params = {})
306
+ handlers = @handlers.for(operation_name)
307
+ context = Seahorse::Client::RequestContext.new(
308
+ operation_name: operation_name,
309
+ operation: config.api.operation(operation_name),
310
+ client: self,
311
+ params: params,
312
+ config: config)
313
+ context[:gem_name] = 'aws-sdk-transcribeservice'
314
+ context[:gem_version] = '1.0.0'
315
+ Seahorse::Client::Request.new(handlers, context)
316
+ end
317
+
318
+ # @api private
319
+ # @deprecated
320
+ def waiter_names
321
+ []
322
+ end
323
+
324
+ class << self
325
+
326
+ # @api private
327
+ attr_reader :identifier
328
+
329
+ # @api private
330
+ def errors_module
331
+ Errors
332
+ end
333
+
334
+ end
335
+ end
336
+ end
@@ -0,0 +1,155 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing guide for more information:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ module Aws::TranscribeService
9
+ # @api private
10
+ module ClientApi
11
+
12
+ include Seahorse::Model
13
+
14
+ BadRequestException = Shapes::StructureShape.new(name: 'BadRequestException')
15
+ ConflictException = Shapes::StructureShape.new(name: 'ConflictException')
16
+ DateTime = Shapes::TimestampShape.new(name: 'DateTime')
17
+ FailureReason = Shapes::StringShape.new(name: 'FailureReason')
18
+ GetTranscriptionJobRequest = Shapes::StructureShape.new(name: 'GetTranscriptionJobRequest')
19
+ GetTranscriptionJobResponse = Shapes::StructureShape.new(name: 'GetTranscriptionJobResponse')
20
+ InternalFailureException = Shapes::StructureShape.new(name: 'InternalFailureException')
21
+ LanguageCode = Shapes::StringShape.new(name: 'LanguageCode')
22
+ LimitExceededException = Shapes::StructureShape.new(name: 'LimitExceededException')
23
+ ListTranscriptionJobsRequest = Shapes::StructureShape.new(name: 'ListTranscriptionJobsRequest')
24
+ ListTranscriptionJobsResponse = Shapes::StructureShape.new(name: 'ListTranscriptionJobsResponse')
25
+ MaxResults = Shapes::IntegerShape.new(name: 'MaxResults')
26
+ Media = Shapes::StructureShape.new(name: 'Media')
27
+ MediaFormat = Shapes::StringShape.new(name: 'MediaFormat')
28
+ MediaSampleRateHertz = Shapes::IntegerShape.new(name: 'MediaSampleRateHertz')
29
+ NextToken = Shapes::StringShape.new(name: 'NextToken')
30
+ NotFoundException = Shapes::StructureShape.new(name: 'NotFoundException')
31
+ StartTranscriptionJobRequest = Shapes::StructureShape.new(name: 'StartTranscriptionJobRequest')
32
+ StartTranscriptionJobResponse = Shapes::StructureShape.new(name: 'StartTranscriptionJobResponse')
33
+ String = Shapes::StringShape.new(name: 'String')
34
+ Transcript = Shapes::StructureShape.new(name: 'Transcript')
35
+ TranscriptionJob = Shapes::StructureShape.new(name: 'TranscriptionJob')
36
+ TranscriptionJobName = Shapes::StringShape.new(name: 'TranscriptionJobName')
37
+ TranscriptionJobStatus = Shapes::StringShape.new(name: 'TranscriptionJobStatus')
38
+ TranscriptionJobSummaries = Shapes::ListShape.new(name: 'TranscriptionJobSummaries')
39
+ TranscriptionJobSummary = Shapes::StructureShape.new(name: 'TranscriptionJobSummary')
40
+ Uri = Shapes::StringShape.new(name: 'Uri')
41
+
42
+ GetTranscriptionJobRequest.add_member(:transcription_job_name, Shapes::ShapeRef.new(shape: TranscriptionJobName, required: true, location_name: "TranscriptionJobName"))
43
+ GetTranscriptionJobRequest.struct_class = Types::GetTranscriptionJobRequest
44
+
45
+ GetTranscriptionJobResponse.add_member(:transcription_job, Shapes::ShapeRef.new(shape: TranscriptionJob, location_name: "TranscriptionJob"))
46
+ GetTranscriptionJobResponse.struct_class = Types::GetTranscriptionJobResponse
47
+
48
+ ListTranscriptionJobsRequest.add_member(:status, Shapes::ShapeRef.new(shape: TranscriptionJobStatus, required: true, location_name: "Status"))
49
+ ListTranscriptionJobsRequest.add_member(:next_token, Shapes::ShapeRef.new(shape: NextToken, location_name: "NextToken"))
50
+ ListTranscriptionJobsRequest.add_member(:max_results, Shapes::ShapeRef.new(shape: MaxResults, location_name: "MaxResults"))
51
+ ListTranscriptionJobsRequest.struct_class = Types::ListTranscriptionJobsRequest
52
+
53
+ ListTranscriptionJobsResponse.add_member(:status, Shapes::ShapeRef.new(shape: TranscriptionJobStatus, location_name: "Status"))
54
+ ListTranscriptionJobsResponse.add_member(:next_token, Shapes::ShapeRef.new(shape: NextToken, location_name: "NextToken"))
55
+ ListTranscriptionJobsResponse.add_member(:transcription_job_summaries, Shapes::ShapeRef.new(shape: TranscriptionJobSummaries, location_name: "TranscriptionJobSummaries"))
56
+ ListTranscriptionJobsResponse.struct_class = Types::ListTranscriptionJobsResponse
57
+
58
+ Media.add_member(:media_file_uri, Shapes::ShapeRef.new(shape: Uri, location_name: "MediaFileUri"))
59
+ Media.struct_class = Types::Media
60
+
61
+ StartTranscriptionJobRequest.add_member(:transcription_job_name, Shapes::ShapeRef.new(shape: TranscriptionJobName, required: true, location_name: "TranscriptionJobName"))
62
+ StartTranscriptionJobRequest.add_member(:language_code, Shapes::ShapeRef.new(shape: LanguageCode, required: true, location_name: "LanguageCode"))
63
+ StartTranscriptionJobRequest.add_member(:media_sample_rate_hertz, Shapes::ShapeRef.new(shape: MediaSampleRateHertz, location_name: "MediaSampleRateHertz"))
64
+ StartTranscriptionJobRequest.add_member(:media_format, Shapes::ShapeRef.new(shape: MediaFormat, required: true, location_name: "MediaFormat"))
65
+ StartTranscriptionJobRequest.add_member(:media, Shapes::ShapeRef.new(shape: Media, required: true, location_name: "Media"))
66
+ StartTranscriptionJobRequest.struct_class = Types::StartTranscriptionJobRequest
67
+
68
+ StartTranscriptionJobResponse.add_member(:transcription_job, Shapes::ShapeRef.new(shape: TranscriptionJob, location_name: "TranscriptionJob"))
69
+ StartTranscriptionJobResponse.struct_class = Types::StartTranscriptionJobResponse
70
+
71
+ Transcript.add_member(:transcript_file_uri, Shapes::ShapeRef.new(shape: Uri, location_name: "TranscriptFileUri"))
72
+ Transcript.struct_class = Types::Transcript
73
+
74
+ TranscriptionJob.add_member(:transcription_job_name, Shapes::ShapeRef.new(shape: TranscriptionJobName, location_name: "TranscriptionJobName"))
75
+ TranscriptionJob.add_member(:transcription_job_status, Shapes::ShapeRef.new(shape: TranscriptionJobStatus, location_name: "TranscriptionJobStatus"))
76
+ TranscriptionJob.add_member(:language_code, Shapes::ShapeRef.new(shape: LanguageCode, location_name: "LanguageCode"))
77
+ TranscriptionJob.add_member(:media_sample_rate_hertz, Shapes::ShapeRef.new(shape: MediaSampleRateHertz, location_name: "MediaSampleRateHertz"))
78
+ TranscriptionJob.add_member(:media_format, Shapes::ShapeRef.new(shape: MediaFormat, location_name: "MediaFormat"))
79
+ TranscriptionJob.add_member(:media, Shapes::ShapeRef.new(shape: Media, location_name: "Media"))
80
+ TranscriptionJob.add_member(:transcript, Shapes::ShapeRef.new(shape: Transcript, location_name: "Transcript"))
81
+ TranscriptionJob.add_member(:creation_time, Shapes::ShapeRef.new(shape: DateTime, location_name: "CreationTime"))
82
+ TranscriptionJob.add_member(:completion_time, Shapes::ShapeRef.new(shape: DateTime, location_name: "CompletionTime"))
83
+ TranscriptionJob.add_member(:failure_reason, Shapes::ShapeRef.new(shape: FailureReason, location_name: "FailureReason"))
84
+ TranscriptionJob.struct_class = Types::TranscriptionJob
85
+
86
+ TranscriptionJobSummaries.member = Shapes::ShapeRef.new(shape: TranscriptionJobSummary)
87
+
88
+ TranscriptionJobSummary.add_member(:transcription_job_name, Shapes::ShapeRef.new(shape: TranscriptionJobName, location_name: "TranscriptionJobName"))
89
+ TranscriptionJobSummary.add_member(:creation_time, Shapes::ShapeRef.new(shape: DateTime, location_name: "CreationTime"))
90
+ TranscriptionJobSummary.add_member(:completion_time, Shapes::ShapeRef.new(shape: DateTime, location_name: "CompletionTime"))
91
+ TranscriptionJobSummary.add_member(:language_code, Shapes::ShapeRef.new(shape: LanguageCode, location_name: "LanguageCode"))
92
+ TranscriptionJobSummary.add_member(:transcription_job_status, Shapes::ShapeRef.new(shape: TranscriptionJobStatus, location_name: "TranscriptionJobStatus"))
93
+ TranscriptionJobSummary.add_member(:failure_reason, Shapes::ShapeRef.new(shape: FailureReason, location_name: "FailureReason"))
94
+ TranscriptionJobSummary.struct_class = Types::TranscriptionJobSummary
95
+
96
+
97
+ # @api private
98
+ API = Seahorse::Model::Api.new.tap do |api|
99
+
100
+ api.version = "2017-10-26"
101
+
102
+ api.metadata = {
103
+ "endpointPrefix" => "transcribe",
104
+ "jsonVersion" => "1.1",
105
+ "protocol" => "json",
106
+ "serviceFullName" => "Amazon Transcribe Service",
107
+ "signatureVersion" => "v4",
108
+ "signingName" => "transcribe",
109
+ "targetPrefix" => "Transcribe",
110
+ }
111
+
112
+ api.add_operation(:get_transcription_job, Seahorse::Model::Operation.new.tap do |o|
113
+ o.name = "GetTranscriptionJob"
114
+ o.http_method = "POST"
115
+ o.http_request_uri = "/"
116
+ o.input = Shapes::ShapeRef.new(shape: GetTranscriptionJobRequest)
117
+ o.output = Shapes::ShapeRef.new(shape: GetTranscriptionJobResponse)
118
+ o.errors << Shapes::ShapeRef.new(shape: BadRequestException)
119
+ o.errors << Shapes::ShapeRef.new(shape: LimitExceededException)
120
+ o.errors << Shapes::ShapeRef.new(shape: InternalFailureException)
121
+ o.errors << Shapes::ShapeRef.new(shape: NotFoundException)
122
+ end)
123
+
124
+ api.add_operation(:list_transcription_jobs, Seahorse::Model::Operation.new.tap do |o|
125
+ o.name = "ListTranscriptionJobs"
126
+ o.http_method = "POST"
127
+ o.http_request_uri = "/"
128
+ o.input = Shapes::ShapeRef.new(shape: ListTranscriptionJobsRequest)
129
+ o.output = Shapes::ShapeRef.new(shape: ListTranscriptionJobsResponse)
130
+ o.errors << Shapes::ShapeRef.new(shape: BadRequestException)
131
+ o.errors << Shapes::ShapeRef.new(shape: LimitExceededException)
132
+ o.errors << Shapes::ShapeRef.new(shape: InternalFailureException)
133
+ o[:pager] = Aws::Pager.new(
134
+ limit_key: "max_results",
135
+ tokens: {
136
+ "next_token" => "next_token"
137
+ }
138
+ )
139
+ end)
140
+
141
+ api.add_operation(:start_transcription_job, Seahorse::Model::Operation.new.tap do |o|
142
+ o.name = "StartTranscriptionJob"
143
+ o.http_method = "POST"
144
+ o.http_request_uri = "/"
145
+ o.input = Shapes::ShapeRef.new(shape: StartTranscriptionJobRequest)
146
+ o.output = Shapes::ShapeRef.new(shape: StartTranscriptionJobResponse)
147
+ o.errors << Shapes::ShapeRef.new(shape: BadRequestException)
148
+ o.errors << Shapes::ShapeRef.new(shape: LimitExceededException)
149
+ o.errors << Shapes::ShapeRef.new(shape: InternalFailureException)
150
+ o.errors << Shapes::ShapeRef.new(shape: ConflictException)
151
+ end)
152
+ end
153
+
154
+ end
155
+ end
@@ -0,0 +1,14 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing guide for more information:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ module Aws::TranscribeService
9
+ module Errors
10
+
11
+ extend Aws::Errors::DynamicErrors
12
+
13
+ end
14
+ end
@@ -0,0 +1,23 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing guide for more information:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ module Aws::TranscribeService
9
+ class Resource
10
+
11
+ # @param options ({})
12
+ # @option options [Client] :client
13
+ def initialize(options = {})
14
+ @client = options[:client] || Client.new(options)
15
+ end
16
+
17
+ # @return [Client]
18
+ def client
19
+ @client
20
+ end
21
+
22
+ end
23
+ end
@@ -0,0 +1,312 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing guide for more information:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ module Aws::TranscribeService
9
+ module Types
10
+
11
+ # @note When making an API call, you may pass GetTranscriptionJobRequest
12
+ # data as a hash:
13
+ #
14
+ # {
15
+ # transcription_job_name: "TranscriptionJobName", # required
16
+ # }
17
+ #
18
+ # @!attribute [rw] transcription_job_name
19
+ # The name of the job.
20
+ # @return [String]
21
+ #
22
+ # @see http://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/GetTranscriptionJobRequest AWS API Documentation
23
+ #
24
+ class GetTranscriptionJobRequest < Struct.new(
25
+ :transcription_job_name)
26
+ include Aws::Structure
27
+ end
28
+
29
+ # @!attribute [rw] transcription_job
30
+ # An object that contains the results of the transcription job.
31
+ # @return [Types::TranscriptionJob]
32
+ #
33
+ # @see http://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/GetTranscriptionJobResponse AWS API Documentation
34
+ #
35
+ class GetTranscriptionJobResponse < Struct.new(
36
+ :transcription_job)
37
+ include Aws::Structure
38
+ end
39
+
40
+ # @note When making an API call, you may pass ListTranscriptionJobsRequest
41
+ # data as a hash:
42
+ #
43
+ # {
44
+ # status: "IN_PROGRESS", # required, accepts IN_PROGRESS, FAILED, COMPLETED
45
+ # next_token: "NextToken",
46
+ # max_results: 1,
47
+ # }
48
+ #
49
+ # @!attribute [rw] status
50
+ # When specified, returns only transcription jobs with the specified
51
+ # status.
52
+ # @return [String]
53
+ #
54
+ # @!attribute [rw] next_token
55
+ # If the result of the previous request to `ListTranscriptionJobs` was
56
+ # truncated, include the `NextToken` to fetch the next set of jobs.
57
+ # @return [String]
58
+ #
59
+ # @!attribute [rw] max_results
60
+ # The maximum number of jobs to return in the response.
61
+ # @return [Integer]
62
+ #
63
+ # @see http://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/ListTranscriptionJobsRequest AWS API Documentation
64
+ #
65
+ class ListTranscriptionJobsRequest < Struct.new(
66
+ :status,
67
+ :next_token,
68
+ :max_results)
69
+ include Aws::Structure
70
+ end
71
+
72
+ # @!attribute [rw] status
73
+ # The requested status of the jobs returned.
74
+ # @return [String]
75
+ #
76
+ # @!attribute [rw] next_token
77
+ # The `ListTranscriptionJobs` operation returns a page of jobs at a
78
+ # time. The size of the page is set by the `MaxResults` parameter. If
79
+ # there are more jobs in the list than the page size, Amazon
80
+ # Transcribe returns the `NextPage` token. Include the token in the
81
+ # next request to the `ListTranscriptionJobs` operation to return in
82
+ # the next page of jobs.
83
+ # @return [String]
84
+ #
85
+ # @!attribute [rw] transcription_job_summaries
86
+ # A list of objects containing summary information for a transcription
87
+ # job.
88
+ # @return [Array<Types::TranscriptionJobSummary>]
89
+ #
90
+ # @see http://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/ListTranscriptionJobsResponse AWS API Documentation
91
+ #
92
+ class ListTranscriptionJobsResponse < Struct.new(
93
+ :status,
94
+ :next_token,
95
+ :transcription_job_summaries)
96
+ include Aws::Structure
97
+ end
98
+
99
+ # Describes the input media file in a transcription request.
100
+ #
101
+ # @note When making an API call, you may pass Media
102
+ # data as a hash:
103
+ #
104
+ # {
105
+ # media_file_uri: "Uri",
106
+ # }
107
+ #
108
+ # @!attribute [rw] media_file_uri
109
+ # The S3 location of the input media file. The general form is:
110
+ #
111
+ # `
112
+ # https://<aws-region>.amazonaws.com/<bucket-name>/<keyprefix>/<objectkey>
113
+ # `
114
+ #
115
+ # For example:
116
+ #
117
+ # `https://s3-us-west-2.amazonaws.com/examplebucket/example.mp4`
118
+ #
119
+ # `https://s3-us-west-2.amazonaws.com/examplebucket/mediadocs/example.mp4`
120
+ # @return [String]
121
+ #
122
+ # @see http://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/Media AWS API Documentation
123
+ #
124
+ class Media < Struct.new(
125
+ :media_file_uri)
126
+ include Aws::Structure
127
+ end
128
+
129
+ # @note When making an API call, you may pass StartTranscriptionJobRequest
130
+ # data as a hash:
131
+ #
132
+ # {
133
+ # transcription_job_name: "TranscriptionJobName", # required
134
+ # language_code: "en-US", # required, accepts en-US, es-US
135
+ # media_sample_rate_hertz: 1,
136
+ # media_format: "mp3", # required, accepts mp3, mp4, wav, flac
137
+ # media: { # required
138
+ # media_file_uri: "Uri",
139
+ # },
140
+ # }
141
+ #
142
+ # @!attribute [rw] transcription_job_name
143
+ # The name of the job. The name must be unique within an AWS account.
144
+ # @return [String]
145
+ #
146
+ # @!attribute [rw] language_code
147
+ # The language code for the language used in the input media file.
148
+ # @return [String]
149
+ #
150
+ # @!attribute [rw] media_sample_rate_hertz
151
+ # The sample rate, in Hertz, of the audio track in the input media
152
+ # file.
153
+ # @return [Integer]
154
+ #
155
+ # @!attribute [rw] media_format
156
+ # The format of the input media file.
157
+ # @return [String]
158
+ #
159
+ # @!attribute [rw] media
160
+ # An object that describes the input media for a transcription job.
161
+ # @return [Types::Media]
162
+ #
163
+ # @see http://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/StartTranscriptionJobRequest AWS API Documentation
164
+ #
165
+ class StartTranscriptionJobRequest < Struct.new(
166
+ :transcription_job_name,
167
+ :language_code,
168
+ :media_sample_rate_hertz,
169
+ :media_format,
170
+ :media)
171
+ include Aws::Structure
172
+ end
173
+
174
+ # @!attribute [rw] transcription_job
175
+ # An object containing details of the asynchronous transcription job.
176
+ # @return [Types::TranscriptionJob]
177
+ #
178
+ # @see http://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/StartTranscriptionJobResponse AWS API Documentation
179
+ #
180
+ class StartTranscriptionJobResponse < Struct.new(
181
+ :transcription_job)
182
+ include Aws::Structure
183
+ end
184
+
185
+ # Describes the output of a transcription job.
186
+ #
187
+ # @!attribute [rw] transcript_file_uri
188
+ # The S3 location where the transcription result is stored. The
189
+ # general form of this Uri is:
190
+ #
191
+ # `
192
+ # https://<aws-region>.amazonaws.com/<bucket-name>/<keyprefix>/<objectkey>
193
+ # `
194
+ #
195
+ # For example:
196
+ #
197
+ # `https://s3-us-west-2.amazonaws.com/examplebucket/example.json`
198
+ #
199
+ # `https://s3-us-west-2.amazonaws.com/examplebucket/mediadocs/example.json`
200
+ # @return [String]
201
+ #
202
+ # @see http://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/Transcript AWS API Documentation
203
+ #
204
+ class Transcript < Struct.new(
205
+ :transcript_file_uri)
206
+ include Aws::Structure
207
+ end
208
+
209
+ # Describes an asynchronous transcription job that was created with the
210
+ # `StartTranscriptionJob` operation.
211
+ #
212
+ # @!attribute [rw] transcription_job_name
213
+ # A name to identify the transcription job.
214
+ # @return [String]
215
+ #
216
+ # @!attribute [rw] transcription_job_status
217
+ # The identifier assigned to the job when it was created.
218
+ # @return [String]
219
+ #
220
+ # @!attribute [rw] language_code
221
+ # The language code for the input speech.
222
+ # @return [String]
223
+ #
224
+ # @!attribute [rw] media_sample_rate_hertz
225
+ # The sample rate, in Hertz, of the audio track in the input media
226
+ # file.
227
+ # @return [Integer]
228
+ #
229
+ # @!attribute [rw] media_format
230
+ # The format of the input media file.
231
+ # @return [String]
232
+ #
233
+ # @!attribute [rw] media
234
+ # An object that describes the input media for a transcription job.
235
+ # @return [Types::Media]
236
+ #
237
+ # @!attribute [rw] transcript
238
+ # An object that describes the output of the transcription job.
239
+ # @return [Types::Transcript]
240
+ #
241
+ # @!attribute [rw] creation_time
242
+ # Timestamp of the date and time that the job was created.
243
+ # @return [Time]
244
+ #
245
+ # @!attribute [rw] completion_time
246
+ # Timestamp of the date and time that the job completed.
247
+ # @return [Time]
248
+ #
249
+ # @!attribute [rw] failure_reason
250
+ # If the `TranscriptionJobStatus` field is `FAILED`, this field
251
+ # contains information about why the job failed.
252
+ # @return [String]
253
+ #
254
+ # @see http://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/TranscriptionJob AWS API Documentation
255
+ #
256
+ class TranscriptionJob < Struct.new(
257
+ :transcription_job_name,
258
+ :transcription_job_status,
259
+ :language_code,
260
+ :media_sample_rate_hertz,
261
+ :media_format,
262
+ :media,
263
+ :transcript,
264
+ :creation_time,
265
+ :completion_time,
266
+ :failure_reason)
267
+ include Aws::Structure
268
+ end
269
+
270
+ # Provides a summary of information about a transcription job.
271
+ #
272
+ # @!attribute [rw] transcription_job_name
273
+ # The name assigned to the transcription job when it was created.
274
+ # @return [String]
275
+ #
276
+ # @!attribute [rw] creation_time
277
+ # Timestamp of the date and time that the job was created.
278
+ # @return [Time]
279
+ #
280
+ # @!attribute [rw] completion_time
281
+ # Timestamp of the date and time that the job completed.
282
+ # @return [Time]
283
+ #
284
+ # @!attribute [rw] language_code
285
+ # The language code for the input speech.
286
+ # @return [String]
287
+ #
288
+ # @!attribute [rw] transcription_job_status
289
+ # The status of the transcription job. When the status is `COMPLETED`,
290
+ # use the `GetTranscriptionJob` operation to get the results of the
291
+ # transcription.
292
+ # @return [String]
293
+ #
294
+ # @!attribute [rw] failure_reason
295
+ # If the `TranscriptionJobStatus` field is `FAILED`, this field
296
+ # contains a description of the error.
297
+ # @return [String]
298
+ #
299
+ # @see http://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/TranscriptionJobSummary AWS API Documentation
300
+ #
301
+ class TranscriptionJobSummary < Struct.new(
302
+ :transcription_job_name,
303
+ :creation_time,
304
+ :completion_time,
305
+ :language_code,
306
+ :transcription_job_status,
307
+ :failure_reason)
308
+ include Aws::Structure
309
+ end
310
+
311
+ end
312
+ end
metadata ADDED
@@ -0,0 +1,82 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: aws-sdk-transcribeservice
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Amazon Web Services
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2018-01-19 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: aws-sdk-core
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '3'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '3'
27
+ - !ruby/object:Gem::Dependency
28
+ name: aws-sigv4
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.0'
41
+ description: Official AWS Ruby gem for Amazon Transcribe Service. This gem is part
42
+ of the AWS SDK for Ruby.
43
+ email:
44
+ - trevrowe@amazon.com
45
+ executables: []
46
+ extensions: []
47
+ extra_rdoc_files: []
48
+ files:
49
+ - lib/aws-sdk-transcribeservice.rb
50
+ - lib/aws-sdk-transcribeservice/client.rb
51
+ - lib/aws-sdk-transcribeservice/client_api.rb
52
+ - lib/aws-sdk-transcribeservice/customizations.rb
53
+ - lib/aws-sdk-transcribeservice/errors.rb
54
+ - lib/aws-sdk-transcribeservice/resource.rb
55
+ - lib/aws-sdk-transcribeservice/types.rb
56
+ homepage: http://github.com/aws/aws-sdk-ruby
57
+ licenses:
58
+ - Apache-2.0
59
+ metadata:
60
+ source_code_uri: https://github.com/aws/aws-sdk-ruby/tree/master/gems/aws-sdk-transcribeservice
61
+ changelog_uri: https://github.com/aws/aws-sdk-ruby/tree/master/gems/aws-sdk-transcribeservice/CHANGELOG.md
62
+ post_install_message:
63
+ rdoc_options: []
64
+ require_paths:
65
+ - lib
66
+ required_ruby_version: !ruby/object:Gem::Requirement
67
+ requirements:
68
+ - - ">="
69
+ - !ruby/object:Gem::Version
70
+ version: '0'
71
+ required_rubygems_version: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ requirements: []
77
+ rubyforge_project:
78
+ rubygems_version: 2.5.1
79
+ signing_key:
80
+ specification_version: 4
81
+ summary: AWS SDK for Ruby - Amazon Transcribe Service
82
+ test_files: []