/AWS1/IF_TNB=>STARTCALLANALYTICSJOB()¶
About 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 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.
Job queuing is available for Call Analytics jobs. If you pass a DataAccessRoleArn
in your request and you exceed your Concurrent Job Limit, your job will automatically be
added to a queue to be processed once your concurrent job count is below the limit.
You must include the following parameters in your StartCallAnalyticsJob
request:
-
region: The Amazon Web Services Region where you are making your request. For a list of Amazon Web Services 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 Amazon Web Services account. -
Media(MediaFileUriorRedactedMediaFileUri): The Amazon S3 location of your media file.
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.
Method Signature¶
METHODS /AWS1/IF_TNB~STARTCALLANALYTICSJOB
IMPORTING
!IV_CALLANALYTICSJOBNAME TYPE /AWS1/TNBCALLANALYTICSJOBNAME OPTIONAL
!IO_MEDIA TYPE REF TO /AWS1/CL_TNBMEDIA OPTIONAL
!IV_OUTPUTLOCATION TYPE /AWS1/TNBURI OPTIONAL
!IV_OUTPUTENCRYPTIONKMSKEYID TYPE /AWS1/TNBKMSKEYID OPTIONAL
!IV_DATAACCESSROLEARN TYPE /AWS1/TNBDATAACCESSROLEARN OPTIONAL
!IO_SETTINGS TYPE REF TO /AWS1/CL_TNBCALLALYSJOBSTGS OPTIONAL
!IT_TAGS TYPE /AWS1/CL_TNBTAG=>TT_TAGLIST OPTIONAL
!IT_CHANNELDEFINITIONS TYPE /AWS1/CL_TNBCHANNELDEFINITION=>TT_CHANNELDEFINITIONS OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_tnbstrtcallalysjobrsp
RAISING
/AWS1/CX_TNBBADREQUESTEX
/AWS1/CX_TNBCONFLICTEXCEPTION
/AWS1/CX_TNBINTERNALFAILUREEX
/AWS1/CX_TNBLIMITEXCEEDEDEX
/AWS1/CX_TNBCLIENTEXC
/AWS1/CX_TNBSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_callanalyticsjobname TYPE /AWS1/TNBCALLANALYTICSJOBNAME /AWS1/TNBCALLANALYTICSJOBNAME¶
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 Amazon Web Services account. If you try to create a new job with the same name as an existing job, you get a
ConflictExceptionerror.
io_media TYPE REF TO /AWS1/CL_TNBMEDIA /AWS1/CL_TNBMEDIA¶
Describes the Amazon S3 location of the media file you want to use in your Call Analytics request.
Optional arguments:¶
iv_outputlocation TYPE /AWS1/TNBURI /AWS1/TNBURI¶
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:
s3://DOC-EXAMPLE-BUCKET
s3://DOC-EXAMPLE-BUCKET/my-output-folder/
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
CallAnalyticsJobNameparameter.You can specify a KMS key to encrypt your output using the
OutputEncryptionKMSKeyIdparameter. 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.
iv_outputencryptionkmskeyid TYPE /AWS1/TNBKMSKEYID /AWS1/TNBKMSKEYID¶
The Amazon Resource Name (ARN) of a KMS key that you want to use to encrypt your Call Analytics output.
KMS key ARNs have the format
arn:partition:kms:region:account:key/key-id. For example:arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab. For more information, see KMS key ARNs.If you do not specify an encryption key, your output is encrypted with the default Amazon S3 key (SSE-S3).
Note that the role making the request and the role specified in the
DataAccessRoleArnrequest parameter (if present) must have permission to use the specified KMS key.
iv_dataaccessrolearn TYPE /AWS1/TNBDATAACCESSROLEARN /AWS1/TNBDATAACCESSROLEARN¶
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.
io_settings TYPE REF TO /AWS1/CL_TNBCALLALYSJOBSTGS /AWS1/CL_TNBCALLALYSJOBSTGS¶
Specify additional optional settings in your request, including content redaction; allows you to apply custom language models, vocabulary filters, and custom vocabularies to your Call Analytics job.
it_tags TYPE /AWS1/CL_TNBTAG=>TT_TAGLIST TT_TAGLIST¶
Adds one or more custom tags, each in the form of a key:value pair, to a new call analytics job at the time you start this new job.
To learn more about using tags with Amazon Transcribe, refer to Tagging resources.
it_channeldefinitions TYPE /AWS1/CL_TNBCHANNELDEFINITION=>TT_CHANNELDEFINITIONS TT_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
ChannelIdto0(to indicate the first channel) andParticipantRoletoAGENT(to indicate that it's the agent speaking).
RETURNING¶
oo_output TYPE REF TO /aws1/cl_tnbstrtcallalysjobrsp /AWS1/CL_TNBSTRTCALLALYSJOBRSP¶
Examples¶
Syntax Example¶
This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.
DATA(lo_result) = lo_client->startcallanalyticsjob(
io_media = new /aws1/cl_tnbmedia(
iv_mediafileuri = |string|
iv_redactedmediafileuri = |string|
)
io_settings = new /aws1/cl_tnbcallalysjobstgs(
io_contentredaction = new /aws1/cl_tnbcontentredaction(
it_piientitytypes = VALUE /aws1/cl_tnbpiientitytypes_w=>tt_piientitytypes(
( new /aws1/cl_tnbpiientitytypes_w( |string| ) )
)
iv_redactionoutput = |string|
iv_redactiontype = |string|
)
io_summarization = new /aws1/cl_tnbsummarization( ABAP_TRUE )
it_languageidsettings = VALUE /aws1/cl_tnblanguageidsettings=>tt_languageidsettingsmap(
(
VALUE /aws1/cl_tnblanguageidsettings=>ts_languageidstgsmap_maprow(
value = new /aws1/cl_tnblanguageidsettings(
iv_languagemodelname = |string|
iv_vocabularyfiltername = |string|
iv_vocabularyname = |string|
)
key = |string|
)
)
)
it_languageoptions = VALUE /aws1/cl_tnblanguageoptions_w=>tt_languageoptions(
( new /aws1/cl_tnblanguageoptions_w( |string| ) )
)
iv_languagemodelname = |string|
iv_vocabularyfiltermethod = |string|
iv_vocabularyfiltername = |string|
iv_vocabularyname = |string|
)
it_channeldefinitions = VALUE /aws1/cl_tnbchanneldefinition=>tt_channeldefinitions(
(
new /aws1/cl_tnbchanneldefinition(
iv_channelid = 123
iv_participantrole = |string|
)
)
)
it_tags = VALUE /aws1/cl_tnbtag=>tt_taglist(
(
new /aws1/cl_tnbtag(
iv_key = |string|
iv_value = |string|
)
)
)
iv_callanalyticsjobname = |string|
iv_dataaccessrolearn = |string|
iv_outputencryptionkmskeyid = |string|
iv_outputlocation = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lo_callanalyticsjob = lo_result->get_callanalyticsjob( ).
IF lo_callanalyticsjob IS NOT INITIAL.
lv_callanalyticsjobname = lo_callanalyticsjob->get_callanalyticsjobname( ).
lv_callanalyticsjobstatus = lo_callanalyticsjob->get_callanalyticsjobstatus( ).
lo_callanalyticsjobdetails = lo_callanalyticsjob->get_callanalyticsjobdetails( ).
IF lo_callanalyticsjobdetails IS NOT INITIAL.
LOOP AT lo_callanalyticsjobdetails->get_skipped( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_callanalyticsfeature = lo_row_1->get_feature( ).
lv_callanalyticsskippedrea = lo_row_1->get_reasoncode( ).
lv_string = lo_row_1->get_message( ).
ENDIF.
ENDLOOP.
ENDIF.
lv_languagecode = lo_callanalyticsjob->get_languagecode( ).
lv_mediasampleratehertz = lo_callanalyticsjob->get_mediasampleratehertz( ).
lv_mediaformat = lo_callanalyticsjob->get_mediaformat( ).
lo_media = lo_callanalyticsjob->get_media( ).
IF lo_media IS NOT INITIAL.
lv_uri = lo_media->get_mediafileuri( ).
lv_uri = lo_media->get_redactedmediafileuri( ).
ENDIF.
lo_transcript = lo_callanalyticsjob->get_transcript( ).
IF lo_transcript IS NOT INITIAL.
lv_uri = lo_transcript->get_transcriptfileuri( ).
lv_uri = lo_transcript->get_redactedtranscriptfile00( ).
ENDIF.
lv_datetime = lo_callanalyticsjob->get_starttime( ).
lv_datetime = lo_callanalyticsjob->get_creationtime( ).
lv_datetime = lo_callanalyticsjob->get_completiontime( ).
lv_failurereason = lo_callanalyticsjob->get_failurereason( ).
lv_dataaccessrolearn = lo_callanalyticsjob->get_dataaccessrolearn( ).
lv_identifiedlanguagescore = lo_callanalyticsjob->get_identifiedlanguagescore( ).
lo_callanalyticsjobsetting = lo_callanalyticsjob->get_settings( ).
IF lo_callanalyticsjobsetting IS NOT INITIAL.
lv_vocabularyname = lo_callanalyticsjobsetting->get_vocabularyname( ).
lv_vocabularyfiltername = lo_callanalyticsjobsetting->get_vocabularyfiltername( ).
lv_vocabularyfiltermethod = lo_callanalyticsjobsetting->get_vocabularyfiltermethod( ).
lv_modelname = lo_callanalyticsjobsetting->get_languagemodelname( ).
lo_contentredaction = lo_callanalyticsjobsetting->get_contentredaction( ).
IF lo_contentredaction IS NOT INITIAL.
lv_redactiontype = lo_contentredaction->get_redactiontype( ).
lv_redactionoutput = lo_contentredaction->get_redactionoutput( ).
LOOP AT lo_contentredaction->get_piientitytypes( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_piientitytype = lo_row_3->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
LOOP AT lo_callanalyticsjobsetting->get_languageoptions( ) into lo_row_4.
lo_row_5 = lo_row_4.
IF lo_row_5 IS NOT INITIAL.
lv_languagecode = lo_row_5->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_callanalyticsjobsetting->get_languageidsettings( ) into ls_row_6.
lv_key = ls_row_6-key.
lo_value = ls_row_6-value.
IF lo_value IS NOT INITIAL.
lv_vocabularyname = lo_value->get_vocabularyname( ).
lv_vocabularyfiltername = lo_value->get_vocabularyfiltername( ).
lv_modelname = lo_value->get_languagemodelname( ).
ENDIF.
ENDLOOP.
lo_summarization = lo_callanalyticsjobsetting->get_summarization( ).
IF lo_summarization IS NOT INITIAL.
lv_boolean = lo_summarization->get_generateabstractivesumm( ).
ENDIF.
ENDIF.
LOOP AT lo_callanalyticsjob->get_channeldefinitions( ) into lo_row_7.
lo_row_8 = lo_row_7.
IF lo_row_8 IS NOT INITIAL.
lv_channelid = lo_row_8->get_channelid( ).
lv_participantrole = lo_row_8->get_participantrole( ).
ENDIF.
ENDLOOP.
LOOP AT lo_callanalyticsjob->get_tags( ) into lo_row_9.
lo_row_10 = lo_row_9.
IF lo_row_10 IS NOT INITIAL.
lv_tagkey = lo_row_10->get_key( ).
lv_tagvalue = lo_row_10->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.