Skip to content

Commit

Permalink
Merge pull request #37 from saharmor/fix/unknown_label-error_handling
Browse files Browse the repository at this point in the history
Implemented error handling for silence suppression call
  • Loading branch information
ethanzrd authored Aug 13, 2023
2 parents 8567639 + eb1f200 commit 7570aa1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions backend/transcription/whisper_transcriber.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ def transcribe(self, audio):
if aligned_transcription['text'] == "":
logging.info("Empty aligned transcription, defaulting to original")
return self.current_transcription
except ValueError:
logging.info("Transcription alignment failed, defaulting to original")
except Exception as e:
logging.info(f"Transcription alignment failed, defaulting to original. Error: {e}")
return self.current_transcription

return aligned_transcription
Expand Down
2 changes: 1 addition & 1 deletion interface/src/TranscribeOutput.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const TranscribeOutput = ({ data, classes }) => {
const text = item.text;
let speakerName = "";

if (speaker === -1) {
if (speaker === "unknown") {
speakerName = "Unknown Speaker";
} else {
speakerName = `Speaker ${speaker + 1}`;
Expand Down

0 comments on commit 7570aa1

Please sign in to comment.