We attempt to generate the post call analytics via api calls using @aws-sdk/client-transcribe but the callanalyticsjob created with json but file not generated and PII redact options turned to Off.
But using the post call analytics console it is creating a redacted file with the same input audio with PII redact ON.
Attached my code below:
const input={
CallAnalyticsJobName: "testRedactService9",
MediaFormat:MediaFormat.WAV,
Media: {
MediaFileUri: "s3://testingsaml/5525c64a-4e4a-4046-a8cb-e5fc65b4fb6d_20240202T05_11_UTC (1).wav",
RedactedMediaFileUri:"s3://customer-chatwidget/"
},
OutputLocationType:OutputLocationType.CUSTOMER_BUCKET,
OutputLocation:"s3://customer-chatwidget/",
Settings: {
contentRedaction: {
RedactionType: RedactionType.PII,
RedactionOutput: RedactionOutput.REDACTED_AND_UNREDACTED,
PiiEntityTypes: [
PiiEntityType.BANK_ACCOUNT_NUMBER,
PiiEntityType.ADDRESS
]
},
LanguageOptions: [
LanguageCode.EN_US
]
},
ChannelDefinitions: [
{
ChannelId: 1,
ParticipantRole: ParticipantRole.AGENT
},
{
ChannelId: 0,
ParticipantRole: ParticipantRole.CUSTOMER
}
],
DataAccessRoleArn: "arn:aws:iam::116147559574:role/service-role/AmazonTranscribeServiceRoleFullAccess-testTranscribeRole"
}
const command = new StartCallAnalyticsJobCommand(input);
client.send(command)
.then((data:any) => {
console.log("New Analytial JOB started successfully");
console.log(data);
})
.catch((error:any) => {
console.error("New Analytical JOB error");
console.error(error);
});