Skip to content

Commit

Permalink
Merge branch 'develop' v0.2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
rstrahan committed Jun 9, 2022
2 parents 385f9b5 + 77d6280 commit 5121f94
Show file tree
Hide file tree
Showing 13 changed files with 123 additions and 332 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.2.3] - 2022-06-09
### Fixed
- Simplifies workflow by using new Transcribe API to specify Custom Vocabulary and Vocabulary Filter at the same time as using Language ID.

## [0.2.2] - 2022-06-01
### Fixed
- Replaces ':' with '-' when constructing Transcribe job name. Note, use '-' instead of ':' in any custom regex patterns specified in CF parameter, as regex is applied to the generated job name after replacement.
Expand Down Expand Up @@ -45,7 +49,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Initial release

[Unreleased]: https://github.com/aws-samples/amazon-transcribe-post-call-analytics/compare/v0.2.2...develop
[Unreleased]: https://github.com/aws-samples/amazon-transcribe-post-call-analytics/compare/v0.2.3...develop
[0.2.3]: https://github.com/aws-samples/amazon-transcribe-post-call-analytics/releases/tag/v0.2.3
[0.2.2]: https://github.com/aws-samples/amazon-transcribe-post-call-analytics/releases/tag/v0.2.2
[0.2.1]: https://github.com/aws-samples/amazon-transcribe-post-call-analytics/releases/tag/v0.2.1
[0.2.0]: https://github.com/aws-samples/amazon-transcribe-post-call-analytics/releases/tag/v0.2.0
Expand Down
Binary file removed System Documentation.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.2.2
0.2.3
2 changes: 1 addition & 1 deletion pca-main-nokendra.template
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AWSTemplateFormatVersion: "2010-09-09"

Description: Amazon Transcribe Post Call Analytics - PCA (v0.2.2) (uksb-1sn29lk73)
Description: Amazon Transcribe Post Call Analytics - PCA (v0.2.3) (uksb-1sn29lk73)

Parameters:

Expand Down
2 changes: 1 addition & 1 deletion pca-main.template
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AWSTemplateFormatVersion: "2010-09-09"

Description: Amazon Transcribe Post Call Analytics - PCA (v0.2.2) (uksb-1sn29lk73)
Description: Amazon Transcribe Post Call Analytics - PCA (v0.2.3) (uksb-1sn29lk73)

Parameters:

Expand Down
2 changes: 1 addition & 1 deletion pca-server/cfn/lib/boto3.template
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ Resources:
os.mkdir(root_path)
# Write out the requirements.txt file, which is the boto3 version we need
with open(reqs_file, 'w') as f:
f.write("boto3==1.18.51")
f.write("boto3==1.24.2")
f.close()
# Install this version of boto3 locally and copy out Transcribe model
subprocess.check_call([sys.executable, "-m", "pip", "install", "-r", reqs_file, "-t", pip_folder])
Expand Down
85 changes: 1 addition & 84 deletions pca-server/cfn/lib/pca-definition.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,7 @@
{
"Comment": "Post-Call Analytics Workflow with Transcribe and Comprehend",
"StartAt": "LanguageDetection?",
"StartAt": "TranscribeAudio",
"States": {
"LanguageDetection?": {
"Type": "Choice",
"Comment": "Triggers Language Detection is required",
"Choices": [
{
"Variable": "$.langCode",
"StringEquals": "",
"Next": "TranscribeLangDetectClip"
}
],
"Default": "TranscribeAudio"
},
"TranscribeAudio": {
"Comment": "Sends the file in S3 for Transcription",
"Type": "Task",
Expand All @@ -24,77 +12,6 @@
}],
"Next": "TranscribeStarted?"
},
"TranscribeLangDetectClip": {
"Type": "Task",
"Resource": "${SFLanguageDetectionArn}",
"Retry": [{
"IntervalSeconds": 5,
"ErrorEquals": ["Lambda.Unknown"]
}],
"Next": "LanguageDetectPossible?"
},
"LanguageDetectPossible?": {
"Type": "Choice",
"Comment": "Checks if we created our language detection job or now",
"Choices": [
{
"Not": {
"Variable": "$.langCode",
"StringEquals": ""
},
"Next": "TranscribeAudio"
}
],
"Default": "WaitForLangDetectTranscribe"
},
"WaitForLangDetectTranscribe": {
"Type": "Task",
"Resource": "arn:aws:states:::lambda:invoke.waitForTaskToken",
"Parameters": {
"FunctionName":"${SFAwaitNotificationArn}",
"Payload":{
"Input.$": "$",
"TaskToken.$":"$$.Task.Token"
}
},
"Retry": [{
"IntervalSeconds": 5,
"ErrorEquals": ["Lambda.Unknown"]
}],
"Next": "LangDetectionComplete?",
"Catch": [
{
"ErrorEquals": [ "States.ALL" ],
"Next": "TranscriptionFailed"
}
]
},
"LangDetectionComplete?": {
"Type": "Choice",
"Choices": [
{
"Variable": "$.transcribeStatus",
"StringEquals": "COMPLETED",
"Next": "ParseDetectedLanguage"
},
{
"Variable": "$.transcribeStatus",
"StringEquals": "RETRY",
"Next": "TranscribeLangDetectClip"
}
],
"Default": "TranscriptionFailed"
},
"ParseDetectedLanguage": {
"Comment": "Extracts the detected language code from the Transcribe job",
"Type": "Task",
"Resource": "${SFGetDetectedLanguageArn}",
"Retry": [{
"IntervalSeconds": 5,
"ErrorEquals": ["Lambda.Unknown"]
}],
"Next": "TranscribeAudio"
},
"TranscribeStarted?": {
"Type": "Choice",
"Comment": "If a job was not started then we need to quit this workflow",
Expand Down
27 changes: 0 additions & 27 deletions pca-server/cfn/lib/pca.template
Original file line number Diff line number Diff line change
Expand Up @@ -118,20 +118,6 @@ Resources:
Resource: !Sub arn:aws:ssm:${AWS::Region}:${AWS::AccountId}:parameter/*


SFLanguageDetection:
Type: "AWS::Serverless::Function"
Properties:
CodeUri: ../../src/pca
Handler: pca-aws-sf-language-detection.lambda_handler
MemorySize: 192
Timeout: 15
Layers:
- !Ref FFMPEGLayer
Environment:
Variables:
RoleArn: !GetAtt TranscribeRole.Arn
Role: !GetAtt TranscribeLambdaRole.Arn

SFStartTranscribeJob:
Type: "AWS::Serverless::Function"
Properties:
Expand All @@ -147,15 +133,6 @@ Resources:
AWS_DATA_PATH: "/opt/models"
Role: !GetAtt TranscribeLambdaRole.Arn

SFGetDetectedLanguage:
Type: "AWS::Serverless::Function"
Properties:
CodeUri: ../../src/pca
Handler: pca-aws-sf-get-detected-language.lambda_handler
Policies:
- arn:aws:iam::aws:policy/AmazonS3FullAccess
- arn:aws:iam::aws:policy/AmazonTranscribeFullAccess

SFProcessTurn:
Type: "AWS::Serverless::Function"
Properties:
Expand Down Expand Up @@ -225,10 +202,8 @@ Resources:
Resource:
- !GetAtt SFProcessTurn.Arn
- !GetAtt SFStartTranscribeJob.Arn
- !GetAtt SFLanguageDetection.Arn
- !GetAtt SFAwaitNotification.Arn
- !GetAtt SFTranscribeFailed.Arn
- !GetAtt SFGetDetectedLanguage.Arn
- PolicyName: CloudWatchLogs
PolicyDocument:
Statement:
Expand All @@ -252,10 +227,8 @@ Resources:
DefinitionSubstitutions:
SFProcessTurnArn: !GetAtt SFProcessTurn.Arn
SFStartTranscribeJobArn: !GetAtt SFStartTranscribeJob.Arn
SFLanguageDetectionArn: !GetAtt SFLanguageDetection.Arn
SFAwaitNotificationArn: !GetAtt SFAwaitNotification.Arn
SFTranscribeFailedArn: !GetAtt SFTranscribeFailed.Arn
SFGetDetectedLanguageArn: !GetAtt SFGetDetectedLanguage.Arn
LoggingConfiguration:
Level: ERROR
IncludeExecutionData: true
Expand Down
60 changes: 0 additions & 60 deletions pca-server/src/pca/pca-aws-sf-get-detected-language.py

This file was deleted.

86 changes: 0 additions & 86 deletions pca-server/src/pca/pca-aws-sf-language-detection.py

This file was deleted.

Loading

0 comments on commit 5121f94

Please sign in to comment.