Spaces:
Build error
Build error
Commit
·
3f1e83a
1
Parent(s):
778f982
Update app.py
Browse files
app.py
CHANGED
@@ -51,12 +51,6 @@ def transcribe_video(video_url: str, word_timestamps: bool = True, model_size: s
|
|
51 |
segments, info = model.transcribe(f"{rand_id}.mp3", beam_size=5, word_timestamps=word_timestamps)
|
52 |
segments = [segment_to_dict(segment) for segment in segments]
|
53 |
total_duration = round(info.duration, 2) # Same precision as the Whisper timestamps.
|
54 |
-
with tqdm(total=total_duration, unit=" seconds") as pbar:
|
55 |
-
for segment in segments:
|
56 |
-
segment_duration = segment.end - segment.start
|
57 |
-
pbar.update(segment_duration)
|
58 |
-
|
59 |
-
print(pbar)
|
60 |
print(info)
|
61 |
os.remove(f"{rand_id}.mp3")
|
62 |
print("Detected language '%s' with probability %f" % (info.language, info.language_probability))
|
|
|
51 |
segments, info = model.transcribe(f"{rand_id}.mp3", beam_size=5, word_timestamps=word_timestamps)
|
52 |
segments = [segment_to_dict(segment) for segment in segments]
|
53 |
total_duration = round(info.duration, 2) # Same precision as the Whisper timestamps.
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
print(info)
|
55 |
os.remove(f"{rand_id}.mp3")
|
56 |
print("Detected language '%s' with probability %f" % (info.language, info.language_probability))
|