Skip to content

Commit

Permalink
feat(client-transcribe): This update provides error messaging for gen…
Browse files Browse the repository at this point in the history
…erative call summarization in Transcribe Call Analytics
  • Loading branch information
awstools committed Apr 29, 2024
1 parent 9bfe9ac commit 671315c
Show file tree
Hide file tree
Showing 6 changed files with 202 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,15 @@ export interface GetCallAnalyticsJobCommandOutput extends GetCallAnalyticsJobRes
* // CallAnalyticsJob: { // CallAnalyticsJob
* // CallAnalyticsJobName: "STRING_VALUE",
* // CallAnalyticsJobStatus: "QUEUED" || "IN_PROGRESS" || "FAILED" || "COMPLETED",
* // CallAnalyticsJobDetails: { // CallAnalyticsJobDetails
* // Skipped: [ // CallAnalyticsSkippedFeatureList
* // { // CallAnalyticsSkippedFeature
* // Feature: "GENERATIVE_SUMMARIZATION",
* // ReasonCode: "INSUFFICIENT_CONVERSATION_CONTENT" || "FAILED_SAFETY_GUIDELINES",
* // Message: "STRING_VALUE",
* // },
* // ],
* // },
* // 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",
* // MediaSampleRateHertz: Number("int"),
* // MediaFormat: "mp3" || "mp4" || "wav" || "flac" || "ogg" || "amr" || "webm" || "m4a",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,15 @@ export interface ListCallAnalyticsJobsCommandOutput extends ListCallAnalyticsJob
* // CompletionTime: new Date("TIMESTAMP"),
* // 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",
* // CallAnalyticsJobStatus: "QUEUED" || "IN_PROGRESS" || "FAILED" || "COMPLETED",
* // CallAnalyticsJobDetails: { // CallAnalyticsJobDetails
* // Skipped: [ // CallAnalyticsSkippedFeatureList
* // { // CallAnalyticsSkippedFeature
* // Feature: "GENERATIVE_SUMMARIZATION",
* // ReasonCode: "INSUFFICIENT_CONVERSATION_CONTENT" || "FAILED_SAFETY_GUIDELINES",
* // Message: "STRING_VALUE",
* // },
* // ],
* // },
* // FailureReason: "STRING_VALUE",
* // },
* // ],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,15 @@ export interface StartCallAnalyticsJobCommandOutput extends StartCallAnalyticsJo
* // CallAnalyticsJob: { // CallAnalyticsJob
* // CallAnalyticsJobName: "STRING_VALUE",
* // CallAnalyticsJobStatus: "QUEUED" || "IN_PROGRESS" || "FAILED" || "COMPLETED",
* // CallAnalyticsJobDetails: { // CallAnalyticsJobDetails
* // Skipped: [ // CallAnalyticsSkippedFeatureList
* // { // CallAnalyticsSkippedFeature
* // Feature: "GENERATIVE_SUMMARIZATION",
* // ReasonCode: "INSUFFICIENT_CONVERSATION_CONTENT" || "FAILED_SAFETY_GUIDELINES",
* // Message: "STRING_VALUE",
* // },
* // ],
* // },
* // 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",
* // MediaSampleRateHertz: Number("int"),
* // MediaFormat: "mp3" || "mp4" || "wav" || "flac" || "ogg" || "amr" || "webm" || "m4a",
Expand Down
80 changes: 80 additions & 0 deletions clients/client-transcribe/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,74 @@ export const BaseModelName = {
*/
export type BaseModelName = (typeof BaseModelName)[keyof typeof BaseModelName];

/**
* @public
* @enum
*/
export const CallAnalyticsFeature = {
GENERATIVE_SUMMARIZATION: "GENERATIVE_SUMMARIZATION",
} as const;

/**
* @public
*/
export type CallAnalyticsFeature = (typeof CallAnalyticsFeature)[keyof typeof CallAnalyticsFeature];

/**
* @public
* @enum
*/
export const CallAnalyticsSkippedReasonCode = {
FAILED_SAFETY_GUIDELINES: "FAILED_SAFETY_GUIDELINES",
INSUFFICIENT_CONVERSATION_CONTENT: "INSUFFICIENT_CONVERSATION_CONTENT",
} as const;

/**
* @public
*/
export type CallAnalyticsSkippedReasonCode =
(typeof CallAnalyticsSkippedReasonCode)[keyof typeof CallAnalyticsSkippedReasonCode];

/**
* <p>Represents a skipped analytics feature during the analysis of a call analytics job.</p>
* <p>The <code>Feature</code> field indicates the type of analytics feature that was skipped.</p>
* <p>The <code>Message</code> field contains additional information or a message explaining why the analytics feature was skipped.</p>
* <p>The <code>ReasonCode</code> field provides a code indicating the reason why the analytics feature was skipped.</p>
* @public
*/
export interface CallAnalyticsSkippedFeature {
/**
* <p>Indicates the type of analytics feature that was skipped during the analysis of a call analytics job.</p>
* @public
*/
Feature?: CallAnalyticsFeature;

/**
* <p>Provides a code indicating the reason why a specific analytics feature was skipped during the analysis of a call analytics job.</p>
* @public
*/
ReasonCode?: CallAnalyticsSkippedReasonCode;

/**
* <p>Contains additional information or a message explaining why a specific analytics feature was skipped during the analysis of a call analytics job.</p>
* @public
*/
Message?: string;
}

/**
* <p>Contains details about a call analytics job, including information about skipped analytics features.</p>
* @public
*/
export interface CallAnalyticsJobDetails {
/**
* <p>Contains information about any skipped analytics features during the analysis of a call analytics job.</p>
* <p>This array lists all the analytics features that were skipped, along with their corresponding reason code and message.</p>
* @public
*/
Skipped?: CallAnalyticsSkippedFeature[];
}

/**
* @public
* @enum
Expand Down Expand Up @@ -715,6 +783,12 @@ export interface CallAnalyticsJob {
*/
CallAnalyticsJobStatus?: CallAnalyticsJobStatus;

/**
* <p>Provides detailed information about a call analytics job, including information about skipped analytics features.</p>
* @public
*/
CallAnalyticsJobDetails?: CallAnalyticsJobDetails;

/**
* <p>The language code used to create your Call Analytics job. For a list of supported
* 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>
Expand Down Expand Up @@ -920,6 +994,12 @@ export interface CallAnalyticsJobSummary {
*/
CallAnalyticsJobStatus?: CallAnalyticsJobStatus;

/**
* <p>Provides detailed information about a call analytics job, including information about skipped analytics features.</p>
* @public
*/
CallAnalyticsJobDetails?: CallAnalyticsJobDetails;

/**
* <p>If <code>CallAnalyticsJobStatus</code> is <code>FAILED</code>,
* <code>FailureReason</code> contains information about why the Call Analytics job
Expand Down
8 changes: 8 additions & 0 deletions clients/client-transcribe/src/protocols/Aws_json1_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1970,6 +1970,7 @@ const de_NotFoundExceptionRes = async (parsedOutput: any, context: __SerdeContex
*/
const de_CallAnalyticsJob = (output: any, context: __SerdeContext): CallAnalyticsJob => {
return take(output, {
CallAnalyticsJobDetails: _json,
CallAnalyticsJobName: __expectString,
CallAnalyticsJobStatus: __expectString,
ChannelDefinitions: _json,
Expand All @@ -1988,6 +1989,8 @@ const de_CallAnalyticsJob = (output: any, context: __SerdeContext): CallAnalytic
}) as any;
};

// de_CallAnalyticsJobDetails omitted.

// de_CallAnalyticsJobSettings omitted.

/**
Expand All @@ -2007,6 +2010,7 @@ const de_CallAnalyticsJobSummaries = (output: any, context: __SerdeContext): Cal
*/
const de_CallAnalyticsJobSummary = (output: any, context: __SerdeContext): CallAnalyticsJobSummary => {
return take(output, {
CallAnalyticsJobDetails: _json,
CallAnalyticsJobName: __expectString,
CallAnalyticsJobStatus: __expectString,
CompletionTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
Expand All @@ -2017,6 +2021,10 @@ const de_CallAnalyticsJobSummary = (output: any, context: __SerdeContext): CallA
}) as any;
};

// de_CallAnalyticsSkippedFeature omitted.

// de_CallAnalyticsSkippedFeatureList omitted.

/**
* deserializeAws_json1_1CategoryProperties
*/
Expand Down
88 changes: 87 additions & 1 deletion codegen/sdk-codegen/aws-models/transcribe.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,17 @@
}
}
},
"com.amazonaws.transcribe#CallAnalyticsFeature": {
"type": "enum",
"members": {
"GENERATIVE_SUMMARIZATION": {
"target": "smithy.api#Unit",
"traits": {
"smithy.api#enumValue": "GENERATIVE_SUMMARIZATION"
}
}
}
},
"com.amazonaws.transcribe#CallAnalyticsJob": {
"type": "structure",
"members": {
Expand All @@ -156,6 +167,12 @@
"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>"
}
},
"CallAnalyticsJobDetails": {
"target": "com.amazonaws.transcribe#CallAnalyticsJobDetails",
"traits": {
"smithy.api#documentation": "<p>Provides detailed information about a call analytics job, including information about skipped analytics features.</p>"
}
},
"LanguageCode": {
"target": "com.amazonaws.transcribe#LanguageCode",
"traits": {
Expand Down Expand Up @@ -236,6 +253,20 @@
"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>"
}
},
"com.amazonaws.transcribe#CallAnalyticsJobDetails": {
"type": "structure",
"members": {
"Skipped": {
"target": "com.amazonaws.transcribe#CallAnalyticsSkippedFeatureList",
"traits": {
"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>"
}
}
},
"traits": {
"smithy.api#documentation": "<p>Contains details about a call analytics job, including information about skipped analytics features.</p>"
}
},
"com.amazonaws.transcribe#CallAnalyticsJobName": {
"type": "string",
"traits": {
Expand Down Expand Up @@ -373,6 +404,12 @@
"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>"
}
},
"CallAnalyticsJobDetails": {
"target": "com.amazonaws.transcribe#CallAnalyticsJobDetails",
"traits": {
"smithy.api#documentation": "<p>Provides detailed information about a call analytics job, including information about skipped analytics features.</p>"
}
},
"FailureReason": {
"target": "com.amazonaws.transcribe#FailureReason",
"traits": {
Expand All @@ -384,6 +421,55 @@
"smithy.api#documentation": "<p>Provides detailed information about a specific Call Analytics job.</p>"
}
},
"com.amazonaws.transcribe#CallAnalyticsSkippedFeature": {
"type": "structure",
"members": {
"Feature": {
"target": "com.amazonaws.transcribe#CallAnalyticsFeature",
"traits": {
"smithy.api#documentation": "<p>Indicates the type of analytics feature that was skipped during the analysis of a call analytics job.</p>"
}
},
"ReasonCode": {
"target": "com.amazonaws.transcribe#CallAnalyticsSkippedReasonCode",
"traits": {
"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>"
}
},
"Message": {
"target": "com.amazonaws.transcribe#String",
"traits": {
"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>"
}
}
},
"traits": {
"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>"
}
},
"com.amazonaws.transcribe#CallAnalyticsSkippedFeatureList": {
"type": "list",
"member": {
"target": "com.amazonaws.transcribe#CallAnalyticsSkippedFeature"
}
},
"com.amazonaws.transcribe#CallAnalyticsSkippedReasonCode": {
"type": "enum",
"members": {
"INSUFFICIENT_CONVERSATION_CONTENT": {
"target": "smithy.api#Unit",
"traits": {
"smithy.api#enumValue": "INSUFFICIENT_CONVERSATION_CONTENT"
}
},
"FAILED_SAFETY_GUIDELINES": {
"target": "smithy.api#Unit",
"traits": {
"smithy.api#enumValue": "FAILED_SAFETY_GUIDELINES"
}
}
}
},
"com.amazonaws.transcribe#CategoryName": {
"type": "string",
"traits": {
Expand Down Expand Up @@ -3927,7 +4013,7 @@
"traits": {
"smithy.api#range": {
"min": 2,
"max": 10
"max": 30
}
}
},
Expand Down

0 comments on commit 671315c

Please sign in to comment.