diff --git a/clients/client-transcribe/src/commands/GetTranscriptionJobCommand.ts b/clients/client-transcribe/src/commands/GetTranscriptionJobCommand.ts index c26a6886853c..44a944228338 100644 --- a/clients/client-transcribe/src/commands/GetTranscriptionJobCommand.ts +++ b/clients/client-transcribe/src/commands/GetTranscriptionJobCommand.ts @@ -134,6 +134,13 @@ export interface GetTranscriptionJobCommandOutput extends GetTranscriptionJobRes * // LanguageModelName: "STRING_VALUE", * // }, * // }, + * // ToxicityDetection: [ // ToxicityDetection + * // { // ToxicityDetectionSettings + * // ToxicityCategories: [ // ToxicityCategories // required + * // "ALL", + * // ], + * // }, + * // ], * // }, * // }; * diff --git a/clients/client-transcribe/src/commands/ListTranscriptionJobsCommand.ts b/clients/client-transcribe/src/commands/ListTranscriptionJobsCommand.ts index bea7fb5baf9b..4453ed92e03e 100644 --- a/clients/client-transcribe/src/commands/ListTranscriptionJobsCommand.ts +++ b/clients/client-transcribe/src/commands/ListTranscriptionJobsCommand.ts @@ -85,6 +85,13 @@ export interface ListTranscriptionJobsCommandOutput extends ListTranscriptionJob * // DurationInSeconds: Number("float"), * // }, * // ], + * // ToxicityDetection: [ // ToxicityDetection + * // { // ToxicityDetectionSettings + * // ToxicityCategories: [ // ToxicityCategories // required + * // "ALL", + * // ], + * // }, + * // ], * // }, * // ], * // }; diff --git a/clients/client-transcribe/src/commands/StartTranscriptionJobCommand.ts b/clients/client-transcribe/src/commands/StartTranscriptionJobCommand.ts index 5a6d0e7a66c6..a0aeed1dd3ab 100644 --- a/clients/client-transcribe/src/commands/StartTranscriptionJobCommand.ts +++ b/clients/client-transcribe/src/commands/StartTranscriptionJobCommand.ts @@ -140,6 +140,13 @@ export interface StartTranscriptionJobCommandOutput extends StartTranscriptionJo * LanguageModelName: "STRING_VALUE", * }, * }, + * ToxicityDetection: [ // ToxicityDetection + * { // ToxicityDetectionSettings + * ToxicityCategories: [ // ToxicityCategories // required + * "ALL", + * ], + * }, + * ], * }; * const command = new StartTranscriptionJobCommand(input); * const response = await client.send(command); @@ -220,6 +227,13 @@ export interface StartTranscriptionJobCommandOutput extends StartTranscriptionJo * // LanguageModelName: "STRING_VALUE", * // }, * // }, + * // ToxicityDetection: [ // ToxicityDetection + * // { // ToxicityDetectionSettings + * // ToxicityCategories: [ // ToxicityCategories // required + * // "ALL", + * // ], + * // }, + * // ], * // }, * // }; * diff --git a/clients/client-transcribe/src/models/models_0.ts b/clients/client-transcribe/src/models/models_0.ts index 9b51e3c37e60..d21d7fbf57be 100644 --- a/clients/client-transcribe/src/models/models_0.ts +++ b/clients/client-transcribe/src/models/models_0.ts @@ -2770,6 +2770,34 @@ export interface SubtitlesOutput { OutputStartIndex?: number; } +/** + * @public + * @enum + */ +export const ToxicityCategory = { + ALL: "ALL", +} as const; + +/** + * @public + */ +export type ToxicityCategory = (typeof ToxicityCategory)[keyof typeof ToxicityCategory]; + +/** + * @public + *
Contains ToxicityCategories
, which is a required parameter if you
+ * want to enable toxicity detection (ToxicityDetection
) in your transcription
+ * request.
If you include ToxicityDetection
in your transcription request, you
+ * must also include ToxicityCategories
. The only accepted value for this
+ * parameter is ALL
.
Provides detailed information about a transcription job.
@@ -2977,6 +3005,11 @@ export interface TranscriptionJob { * custom vocabulary filters that you included in your request. */ LanguageIdSettings?: RecordProvides information about the toxicity detection settings applied to your transcription.
+ */ + ToxicityDetection?: ToxicityDetectionSettings[]; } /** @@ -3677,6 +3710,12 @@ export interface TranscriptionJobSummary { * of this parameter,LanguageCode
, is present.
*/
LanguageCodes?: LanguageCodeItem[];
+
+ /**
+ * Indicates whether toxicity detection was enabled for the specified transcription + * job.
+ */ + ToxicityDetection?: ToxicityDetectionSettings[]; } /** @@ -4508,6 +4547,16 @@ export interface StartTranscriptionJobRequest { * sub-parameter. */ LanguageIdSettings?: RecordEnables toxic speech detection in your transcript. If you include
+ * ToxicityDetection
in your request, you must also include
+ * ToxicityCategories
.
For information on the types of toxic speech Amazon Transcribe can detect, see + * Detecting toxic + * speech.
+ */ + ToxicityDetection?: ToxicityDetectionSettings[]; } /** diff --git a/clients/client-transcribe/src/protocols/Aws_json1_1.ts b/clients/client-transcribe/src/protocols/Aws_json1_1.ts index 020cdfcd256b..612c8168542c 100644 --- a/clients/client-transcribe/src/protocols/Aws_json1_1.ts +++ b/clients/client-transcribe/src/protocols/Aws_json1_1.ts @@ -245,6 +245,8 @@ import { Subtitles, Tag, TagResourceRequest, + ToxicityCategory, + ToxicityDetectionSettings, TranscriptFilter, TranscriptionJob, TranscriptionJobSummary, @@ -3074,6 +3076,12 @@ const de_NotFoundExceptionRes = async (parsedOutput: any, context: __SerdeContex // se_TagResourceRequest omitted. +// se_ToxicityCategories omitted. + +// se_ToxicityDetection omitted. + +// se_ToxicityDetectionSettings omitted. + // se_TranscriptFilter omitted. // se_UntagResourceRequest omitted. @@ -3611,6 +3619,12 @@ const de_StartTranscriptionJobResponse = (output: any, context: __SerdeContext): // de_TagResourceResponse omitted. +// de_ToxicityCategories omitted. + +// de_ToxicityDetection omitted. + +// de_ToxicityDetectionSettings omitted. + // de_Transcript omitted. // de_TranscriptFilter omitted. @@ -3640,6 +3654,7 @@ const de_TranscriptionJob = (output: any, context: __SerdeContext): Transcriptio StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), Subtitles: _json, Tags: _json, + ToxicityDetection: _json, Transcript: _json, TranscriptionJobName: __expectString, TranscriptionJobStatus: __expectString, @@ -3675,6 +3690,7 @@ const de_TranscriptionJobSummary = (output: any, context: __SerdeContext): Trans ModelSettings: _json, OutputLocationType: __expectString, StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ToxicityDetection: _json, TranscriptionJobName: __expectString, TranscriptionJobStatus: __expectString, }) as any; diff --git a/codegen/sdk-codegen/aws-models/transcribe.json b/codegen/sdk-codegen/aws-models/transcribe.json index 3301dd2ccb8c..9c9feb8b6b88 100644 --- a/codegen/sdk-codegen/aws-models/transcribe.json +++ b/codegen/sdk-codegen/aws-models/transcribe.json @@ -4604,6 +4604,12 @@ "traits": { "smithy.api#documentation": "If using automatic language identification in your request and you want to apply a\n custom language model, a custom vocabulary, or a custom vocabulary filter, include\n LanguageIdSettings
with the relevant sub-parameters\n (VocabularyName
, LanguageModelName
, and\n VocabularyFilterName
). Note that multi-language identification\n (IdentifyMultipleLanguages
) doesn't support custom language\n models.
\n LanguageIdSettings
supports two to five language codes. Each language\n code you include can have an associated custom language model, custom vocabulary, and\n custom vocabulary filter. The language codes that you specify must match the languages\n of the associated custom language models, custom vocabularies, and custom vocabulary\n filters.
It's recommended that you include LanguageOptions
when using\n LanguageIdSettings
to ensure that the correct language dialect is\n identified. For example, if you specify a custom vocabulary that is in\n en-US
but Amazon Transcribe determines that the language spoken in\n your media is en-AU
, your custom vocabulary is not\n applied to your transcription. If you include LanguageOptions
and include\n en-US
as the only English language dialect, your custom vocabulary\n is applied to your transcription.
If you want to include a custom language model with your request but do not want to use automatic language identification, use\n instead the parameter with the\n
LanguageModelName
sub-parameter. If you want to include a custom\n vocabulary or a custom vocabulary filter (or both) with your request but do not want to use automatic language identification, use\n instead the parameter with the\n
VocabularyName
or VocabularyFilterName
(or both)\n sub-parameter.
Enables toxic speech detection in your transcript. If you include \n ToxicityDetection
in your request, you must also include\n ToxicityCategories
.
For information on the types of toxic speech Amazon Transcribe can detect, see \n Detecting toxic\n speech.
" + } } }, "traits": { @@ -4859,6 +4865,56 @@ } } }, + "com.amazonaws.transcribe#ToxicityCategories": { + "type": "list", + "member": { + "target": "com.amazonaws.transcribe#ToxicityCategory" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1 + } + } + }, + "com.amazonaws.transcribe#ToxicityCategory": { + "type": "enum", + "members": { + "ALL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ALL" + } + } + } + }, + "com.amazonaws.transcribe#ToxicityDetection": { + "type": "list", + "member": { + "target": "com.amazonaws.transcribe#ToxicityDetectionSettings" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1 + } + } + }, + "com.amazonaws.transcribe#ToxicityDetectionSettings": { + "type": "structure", + "members": { + "ToxicityCategories": { + "target": "com.amazonaws.transcribe#ToxicityCategories", + "traits": { + "smithy.api#documentation": " If you include ToxicityDetection
in your transcription request, you \n must also include ToxicityCategories
. The only accepted value for this \n parameter is ALL
.
Contains ToxicityCategories
, which is a required parameter if you \n want to enable toxicity detection (ToxicityDetection
) in your transcription \n request.
Provides the name and language of all custom language models, custom vocabularies, and\n custom vocabulary filters that you included in your request.
" } + }, + "ToxicityDetection": { + "target": "com.amazonaws.transcribe#ToxicityDetection", + "traits": { + "smithy.api#documentation": "Provides information about the toxicity detection settings applied to your transcription.
" + } } }, "traits": { @@ -6385,6 +6497,12 @@ "traits": { "smithy.api#documentation": "The language codes used to create your transcription job. This parameter is used with\n multi-language identification. For single-language identification, the singular version\n of this parameter, LanguageCode
, is present.
Indicates whether toxicity detection was enabled for the specified transcription \n job.
" + } } }, "traits": {