in src/main/java/com/amazonaws/kvstranscribestreaming/publisher/DynamoDBTranscriptionPublisher.java [72:92]
public void publishDone() {
Instant now = Instant.now();
logger.info("writing end of transcription to DDB for " + this.transactionId);
Item ddbItem = new Item()
.withKeyComponent(TRANSACTION_ID, this.transactionId)
.withKeyComponent(START_TIME, now.getEpochSecond())
.withString(CALL_ID, this.callId)
.withString(TRANSCRIPT, "END_OF_TRANSCRIPTION")
// LoggedOn is an ISO-8601 string representation of when the entry was created
.withString(LOGGED_ON, now.toString())
.withBoolean(IS_PARTIAL, Boolean.FALSE)
.withBoolean(IS_FINAL, Boolean.TRUE);
if (ddbItem != null) {
try {
getDdbClient().getTable(TABLE_TRANSCRIPT).putItem(ddbItem);
} catch (Exception e) {
logger.error("Exception while writing to DDB:", e);
}
}
}