in src/main/java/transcribe/Transcribe.java [217:252]
public TranscriptionResponseDTO extractSpeechTextFromAudio(String fileName) {
System.out.println("Request to extract Speech Text from Audio : "+fileName);
// Create a key that is like name for file and will be used for creating unique name based id for transcription job
String key = fileName.replaceAll(" ", "_").toLowerCase();
// Start Transcription Job and get result
//System.out.println("1...");
StartTranscriptionJobResult startTranscriptionJobResult = startTranscriptionJob(key);
// Get name of job started for the file
//System.out.println("2...");
String transcriptionJobName = startTranscriptionJobResult.getTranscriptionJob().getTranscriptionJobName();
// Get result after the procesiing is complete
//System.out.println("3...");
GetTranscriptionJobResult getTranscriptionJobResult = getTranscriptionJobResult(transcriptionJobName);
//delete file as processing is done
//System.out.println("4...");
deleteFileFromAwsBucket(key);
// Url of result file for transcription
//System.out.println("5...");
String transcriptFileUriString = getTranscriptionJobResult.getTranscriptionJob().getTranscript().getTranscriptFileUri();
// Get the transcription response by downloading the file
//System.out.println("6...");
TranscriptionResponseDTO transcriptionResponseDTO = downloadTranscriptionResponse(transcriptFileUriString);
//Delete the transcription job after finishing or it will get deleted after 90 days automatically if you do not call
deleteTranscriptionJob(transcriptionJobName);
return transcriptionResponseDTO;
}