StartCallAnalyticsJob - Amazon Transcribe

StartCallAnalyticsJob

Transcribes the audio from a customer service call and applies any additional Request Parameters you choose to include in your request.

In addition to many standard transcription features, Call Analytics provides you with call characteristics, call summarization, speaker sentiment, and optional redaction of your text transcript and your audio file. You can also apply custom categories to flag specified conditions. To learn more about these features and insights, refer to Analyzing call center audio with Call Analytics.

If you want to apply categories to your Call Analytics job, you must create them before submitting your job request. Categories cannot be retroactively applied to a job. To create a new category, use the CreateCallAnalyticsCategory operation. To learn more about Call Analytics categories, see Creating categories for post-call transcriptions and Creating categories for real-time transcriptions.

To make a StartCallAnalyticsJob request, you must first upload your media file into an Amazon S3 bucket; you can then specify the Amazon S3 location of the file using the Media parameter.

Note that job queuing is enabled by default for Call Analytics jobs.

You must include the following parameters in your StartCallAnalyticsJob request:

  • region: The AWS Region where you are making your request. For a list of AWS Regions supported with Amazon Transcribe, refer to Amazon Transcribe endpoints and quotas.

  • CallAnalyticsJobName: A custom name that you create for your transcription job that's unique within your AWS account.

  • DataAccessRoleArn: The Amazon Resource Name (ARN) of an IAM role that has permissions to access the Amazon S3 bucket that contains your input files.

  • Media (MediaFileUri or RedactedMediaFileUri): The Amazon S3 location of your media file.

Note

With Call Analytics, you can redact the audio contained in your media file by including RedactedMediaFileUri, instead of MediaFileUri, to specify the location of your input audio. If you choose to redact your audio, you can find your redacted media at the location specified in the RedactedMediaFileUri field of your response.

Request Syntax

{ "CallAnalyticsJobName": "string", "ChannelDefinitions": [ { "ChannelId": number, "ParticipantRole": "string" } ], "DataAccessRoleArn": "string", "Media": { "MediaFileUri": "string", "RedactedMediaFileUri": "string" }, "OutputEncryptionKMSKeyId": "string", "OutputLocation": "string", "Settings": { "ContentRedaction": { "PiiEntityTypes": [ "string" ], "RedactionOutput": "string", "RedactionType": "string" }, "LanguageIdSettings": { "string" : { "LanguageModelName": "string", "VocabularyFilterName": "string", "VocabularyName": "string" } }, "LanguageModelName": "string", "LanguageOptions": [ "string" ], "Summarization": { "GenerateAbstractiveSummary": boolean }, "VocabularyFilterMethod": "string", "VocabularyFilterName": "string", "VocabularyName": "string" } }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

CallAnalyticsJobName

A unique name, chosen by you, for your Call Analytics job.

This name is case sensitive, cannot contain spaces, and must be unique within an AWS account. If you try to create a new job with the same name as an existing job, you get a ConflictException error.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 200.

Pattern: ^[0-9a-zA-Z._-]+

Required: Yes

ChannelDefinitions

Makes it possible to specify which speaker is on which channel. For example, if your agent is the first participant to speak, you would set ChannelId to 0 (to indicate the first channel) and ParticipantRole to AGENT (to indicate that it's the agent speaking).

Type: Array of ChannelDefinition objects

Array Members: Fixed number of 2 items.

Required: No

DataAccessRoleArn

The Amazon Resource Name (ARN) of an IAM role that has permissions to access the Amazon S3 bucket that contains your input files. If the role that you specify doesn’t have the appropriate permissions to access the specified Amazon S3 location, your request fails.

IAM role ARNs have the format arn:partition:iam::account:role/role-name-with-path. For example: arn:aws:iam::111122223333:role/Admin.

For more information, see IAM ARNs.

Type: String

Length Constraints: Minimum length of 20. Maximum length of 2048.

Pattern: ^arn:(aws|aws-cn|aws-us-gov|aws-iso-{0,1}[a-z]{0,1}):iam::[0-9]{0,63}:role/[A-Za-z0-9:_/+=,@.-]{0,1024}$

Required: No

Media

Describes the Amazon S3 location of the media file you want to use in your Call Analytics request.

Type: Media object

Required: Yes

OutputEncryptionKMSKeyId

The KMS key you want to use to encrypt your Call Analytics output.

If using a key located in the current AWS account, you can specify your KMS key in one of four ways:

  1. Use the KMS key ID itself. For example, 1234abcd-12ab-34cd-56ef-1234567890ab.

  2. Use an alias for the KMS key ID. For example, alias/ExampleAlias.

  3. Use the Amazon Resource Name (ARN) for the KMS key ID. For example, arn:aws:kms:region:account-ID:key/1234abcd-12ab-34cd-56ef-1234567890ab.

  4. Use the ARN for the KMS key alias. For example, arn:aws:kms:region:account-ID:alias/ExampleAlias.

If using a key located in a different AWS account than the current AWS account, you can specify your KMS key in one of two ways:

  1. Use the ARN for the KMS key ID. For example, arn:aws:kms:region:account-ID:key/1234abcd-12ab-34cd-56ef-1234567890ab.

  2. Use the ARN for the KMS key alias. For example, arn:aws:kms:region:account-ID:alias/ExampleAlias.

If you do not specify an encryption key, your output is encrypted with the default Amazon S3 key (SSE-S3).

If you specify a KMS key to encrypt your output, you must also specify an output location using the OutputLocation parameter.

Note that the role making the StartCallAnalyticsJob request must have permission to use the specified KMS key.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 2048.

Pattern: ^[A-Za-z0-9][A-Za-z0-9:_/+=,@.-]{0,2048}$

Required: No

OutputLocation

The Amazon S3 location where you want your Call Analytics transcription output stored. You can use any of the following formats to specify the output location:

  1. s3://DOC-EXAMPLE-BUCKET

  2. s3://DOC-EXAMPLE-BUCKET/my-output-folder/

  3. s3://DOC-EXAMPLE-BUCKET/my-output-folder/my-call-analytics-job.json

Unless you specify a file name (option 3), the name of your output file has a default value that matches the name you specified for your transcription job using the CallAnalyticsJobName parameter.

You can specify a KMS key to encrypt your output using the OutputEncryptionKMSKeyId parameter. If you do not specify a KMS key, Amazon Transcribe uses the default Amazon S3 key for server-side encryption.

If you do not specify OutputLocation, your transcript is placed in a service-managed Amazon S3 bucket and you are provided with a URI to access your transcript.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 2000.

Pattern: (s3://|http(s*)://).+

Required: No

Settings

Specify additional optional settings in your StartCallAnalyticsJob request, including content redaction; allows you to apply custom language models, vocabulary filters, and custom vocabularies to your Call Analytics job.

Type: CallAnalyticsJobSettings object

Required: No

Response Syntax

{ "CallAnalyticsJob": { "CallAnalyticsJobDetails": { "Skipped": [ { "Feature": "string", "Message": "string", "ReasonCode": "string" } ] }, "CallAnalyticsJobName": "string", "CallAnalyticsJobStatus": "string", "ChannelDefinitions": [ { "ChannelId": number, "ParticipantRole": "string" } ], "CompletionTime": number, "CreationTime": number, "DataAccessRoleArn": "string", "FailureReason": "string", "IdentifiedLanguageScore": number, "LanguageCode": "string", "Media": { "MediaFileUri": "string", "RedactedMediaFileUri": "string" }, "MediaFormat": "string", "MediaSampleRateHertz": number, "Settings": { "ContentRedaction": { "PiiEntityTypes": [ "string" ], "RedactionOutput": "string", "RedactionType": "string" }, "LanguageIdSettings": { "string" : { "LanguageModelName": "string", "VocabularyFilterName": "string", "VocabularyName": "string" } }, "LanguageModelName": "string", "LanguageOptions": [ "string" ], "Summarization": { "GenerateAbstractiveSummary": boolean }, "VocabularyFilterMethod": "string", "VocabularyFilterName": "string", "VocabularyName": "string" }, "StartTime": number, "Transcript": { "RedactedTranscriptFileUri": "string", "TranscriptFileUri": "string" } } }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

CallAnalyticsJob

Provides detailed information about the current Call Analytics job, including job status and, if applicable, failure reason.

Type: CallAnalyticsJob object

Errors

For information about the errors that are common to all actions, see Common Errors.

BadRequestException

Your request didn't pass one or more validation tests. This can occur when the entity you're trying to delete doesn't exist or if it's in a non-terminal state (such as IN PROGRESS). See the exception message field for more information.

HTTP Status Code: 400

ConflictException

A resource already exists with this name. Resource names must be unique within an AWS account.

HTTP Status Code: 400

InternalFailureException

There was an internal error. Check the error message, correct the issue, and try your request again.

HTTP Status Code: 500

LimitExceededException

You've either sent too many requests or your input file is too long. Wait before retrying your request, or use a smaller file and try your request again.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: