NLPV commited on
Commit
dec117d
·
verified ·
1 Parent(s): 65516e4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -75,6 +75,7 @@ def transcribe_audio(audio_path, original_text):
75
  df_errors = pd.DataFrame(errors, columns=["बिगड़ा हुआ शब्द", "संभावित सही शब्द", "गलती का प्रकार"])
76
  # Speaking speed
77
  transcribed_words = transcription.strip().split()
 
78
  duration = result['segments'][-1]['end'] if result.get('segments') else 1.0
79
  speed = round(len(transcribed_words) / duration, 2) if duration > 0 else 0
80
  # Accuracy
 
75
  df_errors = pd.DataFrame(errors, columns=["बिगड़ा हुआ शब्द", "संभावित सही शब्द", "गलती का प्रकार"])
76
  # Speaking speed
77
  transcribed_words = transcription.strip().split()
78
+ transcribed_words = transcribed_words.translate(str.maketrans('', '', string.punctuation))
79
  duration = result['segments'][-1]['end'] if result.get('segments') else 1.0
80
  speed = round(len(transcribed_words) / duration, 2) if duration > 0 else 0
81
  # Accuracy