Neprox commited on
Commit
51423ee
1 Parent(s): 4bedefc
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -15,7 +15,7 @@ def download_from_youtube(url):
15
  def get_timestamp(seconds):
16
  minutes = int(seconds / 60)
17
  seconds = int(seconds % 60)
18
- return f"{minutes}:{seconds}"
19
 
20
  def divide_into_30s_segments(audio_fpath, seconds_max):
21
  if not os.path.exists("segmented_audios"):
@@ -64,8 +64,6 @@ def transcribe(audio, url, seconds_max):
64
  print(audio_dataset)
65
  print(audio_dataset[0])
66
  pred = pipe(audio_dataset["audio"])
67
- print(type(text))
68
- print(text)
69
  text = ""
70
  n_segments = len(segment_start_times)
71
  for i, (seconds, output) in enumerate(zip(segment_start_times, pred)):
 
15
  def get_timestamp(seconds):
16
  minutes = int(seconds / 60)
17
  seconds = int(seconds % 60)
18
+ return f"{str(minutes).zfill(2)}:{str(seconds).zfill(2)}"
19
 
20
  def divide_into_30s_segments(audio_fpath, seconds_max):
21
  if not os.path.exists("segmented_audios"):
 
64
  print(audio_dataset)
65
  print(audio_dataset[0])
66
  pred = pipe(audio_dataset["audio"])
 
 
67
  text = ""
68
  n_segments = len(segment_start_times)
69
  for i, (seconds, output) in enumerate(zip(segment_start_times, pred)):