Skip to content

Commit 671315c

Browse files
author
awstools
committed
feat(client-transcribe): This update provides error messaging for generative call summarization in Transcribe Call Analytics
1 parent 9bfe9ac commit 671315c

File tree

6 files changed

+202
-1
lines changed

6 files changed

+202
-1
lines changed

clients/client-transcribe/src/commands/GetCallAnalyticsJobCommand.ts

+9
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,15 @@ export interface GetCallAnalyticsJobCommandOutput extends GetCallAnalyticsJobRes
5454
* // CallAnalyticsJob: { // CallAnalyticsJob
5555
* // CallAnalyticsJobName: "STRING_VALUE",
5656
* // CallAnalyticsJobStatus: "QUEUED" || "IN_PROGRESS" || "FAILED" || "COMPLETED",
57+
* // CallAnalyticsJobDetails: { // CallAnalyticsJobDetails
58+
* // Skipped: [ // CallAnalyticsSkippedFeatureList
59+
* // { // CallAnalyticsSkippedFeature
60+
* // Feature: "GENERATIVE_SUMMARIZATION",
61+
* // ReasonCode: "INSUFFICIENT_CONVERSATION_CONTENT" || "FAILED_SAFETY_GUIDELINES",
62+
* // Message: "STRING_VALUE",
63+
* // },
64+
* // ],
65+
* // },
5766
* // LanguageCode: "af-ZA" || "ar-AE" || "ar-SA" || "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" || "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" || "zh-TW" || "th-TH" || "en-ZA" || "en-NZ" || "vi-VN" || "sv-SE" || "ab-GE" || "ast-ES" || "az-AZ" || "ba-RU" || "be-BY" || "bg-BG" || "bn-IN" || "bs-BA" || "ca-ES" || "ckb-IQ" || "ckb-IR" || "cs-CZ" || "cy-WL" || "el-GR" || "et-ET" || "eu-ES" || "fi-FI" || "gl-ES" || "gu-IN" || "ha-NG" || "hr-HR" || "hu-HU" || "hy-AM" || "is-IS" || "ka-GE" || "kab-DZ" || "kk-KZ" || "kn-IN" || "ky-KG" || "lg-IN" || "lt-LT" || "lv-LV" || "mhr-RU" || "mi-NZ" || "mk-MK" || "ml-IN" || "mn-MN" || "mr-IN" || "mt-MT" || "no-NO" || "or-IN" || "pa-IN" || "pl-PL" || "ps-AF" || "ro-RO" || "rw-RW" || "si-LK" || "sk-SK" || "sl-SI" || "so-SO" || "sr-RS" || "su-ID" || "sw-BI" || "sw-KE" || "sw-RW" || "sw-TZ" || "sw-UG" || "tl-PH" || "tt-RU" || "ug-CN" || "uk-UA" || "uz-UZ" || "wo-SN" || "zu-ZA",
5867
* // MediaSampleRateHertz: Number("int"),
5968
* // MediaFormat: "mp3" || "mp4" || "wav" || "flac" || "ogg" || "amr" || "webm" || "m4a",

clients/client-transcribe/src/commands/ListCallAnalyticsJobsCommand.ts

+9
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,15 @@ export interface ListCallAnalyticsJobsCommandOutput extends ListCallAnalyticsJob
5555
* // CompletionTime: new Date("TIMESTAMP"),
5656
* // LanguageCode: "af-ZA" || "ar-AE" || "ar-SA" || "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" || "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" || "zh-TW" || "th-TH" || "en-ZA" || "en-NZ" || "vi-VN" || "sv-SE" || "ab-GE" || "ast-ES" || "az-AZ" || "ba-RU" || "be-BY" || "bg-BG" || "bn-IN" || "bs-BA" || "ca-ES" || "ckb-IQ" || "ckb-IR" || "cs-CZ" || "cy-WL" || "el-GR" || "et-ET" || "eu-ES" || "fi-FI" || "gl-ES" || "gu-IN" || "ha-NG" || "hr-HR" || "hu-HU" || "hy-AM" || "is-IS" || "ka-GE" || "kab-DZ" || "kk-KZ" || "kn-IN" || "ky-KG" || "lg-IN" || "lt-LT" || "lv-LV" || "mhr-RU" || "mi-NZ" || "mk-MK" || "ml-IN" || "mn-MN" || "mr-IN" || "mt-MT" || "no-NO" || "or-IN" || "pa-IN" || "pl-PL" || "ps-AF" || "ro-RO" || "rw-RW" || "si-LK" || "sk-SK" || "sl-SI" || "so-SO" || "sr-RS" || "su-ID" || "sw-BI" || "sw-KE" || "sw-RW" || "sw-TZ" || "sw-UG" || "tl-PH" || "tt-RU" || "ug-CN" || "uk-UA" || "uz-UZ" || "wo-SN" || "zu-ZA",
5757
* // CallAnalyticsJobStatus: "QUEUED" || "IN_PROGRESS" || "FAILED" || "COMPLETED",
58+
* // CallAnalyticsJobDetails: { // CallAnalyticsJobDetails
59+
* // Skipped: [ // CallAnalyticsSkippedFeatureList
60+
* // { // CallAnalyticsSkippedFeature
61+
* // Feature: "GENERATIVE_SUMMARIZATION",
62+
* // ReasonCode: "INSUFFICIENT_CONVERSATION_CONTENT" || "FAILED_SAFETY_GUIDELINES",
63+
* // Message: "STRING_VALUE",
64+
* // },
65+
* // ],
66+
* // },
5867
* // FailureReason: "STRING_VALUE",
5968
* // },
6069
* // ],

clients/client-transcribe/src/commands/StartCallAnalyticsJobCommand.ts

+9
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,15 @@ export interface StartCallAnalyticsJobCommandOutput extends StartCallAnalyticsJo
132132
* // CallAnalyticsJob: { // CallAnalyticsJob
133133
* // CallAnalyticsJobName: "STRING_VALUE",
134134
* // CallAnalyticsJobStatus: "QUEUED" || "IN_PROGRESS" || "FAILED" || "COMPLETED",
135+
* // CallAnalyticsJobDetails: { // CallAnalyticsJobDetails
136+
* // Skipped: [ // CallAnalyticsSkippedFeatureList
137+
* // { // CallAnalyticsSkippedFeature
138+
* // Feature: "GENERATIVE_SUMMARIZATION",
139+
* // ReasonCode: "INSUFFICIENT_CONVERSATION_CONTENT" || "FAILED_SAFETY_GUIDELINES",
140+
* // Message: "STRING_VALUE",
141+
* // },
142+
* // ],
143+
* // },
135144
* // LanguageCode: "af-ZA" || "ar-AE" || "ar-SA" || "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" || "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" || "zh-TW" || "th-TH" || "en-ZA" || "en-NZ" || "vi-VN" || "sv-SE" || "ab-GE" || "ast-ES" || "az-AZ" || "ba-RU" || "be-BY" || "bg-BG" || "bn-IN" || "bs-BA" || "ca-ES" || "ckb-IQ" || "ckb-IR" || "cs-CZ" || "cy-WL" || "el-GR" || "et-ET" || "eu-ES" || "fi-FI" || "gl-ES" || "gu-IN" || "ha-NG" || "hr-HR" || "hu-HU" || "hy-AM" || "is-IS" || "ka-GE" || "kab-DZ" || "kk-KZ" || "kn-IN" || "ky-KG" || "lg-IN" || "lt-LT" || "lv-LV" || "mhr-RU" || "mi-NZ" || "mk-MK" || "ml-IN" || "mn-MN" || "mr-IN" || "mt-MT" || "no-NO" || "or-IN" || "pa-IN" || "pl-PL" || "ps-AF" || "ro-RO" || "rw-RW" || "si-LK" || "sk-SK" || "sl-SI" || "so-SO" || "sr-RS" || "su-ID" || "sw-BI" || "sw-KE" || "sw-RW" || "sw-TZ" || "sw-UG" || "tl-PH" || "tt-RU" || "ug-CN" || "uk-UA" || "uz-UZ" || "wo-SN" || "zu-ZA",
136145
* // MediaSampleRateHertz: Number("int"),
137146
* // MediaFormat: "mp3" || "mp4" || "wav" || "flac" || "ogg" || "amr" || "webm" || "m4a",

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

+80
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,74 @@ export const BaseModelName = {
9191
*/
9292
export type BaseModelName = (typeof BaseModelName)[keyof typeof BaseModelName];
9393

94+
/**
95+
* @public
96+
* @enum
97+
*/
98+
export const CallAnalyticsFeature = {
99+
GENERATIVE_SUMMARIZATION: "GENERATIVE_SUMMARIZATION",
100+
} as const;
101+
102+
/**
103+
* @public
104+
*/
105+
export type CallAnalyticsFeature = (typeof CallAnalyticsFeature)[keyof typeof CallAnalyticsFeature];
106+
107+
/**
108+
* @public
109+
* @enum
110+
*/
111+
export const CallAnalyticsSkippedReasonCode = {
112+
FAILED_SAFETY_GUIDELINES: "FAILED_SAFETY_GUIDELINES",
113+
INSUFFICIENT_CONVERSATION_CONTENT: "INSUFFICIENT_CONVERSATION_CONTENT",
114+
} as const;
115+
116+
/**
117+
* @public
118+
*/
119+
export type CallAnalyticsSkippedReasonCode =
120+
(typeof CallAnalyticsSkippedReasonCode)[keyof typeof CallAnalyticsSkippedReasonCode];
121+
122+
/**
123+
* <p>Represents a skipped analytics feature during the analysis of a call analytics job.</p>
124+
* <p>The <code>Feature</code> field indicates the type of analytics feature that was skipped.</p>
125+
* <p>The <code>Message</code> field contains additional information or a message explaining why the analytics feature was skipped.</p>
126+
* <p>The <code>ReasonCode</code> field provides a code indicating the reason why the analytics feature was skipped.</p>
127+
* @public
128+
*/
129+
export interface CallAnalyticsSkippedFeature {
130+
/**
131+
* <p>Indicates the type of analytics feature that was skipped during the analysis of a call analytics job.</p>
132+
* @public
133+
*/
134+
Feature?: CallAnalyticsFeature;
135+
136+
/**
137+
* <p>Provides a code indicating the reason why a specific analytics feature was skipped during the analysis of a call analytics job.</p>
138+
* @public
139+
*/
140+
ReasonCode?: CallAnalyticsSkippedReasonCode;
141+
142+
/**
143+
* <p>Contains additional information or a message explaining why a specific analytics feature was skipped during the analysis of a call analytics job.</p>
144+
* @public
145+
*/
146+
Message?: string;
147+
}
148+
149+
/**
150+
* <p>Contains details about a call analytics job, including information about skipped analytics features.</p>
151+
* @public
152+
*/
153+
export interface CallAnalyticsJobDetails {
154+
/**
155+
* <p>Contains information about any skipped analytics features during the analysis of a call analytics job.</p>
156+
* <p>This array lists all the analytics features that were skipped, along with their corresponding reason code and message.</p>
157+
* @public
158+
*/
159+
Skipped?: CallAnalyticsSkippedFeature[];
160+
}
161+
94162
/**
95163
* @public
96164
* @enum
@@ -715,6 +783,12 @@ export interface CallAnalyticsJob {
715783
*/
716784
CallAnalyticsJobStatus?: CallAnalyticsJobStatus;
717785

786+
/**
787+
* <p>Provides detailed information about a call analytics job, including information about skipped analytics features.</p>
788+
* @public
789+
*/
790+
CallAnalyticsJobDetails?: CallAnalyticsJobDetails;
791+
718792
/**
719793
* <p>The language code used to create your Call Analytics job. For a list of supported
720794
* languages and their associated language codes, refer to the <a href="https://docs.aws.amazon.com/transcribe/latest/dg/supported-languages.html">Supported languages</a>
@@ -920,6 +994,12 @@ export interface CallAnalyticsJobSummary {
920994
*/
921995
CallAnalyticsJobStatus?: CallAnalyticsJobStatus;
922996

997+
/**
998+
* <p>Provides detailed information about a call analytics job, including information about skipped analytics features.</p>
999+
* @public
1000+
*/
1001+
CallAnalyticsJobDetails?: CallAnalyticsJobDetails;
1002+
9231003
/**
9241004
* <p>If <code>CallAnalyticsJobStatus</code> is <code>FAILED</code>,
9251005
* <code>FailureReason</code> contains information about why the Call Analytics job

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

+8
Original file line numberDiff line numberDiff line change
@@ -1970,6 +1970,7 @@ const de_NotFoundExceptionRes = async (parsedOutput: any, context: __SerdeContex
19701970
*/
19711971
const de_CallAnalyticsJob = (output: any, context: __SerdeContext): CallAnalyticsJob => {
19721972
return take(output, {
1973+
CallAnalyticsJobDetails: _json,
19731974
CallAnalyticsJobName: __expectString,
19741975
CallAnalyticsJobStatus: __expectString,
19751976
ChannelDefinitions: _json,
@@ -1988,6 +1989,8 @@ const de_CallAnalyticsJob = (output: any, context: __SerdeContext): CallAnalytic
19881989
}) as any;
19891990
};
19901991

1992+
// de_CallAnalyticsJobDetails omitted.
1993+
19911994
// de_CallAnalyticsJobSettings omitted.
19921995

19931996
/**
@@ -2007,6 +2010,7 @@ const de_CallAnalyticsJobSummaries = (output: any, context: __SerdeContext): Cal
20072010
*/
20082011
const de_CallAnalyticsJobSummary = (output: any, context: __SerdeContext): CallAnalyticsJobSummary => {
20092012
return take(output, {
2013+
CallAnalyticsJobDetails: _json,
20102014
CallAnalyticsJobName: __expectString,
20112015
CallAnalyticsJobStatus: __expectString,
20122016
CompletionTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
@@ -2017,6 +2021,10 @@ const de_CallAnalyticsJobSummary = (output: any, context: __SerdeContext): CallA
20172021
}) as any;
20182022
};
20192023

2024+
// de_CallAnalyticsSkippedFeature omitted.
2025+
2026+
// de_CallAnalyticsSkippedFeatureList omitted.
2027+
20202028
/**
20212029
* deserializeAws_json1_1CategoryProperties
20222030
*/

codegen/sdk-codegen/aws-models/transcribe.json

+87-1
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,17 @@
141141
}
142142
}
143143
},
144+
"com.amazonaws.transcribe#CallAnalyticsFeature": {
145+
"type": "enum",
146+
"members": {
147+
"GENERATIVE_SUMMARIZATION": {
148+
"target": "smithy.api#Unit",
149+
"traits": {
150+
"smithy.api#enumValue": "GENERATIVE_SUMMARIZATION"
151+
}
152+
}
153+
}
154+
},
144155
"com.amazonaws.transcribe#CallAnalyticsJob": {
145156
"type": "structure",
146157
"members": {
@@ -156,6 +167,12 @@
156167
"smithy.api#documentation": "<p>Provides the status of the specified Call Analytics job.</p>\n <p>If the status is <code>COMPLETED</code>, the job is finished and you can find the\n results at the location specified in <code>TranscriptFileUri</code> (or\n <code>RedactedTranscriptFileUri</code>, if you requested transcript redaction). If\n the status is <code>FAILED</code>, <code>FailureReason</code> provides details on why\n your transcription job failed.</p>"
157168
}
158169
},
170+
"CallAnalyticsJobDetails": {
171+
"target": "com.amazonaws.transcribe#CallAnalyticsJobDetails",
172+
"traits": {
173+
"smithy.api#documentation": "<p>Provides detailed information about a call analytics job, including information about skipped analytics features.</p>"
174+
}
175+
},
159176
"LanguageCode": {
160177
"target": "com.amazonaws.transcribe#LanguageCode",
161178
"traits": {
@@ -236,6 +253,20 @@
236253
"smithy.api#documentation": "<p>Provides detailed information about a Call Analytics job.</p>\n <p>To view the job's status, refer to <code>CallAnalyticsJobStatus</code>. If the status\n is <code>COMPLETED</code>, the job is finished. You can find your completed transcript\n at the URI specified in <code>TranscriptFileUri</code>. If the status is\n <code>FAILED</code>, <code>FailureReason</code> provides details on why your\n transcription job failed.</p>\n <p>If you enabled personally identifiable information (PII) redaction, the redacted\n transcript appears at the location specified in\n <code>RedactedTranscriptFileUri</code>.</p>\n <p>If you chose to redact the audio in your media file, you can find your redacted media\n file at the location specified in the <code>RedactedMediaFileUri</code> field of your\n response.</p>"
237254
}
238255
},
256+
"com.amazonaws.transcribe#CallAnalyticsJobDetails": {
257+
"type": "structure",
258+
"members": {
259+
"Skipped": {
260+
"target": "com.amazonaws.transcribe#CallAnalyticsSkippedFeatureList",
261+
"traits": {
262+
"smithy.api#documentation": "<p>Contains information about any skipped analytics features during the analysis of a call analytics job.</p>\n <p>This array lists all the analytics features that were skipped, along with their corresponding reason code and message.</p>"
263+
}
264+
}
265+
},
266+
"traits": {
267+
"smithy.api#documentation": "<p>Contains details about a call analytics job, including information about skipped analytics features.</p>"
268+
}
269+
},
239270
"com.amazonaws.transcribe#CallAnalyticsJobName": {
240271
"type": "string",
241272
"traits": {
@@ -373,6 +404,12 @@
373404
"smithy.api#documentation": "<p>Provides the status of your Call Analytics job.</p>\n <p>If the status is <code>COMPLETED</code>, the job is finished and you can find the\n results at the location specified in <code>TranscriptFileUri</code> (or\n <code>RedactedTranscriptFileUri</code>, if you requested transcript redaction). If\n the status is <code>FAILED</code>, <code>FailureReason</code> provides details on why\n your transcription job failed.</p>"
374405
}
375406
},
407+
"CallAnalyticsJobDetails": {
408+
"target": "com.amazonaws.transcribe#CallAnalyticsJobDetails",
409+
"traits": {
410+
"smithy.api#documentation": "<p>Provides detailed information about a call analytics job, including information about skipped analytics features.</p>"
411+
}
412+
},
376413
"FailureReason": {
377414
"target": "com.amazonaws.transcribe#FailureReason",
378415
"traits": {
@@ -384,6 +421,55 @@
384421
"smithy.api#documentation": "<p>Provides detailed information about a specific Call Analytics job.</p>"
385422
}
386423
},
424+
"com.amazonaws.transcribe#CallAnalyticsSkippedFeature": {
425+
"type": "structure",
426+
"members": {
427+
"Feature": {
428+
"target": "com.amazonaws.transcribe#CallAnalyticsFeature",
429+
"traits": {
430+
"smithy.api#documentation": "<p>Indicates the type of analytics feature that was skipped during the analysis of a call analytics job.</p>"
431+
}
432+
},
433+
"ReasonCode": {
434+
"target": "com.amazonaws.transcribe#CallAnalyticsSkippedReasonCode",
435+
"traits": {
436+
"smithy.api#documentation": "<p>Provides a code indicating the reason why a specific analytics feature was skipped during the analysis of a call analytics job.</p>"
437+
}
438+
},
439+
"Message": {
440+
"target": "com.amazonaws.transcribe#String",
441+
"traits": {
442+
"smithy.api#documentation": "<p>Contains additional information or a message explaining why a specific analytics feature was skipped during the analysis of a call analytics job.</p>"
443+
}
444+
}
445+
},
446+
"traits": {
447+
"smithy.api#documentation": "<p>Represents a skipped analytics feature during the analysis of a call analytics job.</p>\n <p>The <code>Feature</code> field indicates the type of analytics feature that was skipped.</p>\n <p>The <code>Message</code> field contains additional information or a message explaining why the analytics feature was skipped.</p>\n <p>The <code>ReasonCode</code> field provides a code indicating the reason why the analytics feature was skipped.</p>"
448+
}
449+
},
450+
"com.amazonaws.transcribe#CallAnalyticsSkippedFeatureList": {
451+
"type": "list",
452+
"member": {
453+
"target": "com.amazonaws.transcribe#CallAnalyticsSkippedFeature"
454+
}
455+
},
456+
"com.amazonaws.transcribe#CallAnalyticsSkippedReasonCode": {
457+
"type": "enum",
458+
"members": {
459+
"INSUFFICIENT_CONVERSATION_CONTENT": {
460+
"target": "smithy.api#Unit",
461+
"traits": {
462+
"smithy.api#enumValue": "INSUFFICIENT_CONVERSATION_CONTENT"
463+
}
464+
},
465+
"FAILED_SAFETY_GUIDELINES": {
466+
"target": "smithy.api#Unit",
467+
"traits": {
468+
"smithy.api#enumValue": "FAILED_SAFETY_GUIDELINES"
469+
}
470+
}
471+
}
472+
},
387473
"com.amazonaws.transcribe#CategoryName": {
388474
"type": "string",
389475
"traits": {
@@ -3927,7 +4013,7 @@
39274013
"traits": {
39284014
"smithy.api#range": {
39294015
"min": 2,
3930-
"max": 10
4016+
"max": 30
39314017
}
39324018
}
39334019
},

0 commit comments

Comments
 (0)