blib/lib/Paws/Transcribe/StartTranscriptionJob.pm untested

filter: Statementstmt 0.0% 0 / 23 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 25 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 package Paws::Transcribe::StartTranscriptionJob;
3 use Moose;
4 has ContentRedaction => (is => 'ro', isa => 'Paws::Transcribe::ContentRedaction');
5 has IdentifyLanguage => (is => 'ro', isa => 'Bool');
6 has JobExecutionSettings => (is => 'ro', isa => 'Paws::Transcribe::JobExecutionSettings');
7 has LanguageCode => (is => 'ro', isa => 'Str');
8 has LanguageOptions => (is => 'ro', isa => 'ArrayRef[Str|Undef]');
9 has Media => (is => 'ro', isa => 'Paws::Transcribe::Media', required => 1);
10 has MediaFormat => (is => 'ro', isa => 'Str');
11 has MediaSampleRateHertz => (is => 'ro', isa => 'Int');
12 has ModelSettings => (is => 'ro', isa => 'Paws::Transcribe::ModelSettings');
13 has OutputBucketName => (is => 'ro', isa => 'Str');
14 has OutputEncryptionKMSKeyId => (is => 'ro', isa => 'Str');
15 has OutputKey => (is => 'ro', isa => 'Str');
16 has Settings => (is => 'ro', isa => 'Paws::Transcribe::Settings');
17 has TranscriptionJobName => (is => 'ro', isa => 'Str', required => 1);
18  
19 use MooseX::ClassAttribute;
20  
21 class_has _api_call => (isa => 'Str', is => 'ro', default => 'StartTranscriptionJob');
22 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::Transcribe::StartTranscriptionJobResponse');
23 class_has _result_key => (isa => 'Str', is => 'ro');
24 1;
25  
26 ### main pod documentation begin ###
27  
28 =head1 NAME
29  
30 Paws::Transcribe::StartTranscriptionJob - Arguments for method StartTranscriptionJob on L<Paws::Transcribe>
31  
32 =head1 DESCRIPTION
33  
34 This class represents the parameters used for calling the method StartTranscriptionJob on the
35 L<Amazon Transcribe Service|Paws::Transcribe> service. Use the attributes of this class
36 as arguments to method StartTranscriptionJob.
37  
38 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to StartTranscriptionJob.
39  
40 =head1 SYNOPSIS
41  
42 my $transcribe = Paws->service('Transcribe');
43 my $StartTranscriptionJobResponse = $transcribe->StartTranscriptionJob(
44 Media => {
45 MediaFileUri => 'MyUri', # min: 1, max: 2000; OPTIONAL
46 },
47 TranscriptionJobName => 'MyTranscriptionJobName',
48 ContentRedaction => {
49 RedactionOutput =>
50 'redacted', # values: redacted, redacted_and_unredacted
51 RedactionType => 'PII', # values: PII
52  
53 }, # OPTIONAL
54 IdentifyLanguage => 1, # OPTIONAL
55 JobExecutionSettings => {
56 AllowDeferredExecution => 1,
57 DataAccessRoleArn =>
58 'MyDataAccessRoleArn', # min: 20, max: 2048; OPTIONAL
59 }, # OPTIONAL
60 LanguageCode => 'af-ZA', # OPTIONAL
61 LanguageOptions => [
62 'af-ZA',
63 ... # values: af-ZA, ar-AE, ar-SA, cy-GB, da-DK, de-CH, de-DE, en-AB, en-AU, en-GB, en-IE, en-IN, en-US, en-WL, es-ES, es-US, fa-IR, fr-CA, fr-FR, ga-IE, gd-GB, he-IL, hi-IN, id-ID, it-IT, ja-JP, ko-KR, ms-MY, nl-NL, pt-BR, pt-PT, ru-RU, ta-IN, te-IN, tr-TR, zh-CN
64 ], # OPTIONAL
65 MediaFormat => 'mp3', # OPTIONAL
66 MediaSampleRateHertz => 1, # OPTIONAL
67 ModelSettings => {
68 LanguageModelName => 'MyModelName', # min: 1, max: 200; OPTIONAL
69 }, # OPTIONAL
70 OutputBucketName => 'MyOutputBucketName', # OPTIONAL
71 OutputEncryptionKMSKeyId => 'MyKMSKeyId', # OPTIONAL
72 OutputKey => 'MyOutputKey', # OPTIONAL
73 Settings => {
74 ChannelIdentification => 1,
75 MaxAlternatives => 1, # min: 2, max: 10; OPTIONAL
76 MaxSpeakerLabels => 1, # min: 2, max: 10; OPTIONAL
77 ShowAlternatives => 1,
78 ShowSpeakerLabels => 1,
79 VocabularyFilterMethod =>
80 'remove', # values: remove, mask, tag; OPTIONAL
81 VocabularyFilterName =>
82 'MyVocabularyFilterName', # min: 1, max: 200; OPTIONAL
83 VocabularyName => 'MyVocabularyName', # min: 1, max: 200; OPTIONAL
84 }, # OPTIONAL
85 );
86  
87 # Results:
88 my $TranscriptionJob = $StartTranscriptionJobResponse->TranscriptionJob;
89  
90 # Returns a L<Paws::Transcribe::StartTranscriptionJobResponse> object.
91  
92 Values for attributes that are native types (Int, String, Float, etc) can passed as-is (scalar values). Values for complex Types (objects) can be passed as a HashRef. The keys and values of the hashref will be used to instance the underlying object.
93 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/transcribe/StartTranscriptionJob>
94  
95 =head1 ATTRIBUTES
96  
97  
98 =head2 ContentRedaction => L<Paws::Transcribe::ContentRedaction>
99  
100 An object that contains the request parameters for content redaction.
101  
102  
103  
104 =head2 IdentifyLanguage => Bool
105  
106 Set this field to C<true> to enable automatic language identification.
107 Automatic language identification is disabled by default. You receive a
108 C<BadRequestException> error if you enter a value for a
109 C<LanguageCode>.
110  
111  
112  
113 =head2 JobExecutionSettings => L<Paws::Transcribe::JobExecutionSettings>
114  
115 Provides information about how a transcription job is executed. Use
116 this field to indicate that the job can be queued for deferred
117 execution if the concurrency limit is reached and there are no slots
118 available to immediately run the job.
119  
120  
121  
122 =head2 LanguageCode => Str
123  
124 The language code for the language used in the input media file.
125  
126 To transcribe speech in Modern Standard Arabic (ar-SA), your audio or
127 video file must be encoded at a sample rate of 16000 Hz or higher.
128  
129 Valid values are: C<"af-ZA">, C<"ar-AE">, C<"ar-SA">, C<"cy-GB">, C<"da-DK">, C<"de-CH">, C<"de-DE">, C<"en-AB">, C<"en-AU">, C<"en-GB">, C<"en-IE">, C<"en-IN">, C<"en-US">, C<"en-WL">, C<"es-ES">, C<"es-US">, C<"fa-IR">, C<"fr-CA">, C<"fr-FR">, C<"ga-IE">, C<"gd-GB">, C<"he-IL">, C<"hi-IN">, C<"id-ID">, C<"it-IT">, C<"ja-JP">, C<"ko-KR">, C<"ms-MY">, C<"nl-NL">, C<"pt-BR">, C<"pt-PT">, C<"ru-RU">, C<"ta-IN">, C<"te-IN">, C<"tr-TR">, C<"zh-CN">
130  
131 =head2 LanguageOptions => ArrayRef[Str|Undef]
132  
133 An object containing a list of languages that might be present in your
134 collection of audio files. Automatic language identification chooses a
135 language that best matches the source audio from that list.
136  
137  
138  
139 =head2 B<REQUIRED> Media => L<Paws::Transcribe::Media>
140  
141 An object that describes the input media for a transcription job.
142  
143  
144  
145 =head2 MediaFormat => Str
146  
147 The format of the input media file.
148  
149 Valid values are: C<"mp3">, C<"mp4">, C<"wav">, C<"flac">, C<"ogg">, C<"amr">, C<"webm">
150  
151 =head2 MediaSampleRateHertz => Int
152  
153 The sample rate, in Hertz, of the audio track in the input media file.
154  
155 If you do not specify the media sample rate, Amazon Transcribe
156 determines the sample rate. If you specify the sample rate, it must
157 match the sample rate detected by Amazon Transcribe. In most cases, you
158 should leave the C<MediaSampleRateHertz> field blank and let Amazon
159 Transcribe determine the sample rate.
160  
161  
162  
163 =head2 ModelSettings => L<Paws::Transcribe::ModelSettings>
164  
165 Choose the custom language model you use for your transcription job in
166 this parameter.
167  
168  
169  
170 =head2 OutputBucketName => Str
171  
172 The location where the transcription is stored.
173  
174 If you set the C<OutputBucketName>, Amazon Transcribe puts the
175 transcript in the specified S3 bucket. When you call the
176 GetTranscriptionJob operation, the operation returns this location in
177 the C<TranscriptFileUri> field. If you enable content redaction, the
178 redacted transcript appears in C<RedactedTranscriptFileUri>. If you
179 enable content redaction and choose to output an unredacted transcript,
180 that transcript's location still appears in the C<TranscriptFileUri>.
181 The S3 bucket must have permissions that allow Amazon Transcribe to put
182 files in the bucket. For more information, see Permissions Required for
183 IAM User Roles
184 (https://docs.aws.amazon.com/transcribe/latest/dg/security_iam_id-based-policy-examples.html#auth-role-iam-user).
185  
186 You can specify an AWS Key Management Service (KMS) key to encrypt the
187 output of your transcription using the C<OutputEncryptionKMSKeyId>
188 parameter. If you don't specify a KMS key, Amazon Transcribe uses the
189 default Amazon S3 key for server-side encryption of transcripts that
190 are placed in your S3 bucket.
191  
192 If you don't set the C<OutputBucketName>, Amazon Transcribe generates a
193 pre-signed URL, a shareable URL that provides secure access to your
194 transcription, and returns it in the C<TranscriptFileUri> field. Use
195 this URL to download the transcription.
196  
197  
198  
199 =head2 OutputEncryptionKMSKeyId => Str
200  
201 The Amazon Resource Name (ARN) of the AWS Key Management Service (KMS)
202 key used to encrypt the output of the transcription job. The user
203 calling the C<StartTranscriptionJob> operation must have permission to
204 use the specified KMS key.
205  
206 You can use either of the following to identify a KMS key in the
207 current account:
208  
209 =over
210  
211 =item *
212  
213 KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"
214  
215 =item *
216  
217 KMS Key Alias: "alias/ExampleAlias"
218  
219 =back
220  
221 You can use either of the following to identify a KMS key in the
222 current account or another account:
223  
224 =over
225  
226 =item *
227  
228 Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:region:account
229 ID:key/1234abcd-12ab-34cd-56ef-1234567890ab"
230  
231 =item *
232  
233 ARN of a KMS Key Alias: "arn:aws:kms:region:account
234 ID:alias/ExampleAlias"
235  
236 =back
237  
238 If you don't specify an encryption key, the output of the transcription
239 job is encrypted with the default Amazon S3 key (SSE-S3).
240  
241 If you specify a KMS key to encrypt your output, you must also specify
242 an output location in the C<OutputBucketName> parameter.
243  
244  
245  
246 =head2 OutputKey => Str
247  
248 You can specify a location in an Amazon S3 bucket to store the output
249 of your transcription job.
250  
251 If you don't specify an output key, Amazon Transcribe stores the output
252 of your transcription job in the Amazon S3 bucket you specified. By
253 default, the object key is "your-transcription-job-name.json".
254  
255 You can use output keys to specify the Amazon S3 prefix and file name
256 of the transcription output. For example, specifying the Amazon S3
257 prefix, "folder1/folder2/", as an output key would lead to the output
258 being stored as "folder1/folder2/your-transcription-job-name.json". If
259 you specify "my-other-job-name.json" as the output key, the object key
260 is changed to "my-other-job-name.json". You can use an output key to
261 change both the prefix and the file name, for example
262 "folder/my-other-job-name.json".
263  
264 If you specify an output key, you must also specify an S3 bucket in the
265 C<OutputBucketName> parameter.
266  
267  
268  
269 =head2 Settings => L<Paws::Transcribe::Settings>
270  
271 A C<Settings> object that provides optional settings for a
272 transcription job.
273  
274  
275  
276 =head2 B<REQUIRED> TranscriptionJobName => Str
277  
278 The name of the job. You can't use the strings "C<.>" or "C<..>" by
279 themselves as the job name. The name must also be unique within an AWS
280 account. If you try to create a transcription job with the same name as
281 a previous transcription job, you get a C<ConflictException> error.
282  
283  
284  
285  
286 =head1 SEE ALSO
287  
288 This class forms part of L<Paws>, documenting arguments for method StartTranscriptionJob in L<Paws::Transcribe>
289  
290 =head1 BUGS and CONTRIBUTIONS
291  
292 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
293  
294 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
295  
296 =cut
297