msis commited on
Commit
7bf4d2e
·
1 Parent(s): af44ea2

parse to float first

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -45,8 +45,8 @@ def transcribe(audio_file):
45
 
46
 
47
  def get_duration_ms(audio_file):
48
- duration = mediainfo(audio_file)["duration"]
49
- duration_ms = int(duration) * 1000
50
  return duration_ms
51
 
52
 
 
45
 
46
 
47
  def get_duration_ms(audio_file):
48
+ duration = mediainfo(audio_file)["duration"] # a string in seconds
49
+ duration_ms = int(float(duration) * 1000)
50
  return duration_ms
51
 
52