Skip to content

Commit 8419c39

Browse files
author
awstools
committed
feat(client-transcribe): This release adds an additional parameter for subtitling with Amazon Transcribe batch jobs: outputStartIndex.
1 parent d77b86b commit 8419c39

File tree

2 files changed

+34
-9
lines changed

2 files changed

+34
-9
lines changed

clients/client-transcribe/src/models/models_0.ts

Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ export interface CallAnalyticsJob {
447447
LanguageCode?: LanguageCode | string;
448448

449449
/**
450-
* <p>The sample rate, in Hertz, of the audio.</p>
450+
* <p>The sample rate, in Hertz, of the input audio.</p>
451451
*/
452452
MediaSampleRateHertz?: number;
453453

@@ -2433,13 +2433,14 @@ export enum SubtitleFormat {
24332433
}
24342434

24352435
/**
2436-
* <p>Choose the output format for your subtitle file and the S3 location where you want
2437-
* your file saved.</p>
2436+
* <p>The S3 location where your subtitle files are located. Note that your subtitle files are
2437+
* placed in the same location as your transcription output. Refer to
2438+
* <code>TranscriptFileUri</code> to download your files.</p>
24382439
*/
24392440
export interface SubtitlesOutput {
24402441
/**
2441-
* <p>Specify the output format for your subtitle file; if you select both SRT and VTT formats,
2442-
* two output files are generated.</p>
2442+
* <p>The format of your subtitle files. If your request specified both <code>srt</code> and
2443+
* <code>vtt</code> formats, both formats are shown.</p>
24432444
*/
24442445
Formats?: (SubtitleFormat | string)[];
24452446

@@ -2448,6 +2449,12 @@ export interface SubtitlesOutput {
24482449
* bucket.</p>
24492450
*/
24502451
SubtitleFileUris?: string[];
2452+
2453+
/**
2454+
* <p>Shows the output start index value for your subtitle files. If you did not specify a value
2455+
* in your request, the default value of <code>0</code> is used.</p>
2456+
*/
2457+
OutputStartIndex?: number;
24512458
}
24522459

24532460
export namespace SubtitlesOutput {
@@ -3831,13 +3838,24 @@ export namespace StartMedicalTranscriptionJobResponse {
38313838
}
38323839

38333840
/**
3834-
* <p>Generate subtitles for your batch transcription job.</p>
3841+
* <p>Generate subtitles for your batch transcription job. Note that your subtitle files are
3842+
* placed in the same location as your transcription output.</p>
38353843
*/
38363844
export interface Subtitles {
38373845
/**
3838-
* <p>Specify the output format for your subtitle file.</p>
3846+
* <p>Specify the output format for your subtitle file; if you select both <code>srt</code> and
3847+
* <code>vtt</code> formats, two output files are generated.</p>
38393848
*/
38403849
Formats?: (SubtitleFormat | string)[];
3850+
3851+
/**
3852+
* <p>Defines the starting value that is assigned to the first subtitle segment.</p>
3853+
* <p>The default start index for Amazon Transcribe is <code>0</code>, which differs from
3854+
* the more widely used standard of <code>1</code>. If you're uncertain which value to use,
3855+
* we recommend choosing <code>1</code>, as this may improve compatibility with other
3856+
* services.</p>
3857+
*/
3858+
OutputStartIndex?: number;
38413859
}
38423860

38433861
export namespace Subtitles {
@@ -3859,7 +3877,9 @@ export interface StartTranscriptionJobRequest {
38593877
TranscriptionJobName: string | undefined;
38603878

38613879
/**
3862-
* <p>The language code for the language used in the input media file.</p>
3880+
* <p>The language code for the language used in the input media file. You must include
3881+
* either <code>LanguageCode</code> or <code>IdentifyLanguage</code> in your
3882+
* request.</p>
38633883
* <p>To transcribe speech in Modern Standard Arabic (ar-SA), your audio or video file must
38643884
* be encoded at a sample rate of 16,000 Hz or higher.</p>
38653885
*/
@@ -3989,6 +4009,8 @@ export interface StartTranscriptionJobRequest {
39894009
* Automatic language identification is disabled by default. You receive a
39904010
* <code>BadRequestException</code> error if you enter a value for a
39914011
* <code>LanguageCode</code>.</p>
4012+
* <p>You must include either <code>LanguageCode</code> or
4013+
* <code>IdentifyLanguage</code> in your request.</p>
39924014
*/
39934015
IdentifyLanguage?: boolean;
39944016

@@ -4030,7 +4052,7 @@ export namespace StartTranscriptionJobRequest {
40304052

40314053
export interface StartTranscriptionJobResponse {
40324054
/**
4033-
* <p>An object containing details of the asynchronous transcription job.</p>
4055+
* <p>Provides information about your asynchronous transcription job.</p>
40344056
*/
40354057
TranscriptionJob?: TranscriptionJob;
40364058
}

clients/client-transcribe/src/protocols/Aws_json1_1.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3595,6 +3595,8 @@ const serializeAws_json1_1Subtitles = (input: Subtitles, context: __SerdeContext
35953595
return {
35963596
...(input.Formats !== undefined &&
35973597
input.Formats !== null && { Formats: serializeAws_json1_1SubtitleFormats(input.Formats, context) }),
3598+
...(input.OutputStartIndex !== undefined &&
3599+
input.OutputStartIndex !== null && { OutputStartIndex: input.OutputStartIndex }),
35983600
};
35993601
};
36003602

@@ -4667,6 +4669,7 @@ const deserializeAws_json1_1SubtitlesOutput = (output: any, context: __SerdeCont
46674669
output.Formats !== undefined && output.Formats !== null
46684670
? deserializeAws_json1_1SubtitleFormats(output.Formats, context)
46694671
: undefined,
4672+
OutputStartIndex: __expectInt32(output.OutputStartIndex),
46704673
SubtitleFileUris:
46714674
output.SubtitleFileUris !== undefined && output.SubtitleFileUris !== null
46724675
? deserializeAws_json1_1SubtitleFileUris(output.SubtitleFileUris, context)

0 commit comments

Comments
 (0)