1// Code generated by smithy-go-codegen DO NOT EDIT.
2
3package types
4
5import (
6	"time"
7)
8
9// Settings for content redaction within a transcription job.
10type ContentRedaction struct {
11
12	// The output transcript file stored in either the default S3 bucket or in a bucket
13	// you specify. When you choose redacted Amazon Transcribe outputs only the
14	// redacted transcript. When you choose redacted_and_unredacted Amazon Transcribe
15	// outputs both the redacted and unredacted transcripts.
16	//
17	// This member is required.
18	RedactionOutput RedactionOutput
19
20	// Request parameter that defines the entities to be redacted. The only accepted
21	// value is PII.
22	//
23	// This member is required.
24	RedactionType RedactionType
25}
26
27// The object that contains the Amazon S3 object location and access role required
28// to train and tune your custom language model.
29type InputDataConfig struct {
30
31	// The Amazon Resource Name (ARN) that uniquely identifies the permissions you've
32	// given Amazon Transcribe to access your Amazon S3 buckets containing your media
33	// files or text data.
34	//
35	// This member is required.
36	DataAccessRoleArn *string
37
38	// The Amazon S3 prefix you specify to access the plain text files that you use to
39	// train your custom language model.
40	//
41	// This member is required.
42	S3Uri *string
43
44	// The Amazon S3 prefix you specify to access the plain text files that you use to
45	// tune your custom language model.
46	TuningDataS3Uri *string
47}
48
49// Provides information about when a transcription job should be executed.
50type JobExecutionSettings struct {
51
52	// Indicates whether a job should be queued by Amazon Transcribe when the
53	// concurrent execution limit is exceeded. When the AllowDeferredExecution field is
54	// true, jobs are queued and executed when the number of executing jobs falls below
55	// the concurrent execution limit. If the field is false, Amazon Transcribe returns
56	// a LimitExceededException exception. If you specify the AllowDeferredExecution
57	// field, you must specify the DataAccessRoleArn field.
58	AllowDeferredExecution *bool
59
60	// The Amazon Resource Name (ARN) of a role that has access to the S3 bucket that
61	// contains the input files. Amazon Transcribe assumes this role to read queued
62	// media files. If you have specified an output S3 bucket for the transcription
63	// results, this role should have access to the output bucket as well. If you
64	// specify the AllowDeferredExecution field, you must specify the DataAccessRoleArn
65	// field.
66	DataAccessRoleArn *string
67}
68
69// The structure used to describe a custom language model.
70type LanguageModel struct {
71
72	// The Amazon Transcribe standard language model, or base model used to create the
73	// custom language model.
74	BaseModelName BaseModelName
75
76	// The time the custom language model was created.
77	CreateTime *time.Time
78
79	// The reason why the custom language model couldn't be created.
80	FailureReason *string
81
82	// The data access role and Amazon S3 prefixes for the input files used to train
83	// the custom language model.
84	InputDataConfig *InputDataConfig
85
86	// The language code you used to create your custom language model.
87	LanguageCode CLMLanguageCode
88
89	// The most recent time the custom language model was modified.
90	LastModifiedTime *time.Time
91
92	// The name of the custom language model.
93	ModelName *string
94
95	// The creation status of a custom language model. When the status is COMPLETED the
96	// model is ready for use.
97	ModelStatus ModelStatus
98
99	// Whether the base model used for the custom language model is up to date. If this
100	// field is true then you are running the most up-to-date version of the base model
101	// in your custom language model.
102	UpgradeAvailability *bool
103}
104
105// Describes the input media file in a transcription request.
106type Media struct {
107
108	// The S3 object location of the input media file. The URI must be in the same
109	// region as the API endpoint that you are calling. The general form is: For
110	// example: For more information about S3 object names, see Object Keys
111	// (http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html#object-keys)
112	// in the Amazon S3 Developer Guide.
113	MediaFileUri *string
114}
115
116// Identifies the location of a medical transcript.
117type MedicalTranscript struct {
118
119	// The S3 object location of the medical transcript. Use this URI to access the
120	// medical transcript. This URI points to the S3 bucket you created to store the
121	// medical transcript.
122	TranscriptFileUri *string
123}
124
125// The data structure that contains the information for a medical transcription
126// job.
127type MedicalTranscriptionJob struct {
128
129	// A timestamp that shows when the job was completed.
130	CompletionTime *time.Time
131
132	// A timestamp that shows when the job was created.
133	CreationTime *time.Time
134
135	// If the TranscriptionJobStatus field is FAILED, this field contains information
136	// about why the job failed. The FailureReason field contains one of the following
137	// values:
138	//
139	// * Unsupported media format- The media format specified in the
140	// MediaFormat field of the request isn't valid. See the description of the
141	// MediaFormat field for a list of valid values.
142	//
143	// * The media format provided does
144	// not match the detected media format- The media format of the audio file doesn't
145	// match the format specified in the MediaFormat field in the request. Check the
146	// media format of your media file and make sure the two values match.
147	//
148	// * Invalid
149	// sample rate for audio file- The sample rate specified in the
150	// MediaSampleRateHertz of the request isn't valid. The sample rate must be between
151	// 8000 and 48000 Hertz.
152	//
153	// * The sample rate provided does not match the detected
154	// sample rate- The sample rate in the audio file doesn't match the sample rate
155	// specified in the MediaSampleRateHertz field in the request. Check the sample
156	// rate of your media file and make sure that the two values match.
157	//
158	// * Invalid file
159	// size: file size too large- The size of your audio file is larger than what
160	// Amazon Transcribe Medical can process. For more information, see Guidelines and
161	// Quotas
162	// (https://docs.aws.amazon.com/transcribe/latest/dg/limits-guidelines.html#limits)
163	// in the Amazon Transcribe Medical Guide
164	//
165	// * Invalid number of channels: number of
166	// channels too large- Your audio contains more channels than Amazon Transcribe
167	// Medical is configured to process. To request additional channels, see Amazon
168	// Transcribe Medical Endpoints and Quotas
169	// (https://docs.aws.amazon.com/general/latest/gr/transcribe-medical.html) in the
170	// Amazon Web Services General Reference
171	FailureReason *string
172
173	// The language code for the language spoken in the source audio file. US English
174	// (en-US) is the only supported language for medical transcriptions. Any other
175	// value you enter for language code results in a BadRequestException error.
176	LanguageCode LanguageCode
177
178	// Describes the input media file in a transcription request.
179	Media *Media
180
181	// The format of the input media file.
182	MediaFormat MediaFormat
183
184	// The sample rate, in Hertz, of the source audio containing medical information.
185	// If you don't specify the sample rate, Amazon Transcribe Medical determines it
186	// for you. If you choose to specify the sample rate, it must match the rate
187	// detected by Amazon Transcribe Medical. In most cases, you should leave the
188	// MediaSampleHertz blank and let Amazon Transcribe Medical determine the sample
189	// rate.
190	MediaSampleRateHertz *int32
191
192	// The name for a given medical transcription job.
193	MedicalTranscriptionJobName *string
194
195	// Object that contains object.
196	Settings *MedicalTranscriptionSetting
197
198	// The medical specialty of any clinicians providing a dictation or having a
199	// conversation. PRIMARYCARE is the only available setting for this object. This
200	// specialty enables you to generate transcriptions for the following medical
201	// fields:
202	//
203	// * Family Medicine
204	Specialty Specialty
205
206	// A timestamp that shows when the job started processing.
207	StartTime *time.Time
208
209	// An object that contains the MedicalTranscript. The MedicalTranscript contains
210	// the TranscriptFileUri.
211	Transcript *MedicalTranscript
212
213	// The completion status of a medical transcription job.
214	TranscriptionJobStatus TranscriptionJobStatus
215
216	// The type of speech in the transcription job. CONVERSATION is generally used for
217	// patient-physician dialogues. DICTATION is the setting for physicians speaking
218	// their notes after seeing a patient. For more information, see how-it-works-med
219	Type Type
220}
221
222// Provides summary information about a transcription job.
223type MedicalTranscriptionJobSummary struct {
224
225	// A timestamp that shows when the job was completed.
226	CompletionTime *time.Time
227
228	// A timestamp that shows when the medical transcription job was created.
229	CreationTime *time.Time
230
231	// If the TranscriptionJobStatus field is FAILED, a description of the error.
232	FailureReason *string
233
234	// The language of the transcript in the source audio file.
235	LanguageCode LanguageCode
236
237	// The name of a medical transcription job.
238	MedicalTranscriptionJobName *string
239
240	// Indicates the location of the transcription job's output. The CUSTOMER_BUCKET is
241	// the S3 location provided in the OutputBucketName field when the
242	OutputLocationType OutputLocationType
243
244	// The medical specialty of the transcription job. Primary care is the only valid
245	// value.
246	Specialty Specialty
247
248	// A timestamp that shows when the job began processing.
249	StartTime *time.Time
250
251	// The status of the medical transcription job.
252	TranscriptionJobStatus TranscriptionJobStatus
253
254	// The speech of the clinician in the input audio.
255	Type Type
256}
257
258// Optional settings for the StartMedicalTranscriptionJob operation.
259type MedicalTranscriptionSetting struct {
260
261	// Instructs Amazon Transcribe Medical to process each audio channel separately and
262	// then merge the transcription output of each channel into a single transcription.
263	// Amazon Transcribe Medical also produces a transcription of each item detected on
264	// an audio channel, including the start time and end time of the item and
265	// alternative transcriptions of item. The alternative transcriptions also come
266	// with confidence scores provided by Amazon Transcribe Medical. You can't set both
267	// ShowSpeakerLabels and ChannelIdentification in the same request. If you set
268	// both, your request returns a BadRequestException
269	ChannelIdentification *bool
270
271	// The maximum number of alternatives that you tell the service to return. If you
272	// specify the MaxAlternatives field, you must set the ShowAlternatives field to
273	// true.
274	MaxAlternatives *int32
275
276	// The maximum number of speakers to identify in the input audio. If there are more
277	// speakers in the audio than this number, multiple speakers are identified as a
278	// single speaker. If you specify the MaxSpeakerLabels field, you must set the
279	// ShowSpeakerLabels field to true.
280	MaxSpeakerLabels *int32
281
282	// Determines whether alternative transcripts are generated along with the
283	// transcript that has the highest confidence. If you set ShowAlternatives field to
284	// true, you must also set the maximum number of alternatives to return in the
285	// MaxAlternatives field.
286	ShowAlternatives *bool
287
288	// Determines whether the transcription job uses speaker recognition to identify
289	// different speakers in the input audio. Speaker recognition labels individual
290	// speakers in the audio file. If you set the ShowSpeakerLabels field to true, you
291	// must also set the maximum number of speaker labels in the MaxSpeakerLabels
292	// field. You can't set both ShowSpeakerLabels and ChannelIdentification in the
293	// same request. If you set both, your request returns a BadRequestException.
294	ShowSpeakerLabels *bool
295
296	// The name of the vocabulary to use when processing a medical transcription job.
297	VocabularyName *string
298}
299
300// The object used to call your custom language model to your transcription job.
301type ModelSettings struct {
302
303	// The name of your custom language model.
304	LanguageModelName *string
305}
306
307// Provides optional settings for the StartTranscriptionJob operation.
308type Settings struct {
309
310	// Instructs Amazon Transcribe to process each audio channel separately and then
311	// merge the transcription output of each channel into a single transcription.
312	// Amazon Transcribe also produces a transcription of each item detected on an
313	// audio channel, including the start time and end time of the item and alternative
314	// transcriptions of the item including the confidence that Amazon Transcribe has
315	// in the transcription. You can't set both ShowSpeakerLabels and
316	// ChannelIdentification in the same request. If you set both, your request returns
317	// a BadRequestException.
318	ChannelIdentification *bool
319
320	// The number of alternative transcriptions that the service should return. If you
321	// specify the MaxAlternatives field, you must set the ShowAlternatives field to
322	// true.
323	MaxAlternatives *int32
324
325	// The maximum number of speakers to identify in the input audio. If there are more
326	// speakers in the audio than this number, multiple speakers are identified as a
327	// single speaker. If you specify the MaxSpeakerLabels field, you must set the
328	// ShowSpeakerLabels field to true.
329	MaxSpeakerLabels *int32
330
331	// Determines whether the transcription contains alternative transcriptions. If you
332	// set the ShowAlternatives field to true, you must also set the maximum number of
333	// alternatives to return in the MaxAlternatives field.
334	ShowAlternatives *bool
335
336	// Determines whether the transcription job uses speaker recognition to identify
337	// different speakers in the input audio. Speaker recognition labels individual
338	// speakers in the audio file. If you set the ShowSpeakerLabels field to true, you
339	// must also set the maximum number of speaker labels MaxSpeakerLabels field. You
340	// can't set both ShowSpeakerLabels and ChannelIdentification in the same request.
341	// If you set both, your request returns a BadRequestException.
342	ShowSpeakerLabels *bool
343
344	// Set to mask to remove filtered text from the transcript and replace it with
345	// three asterisks ("***") as placeholder text. Set to remove to remove filtered
346	// text from the transcript without using placeholder text.
347	VocabularyFilterMethod VocabularyFilterMethod
348
349	// The name of the vocabulary filter to use when transcribing the audio. The filter
350	// that you specify must have the same language code as the transcription job.
351	VocabularyFilterName *string
352
353	// The name of a vocabulary to use when processing the transcription job.
354	VocabularyName *string
355}
356
357// Identifies the location of a transcription.
358type Transcript struct {
359
360	// The S3 object location of the redacted transcript. Use this URI to access the
361	// redacted transcript. If you specified an S3 bucket in the OutputBucketName field
362	// when you created the job, this is the URI of that bucket. If you chose to store
363	// the transcript in Amazon Transcribe, this is a shareable URL that provides
364	// secure access to that location.
365	RedactedTranscriptFileUri *string
366
367	// The S3 object location of the transcript. Use this URI to access the transcript.
368	// If you specified an S3 bucket in the OutputBucketName field when you created the
369	// job, this is the URI of that bucket. If you chose to store the transcript in
370	// Amazon Transcribe, this is a shareable URL that provides secure access to that
371	// location.
372	TranscriptFileUri *string
373}
374
375// Describes an asynchronous transcription job that was created with the
376// StartTranscriptionJob operation.
377type TranscriptionJob struct {
378
379	// A timestamp that shows when the job was completed.
380	CompletionTime *time.Time
381
382	// An object that describes content redaction settings for the transcription job.
383	ContentRedaction *ContentRedaction
384
385	// A timestamp that shows when the job was created.
386	CreationTime *time.Time
387
388	// If the TranscriptionJobStatus field is FAILED, this field contains information
389	// about why the job failed. The FailureReason field can contain one of the
390	// following values:
391	//
392	// * Unsupported media format - The media format specified in
393	// the MediaFormat field of the request isn't valid. See the description of the
394	// MediaFormat field for a list of valid values.
395	//
396	// * The media format provided does
397	// not match the detected media format - The media format of the audio file doesn't
398	// match the format specified in the MediaFormat field in the request. Check the
399	// media format of your media file and make sure that the two values match.
400	//
401	// *
402	// Invalid sample rate for audio file - The sample rate specified in the
403	// MediaSampleRateHertz of the request isn't valid. The sample rate must be between
404	// 8000 and 48000 Hertz.
405	//
406	// * The sample rate provided does not match the detected
407	// sample rate - The sample rate in the audio file doesn't match the sample rate
408	// specified in the MediaSampleRateHertz field in the request. Check the sample
409	// rate of your media file and make sure that the two values match.
410	//
411	// * Invalid file
412	// size: file size too large - The size of your audio file is larger than Amazon
413	// Transcribe can process. For more information, see Limits
414	// (https://docs.aws.amazon.com/transcribe/latest/dg/limits-guidelines.html#limits)
415	// in the Amazon Transcribe Developer Guide.
416	//
417	// * Invalid number of channels: number
418	// of channels too large - Your audio contains more channels than Amazon Transcribe
419	// is configured to process. To request additional channels, see Amazon Transcribe
420	// Limits
421	// (https://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits-amazon-transcribe)
422	// in the Amazon Web Services General Reference.
423	FailureReason *string
424
425	// A value between zero and one that Amazon Transcribe assigned to the language
426	// that it identified in the source audio. Larger values indicate that Amazon
427	// Transcribe has higher confidence in the language it identified.
428	IdentifiedLanguageScore *float32
429
430	// A value that shows if automatic language identification was enabled for a
431	// transcription job.
432	IdentifyLanguage *bool
433
434	// Provides information about how a transcription job is executed.
435	JobExecutionSettings *JobExecutionSettings
436
437	// The language code for the input speech.
438	LanguageCode LanguageCode
439
440	// An object that shows the optional array of languages inputted for transcription
441	// jobs with automatic language identification enabled.
442	LanguageOptions []LanguageCode
443
444	// An object that describes the input media for the transcription job.
445	Media *Media
446
447	// The format of the input media file.
448	MediaFormat MediaFormat
449
450	// The sample rate, in Hertz, of the audio track in the input media file.
451	MediaSampleRateHertz *int32
452
453	// An object containing the details of your custom language model.
454	ModelSettings *ModelSettings
455
456	// Optional settings for the transcription job. Use these settings to turn on
457	// speaker recognition, to set the maximum number of speakers that should be
458	// identified and to specify a custom vocabulary to use when processing the
459	// transcription job.
460	Settings *Settings
461
462	// A timestamp that shows with the job was started processing.
463	StartTime *time.Time
464
465	// An object that describes the output of the transcription job.
466	Transcript *Transcript
467
468	// The name of the transcription job.
469	TranscriptionJobName *string
470
471	// The status of the transcription job.
472	TranscriptionJobStatus TranscriptionJobStatus
473}
474
475// Provides a summary of information about a transcription job.
476type TranscriptionJobSummary struct {
477
478	// A timestamp that shows when the job was completed.
479	CompletionTime *time.Time
480
481	// The content redaction settings of the transcription job.
482	ContentRedaction *ContentRedaction
483
484	// A timestamp that shows when the job was created.
485	CreationTime *time.Time
486
487	// If the TranscriptionJobStatus field is FAILED, a description of the error.
488	FailureReason *string
489
490	// A value between zero and one that Amazon Transcribe assigned to the language it
491	// identified in the source audio. A higher score indicates that Amazon Transcribe
492	// is more confident in the language it identified.
493	IdentifiedLanguageScore *float32
494
495	// Whether automatic language identification was enabled for a transcription job.
496	IdentifyLanguage *bool
497
498	// The language code for the input speech.
499	LanguageCode LanguageCode
500
501	// The object used to call your custom language model to your transcription job.
502	ModelSettings *ModelSettings
503
504	// Indicates the location of the output of the transcription job. If the value is
505	// CUSTOMER_BUCKET then the location is the S3 bucket specified in the
506	// outputBucketName field when the transcription job was started with the
507	// StartTranscriptionJob operation. If the value is SERVICE_BUCKET then the output
508	// is stored by Amazon Transcribe and can be retrieved using the URI in the
509	// GetTranscriptionJob response's TranscriptFileUri field.
510	OutputLocationType OutputLocationType
511
512	// A timestamp that shows when the job started processing.
513	StartTime *time.Time
514
515	// The name of the transcription job.
516	TranscriptionJobName *string
517
518	// The status of the transcription job. When the status is COMPLETED, use the
519	// GetTranscriptionJob operation to get the results of the transcription.
520	TranscriptionJobStatus TranscriptionJobStatus
521}
522
523// Provides information about a vocabulary filter.
524type VocabularyFilterInfo struct {
525
526	// The language code of the words in the vocabulary filter.
527	LanguageCode LanguageCode
528
529	// The date and time that the vocabulary was last updated.
530	LastModifiedTime *time.Time
531
532	// The name of the vocabulary filter. The name must be unique in the account that
533	// holds the filter.
534	VocabularyFilterName *string
535}
536
537// Provides information about a custom vocabulary.
538type VocabularyInfo struct {
539
540	// The language code of the vocabulary entries.
541	LanguageCode LanguageCode
542
543	// The date and time that the vocabulary was last modified.
544	LastModifiedTime *time.Time
545
546	// The name of the vocabulary.
547	VocabularyName *string
548
549	// The processing state of the vocabulary. If the state is READY you can use the
550	// vocabulary in a StartTranscriptionJob request.
551	VocabularyState VocabularyState
552}
553