NLPV commited on
Commit
6cca945
·
verified ·
1 Parent(s): dec117d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -74,8 +74,8 @@ def transcribe_audio(audio_path, original_text):
74
  errors = compare_hindi_sentences(original_text, transcription)
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
 
74
  errors = compare_hindi_sentences(original_text, transcription)
75
  df_errors = pd.DataFrame(errors, columns=["बिगड़ा हुआ शब्द", "संभावित सही शब्द", "गलती का प्रकार"])
76
  # Speaking speed
77
+ transcription = transcription.translate(str.maketrans('', '', string.punctuation))
78
+ transcribed_words = transcription.strip().split()
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