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

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
  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
 
75
  df_errors = pd.DataFrame(errors, columns=["बिगड़ा हुआ शब्द", "संभावित सही शब्द", "गलती का प्रकार"])
76
  # Speaking speed
77
  transcription = transcription.translate(str.maketrans('', '', string.punctuation))
78
+ transcription = transcription.replace(',',' ')
79
  transcribed_words = transcription.strip().split()
80
  duration = result['segments'][-1]['end'] if result.get('segments') else 1.0
81
  speed = round(len(transcribed_words) / duration, 2) if duration > 0 else 0