Skip to content

Commit f4aa71d

Browse files
committed
Merge branch 'develop' v0.8.12
2 parents 8431490 + 44d2f8d commit f4aa71d

File tree

30 files changed

+884
-727
lines changed

30 files changed

+884
-727
lines changed

CHANGELOG.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.8.12] - 2024-05-20
11+
### Fixed
12+
- Expanded redaction support to include all languages (and dialects) on the Amazon Transcribe supported languages page.
13+
- Call Transcriber Lambda
14+
- Refactor call end handling, to explicitly process ENDED messages from VoiceConnector, rather than imputing call end from stream data ending - adds robustness when stream can end (temporarily) for other reasons (such as call hold, etc.)
15+
- Identified a situation where if a call chained across multiple lambda invocations (lasted longer than 12 minutes), the new timer we introduced that checks if the call ends would leak into the next lambda invocation. This would have no effect for a single long running call other than duplicate checks to DynamoDB—however—if the call ends and a NEW call uses that warm Lambda, the new call would inherit the timers and within 5 seconds mark the call as ended. To fix this, we made modifications by adding proper clean-up of timers when the call ends, and also double checking when the next call begins that the new Lambda did not inherit any calls.
16+
- Added the callId to the log output, so that it is easier to trace calls.
17+
- Added the request id of the next Lambda invocation in the output of the log, so that it makes it easier to trace sequential lambda invocations (chaining).
18+
19+
- Websocket server and Stream Audio client
20+
- Fix state management in Websocket server - add connection specific state variables to a global dictionary to maintain state for active connections
21+
- Fix reconnection logic in Stream Audio websocket client - i.e. retrofit the fix from LMA.
22+
- Clean up and streamline log formats in Websocket Server and Stream Audio client
23+
- Reduce the amount of logs due to health checks. Health check is done every 10 seconds, logging status for each health check which creates huge amounts of log records in cloudwatch. To fix this - Log first health check message from each new source and then log every 2 minutes (interval controlled by a new environment variable which is not exposed in cloudformation, but can be directly updated in the ECS configuration by developers).
24+
- Fix authentication code in Websocket client utility (utilites/webosocket-client)
25+
1026
## [0.8.11] - 2024-02-21
1127
### Fixed
1228
- Added custom resource in the lca-websocket-stack that sets the ECS cluster's desired service count to zero, then deletes the service, before deleting the cluster. This will prevent errors in deleting the stack when disabling websockets or deleting LCA.
@@ -356,7 +372,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
356372

357373
- Initial release
358374

359-
[Unreleased]: https://github.com/aws-samples/amazon-transcribe-live-call-analytics/compare/v0.8.11...develop
375+
[Unreleased]: https://github.com/aws-samples/amazon-transcribe-live-meeting-assistant/compare/main...develop
376+
[0.8.12]: https://github.com/aws-samples/amazon-transcribe-live-call-analytics/compare/v0.8.11...v0.8.12
360377
[0.8.11]: https://github.com/aws-samples/amazon-transcribe-live-call-analytics/compare/v0.8.10...v0.8.11
361378
[0.8.10]: https://github.com/aws-samples/amazon-transcribe-live-call-analytics/compare/v0.8.9...v0.8.10
362379
[0.8.9]: https://github.com/aws-samples/amazon-transcribe-live-call-analytics/compare/v0.8.8...v0.8.9

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ To get LCA up and running in your own AWS account, follow these steps (if you do
128128
**Amazon Transcribe Configuration**
129129
22. `Enable Partial Transcripts` - Enable partial transcripts to receive low latency evolving transcriptions for each conversation turn.
130130
23. `Transcribe API mode` - Set the default API mode for Transcribe. Set to 'analytics' to use the Amazon Transcribe Real-time Call Analytics service, used to support call categories and alerts, call summarization, and PCA integration.
131-
24. `Enable Content Redaction for Transcripts` - Enable content redaction from Amazon Transcribe transcription output. **NOTE:** Content redaction is only available when using the English language (en-US). This parameter is ignored when not using the English language
131+
24. `Enable Content Redaction for Transcripts` - Enable content redaction from Amazon Transcribe transcription output. **NOTE:** Content redaction is only available when using English (en-US, en-GB, en-AU) or Spanish (es-US). This parameter is ignored when not using other languages.
132132
25. `Language for Transcription` - Language code to be used for Amazon Transcribe
133133
26. `Content Redaction Type for Transcription` - Type of content redaction from Amazon Transcribe transcription output
134134
27. `Transcription PII Redaction Entity Types` - Select the PII entity types you want to identify or redact. Remove the values that you don't want to redact from the default. _DO NOT ADD CUSTOM VALUES HERE_.

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.8.11
1+
0.8.12

lca-ai-stack/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.8.11
1+
0.8.12

lca-ai-stack/deployment/lca-ai-stack.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ Parameters:
285285
286286
BootstrapVersion:
287287
Type: String
288-
Default: 0.8.1111
288+
Default: 0.8.12
289289
Description: >
290290
Artifacts version (semver). Used to point to a specific release in the S3
291291
bootstrap bucket

lca-ai-stack/samconfig.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,20 @@ use_container = true
88
# shared account
99
[shared.global.parameters]
1010
s3_bucket = "lca-artifacts-253873381732-us-east-1"
11-
s3_prefix = "artifacts/lca/0.8.1110"
11+
s3_prefix = "artifacts/lca/0.8.12"
1212

1313
[shared.deploy.parameters]
1414
stack_name = "LiveCallAnalytics"
1515
s3_bucket = "lca-artifacts-253873381732-us-east-1"
16-
s3_prefix = "artifacts/lca/0.8.1110"
16+
s3_prefix = "artifacts/lca/0.8.12"
1717
region = "us-east-1"
1818
fail_on_empty_changeset = false
1919
confirm_changeset = true
2020
capabilities = "CAPABILITY_IAM CAPABILITY_AUTO_EXPAND"
2121
parameter_overrides = [
2222
"BootstrapBucketBaseName=lca-artifacts-253873381732",
2323
"BootstrapS3Prefix=artifacts/lca",
24-
"BootstrapVersion=0.8.1110",
24+
"BootstrapVersion=0.8.12",
2525
"S3BucketName=shared-ai-for-chime-vc-audio",
2626
"IsContentRedactionEnabled=true",
2727
"IsSentimentAnalysisEnabled=true",
@@ -32,4 +32,4 @@ parameter_overrides = [
3232

3333
[shared.package.parameters]
3434
s3_bucket = "lca-artifacts-253873381732-us-east-1"
35-
s3_prefix = "artifacts/lca/0.8.1110"
35+
s3_prefix = "artifacts/lca/0.8.12"

lca-ai-stack/source/ui/package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lca-ai-stack/source/ui/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "lca-ui",
3-
"version": "0.8.1111",
3+
"version": "0.8.12",
44
"private": true,
55
"dependencies": {
66
"@aws-amplify/ui-components": "^1.9.6",
@@ -77,4 +77,4 @@
7777
"<roodDir>/node_modules/(?!@awsui)"
7878
]
7979
}
80-
}
80+
}

lca-ai-stack/source/ui/src/components/stream-audio/StreamAudio.jsx

Lines changed: 41 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,12 @@ const StreamAudio = () => {
3636
const [micInputOption, setMicInputOption] = useState({ label: 'AGENT', value: 'agent' });
3737

3838
const getSocketUrl = useCallback(() => {
39-
console.log('Trying to resolve websocket url...');
39+
console.log(`DEBUG - [${new Date().toISOString()}]: Trying to resolve websocket url...`);
4040
return new Promise((resolve) => {
4141
if (settings.WSEndpoint) {
42-
console.log(`Resolved Websocket URL to ${settings.WSEndpoint}`);
42+
console.log(`
43+
DEBUG - [${new Date().toISOString()}]: Resolved Websocket URL to ${settings.WSEndpoint}
44+
`);
4345
resolve(settings.WSEndpoint);
4446
}
4547
});
@@ -50,14 +52,21 @@ const StreamAudio = () => {
5052
authorization: `Bearer ${JWT_TOKEN}`,
5153
},
5254
onOpen: (event) => {
53-
console.log(event);
55+
console.log(`
56+
DEBUG - [${new Date().toISOString()}]: Websocket onOpen Event: ${JSON.stringify(event)}
57+
`);
5458
},
5559
onClose: (event) => {
56-
console.log(event);
60+
console.log(`
61+
DEBUG - [${new Date().toISOString()}]: Websocket onClose Event: ${JSON.stringify(event)}
62+
`);
5763
},
5864
onError: (event) => {
59-
console.log(event);
65+
console.log(`
66+
DEBUG - [${new Date().toISOString()}]: Websocket onError Event: ${JSON.stringify(event)}
67+
`);
6068
},
69+
shouldReconnect: () => true,
6170
});
6271

6372
const handleCallIdChange = (e) => {
@@ -110,6 +119,8 @@ const StreamAudio = () => {
110119
};
111120

112121
const stopRecording = async () => {
122+
console.log(`DEBUG - [${new Date().toISOString()}]: Stopping recording...`);
123+
113124
if (audioProcessor.current) {
114125
audioProcessor.current.port.postMessage({
115126
message: 'UPDATE_RECORDING_STATE',
@@ -130,11 +141,17 @@ const StreamAudio = () => {
130141
console.log('AudioContext closed.');
131142
});
132143
} else {
133-
console.log('no media recorder available to stop');
144+
console.log(`
145+
DEBUG - [${new Date().toISOString()}]: Error trying to stop recording. AudioWorklet Processor node is not active.
146+
`);
134147
setRecording(false);
135148
}
136149
if (streamingStarted && !recording) {
137150
callMetaData.callEvent = 'END';
151+
// eslint-disable-next-line prettier/prettier
152+
console.log(`
153+
DEBUG - [${new Date().toISOString()}]: Send Call END msg: ${JSON.stringify(callMetaData)}
154+
`);
138155
sendMessage(JSON.stringify(callMetaData));
139156
setStreamingStarted(false);
140157
setCallMetaData({
@@ -145,6 +162,10 @@ const StreamAudio = () => {
145162
};
146163

147164
const startRecording = async () => {
165+
console.log(`
166+
DEBUG - [${new Date().toISOString()}]: Start Recording and Streaming Audio to Websocket server.
167+
`);
168+
148169
try {
149170
audioContext.current = new window.AudioContext();
150171
displayStream.current = await window.navigator.mediaDevices.getDisplayMedia({
@@ -162,6 +183,10 @@ const StreamAudio = () => {
162183
callMetaData.samplingRate = SOURCE_SAMPLING_RATE;
163184

164185
callMetaData.callEvent = 'START';
186+
// eslint-disable-next-line prettier/prettier
187+
console.log(`
188+
DEBUG - [${new Date().toISOString()}]: Send Call START msg: ${JSON.stringify(callMetaData)}
189+
`);
165190
sendMessage(JSON.stringify(callMetaData));
166191
setStreamingStarted(true);
167192

@@ -177,15 +202,23 @@ const StreamAudio = () => {
177202
monoMicSource.connect(channelMerger.current, 0, 0);
178203
monoDisplaySource.connect(channelMerger.current, 0, 1);
179204

205+
console.log(`
206+
DEBUG - [${new Date().toISOString()}]: Registering and adding AudioWorklet processor to capture audio
207+
`);
208+
180209
try {
181210
await audioContext.current.audioWorklet.addModule('./worklets/recording-processor.js');
182211
} catch (error) {
183-
console.log(`Add module error ${error}`);
212+
console.log(`
213+
DEBUG - [${new Date().toISOString()}]: Error registering AudioWorklet processor: ${error}
214+
`);
184215
}
185216

186217
audioProcessor.current = new AudioWorkletNode(audioContext.current, 'recording-processor');
187218
audioProcessor.current.port.onmessageerror = (error) => {
188-
console.log(`Error receving message from worklet ${error}`);
219+
console.log(`
220+
DEBUG - [${new Date().toISOString()}]: Error receving message from worklet ${error}
221+
`);
189222
};
190223
audioProcessor.current.port.onmessage = (event) => {
191224
// this is pcm audio

lca-chimevc-stack/cloudformation-templates/chime-vc-call-analytics.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ Parameters:
6767
Default: 'false'
6868
Description: >-
6969
Enable content redaction from Amazon Transcribe transcription output. This is only used when
70-
the 'en-US' language is selected in the TranscribeLanguageCode parameter.
70+
the 'en-US', 'en-AU', 'en-GB' or 'es-US' languages are selected in the TranscribeLanguageCode parameter.
7171
AllowedValues:
7272
- 'true'
7373
- 'false'
@@ -954,7 +954,11 @@ Metadata:
954954
Conditions:
955955
ShouldEnableContentRedaction: !And
956956
- !Equals [!Ref IsContentRedactionEnabled, 'true']
957-
- !Equals [!Ref TranscribeLanguageCode, 'en-US']
957+
- !Or
958+
- !Equals [!Ref TranscribeLanguageCode, 'en-US']
959+
- !Equals [!Ref TranscribeLanguageCode, 'en-AU']
960+
- !Equals [!Ref TranscribeLanguageCode, 'en-GB']
961+
- !Equals [!Ref TranscribeLanguageCode, 'es-US']
958962
ShouldEnableLambdaHook: !Not [!Equals [!Ref SiprecLambdaHookFunctionArn, '']]
959963
ShouldUseCreatedVoiceConnector: !Equals [!Ref CustomVoiceConnectorId, '']
960964

0 commit comments

Comments
 (0)