Skip to content
This repository has been archived by the owner on Mar 2, 2023. It is now read-only.

Commit

Permalink
Merge pull request #59 from khastation/master
Browse files Browse the repository at this point in the history
added code to delete raw files from KVSTranscribeStreamingLambda after uploading to S3
  • Loading branch information
khastation authored Jun 10, 2021
2 parents 7725961 + acb7344 commit bab4fd8
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,12 @@ private void closeFileAndUploadRawAudio(KVSStreamTrackObject kvsStreamTrackObjec
} else {
logger.info("Skipping upload to S3. saveCallRecording was disabled or audio file has 0 bytes: " + kvsStreamTrackObject.getSaveAudioFilePath().toString());
}

//Delete raw files from the lambda function
File fileToDelete = new File(kvsStreamTrackObject.getSaveAudioFilePath().toString());
if (fileToDelete != null) {
Boolean deletionResult = fileToDelete.delete();
logger.info("Raw file for contactId {} deletion result: {}", contactId, deletionResult);
}
}

/**
Expand Down

0 comments on commit bab4fd8

Please sign in to comment.