Skip to content

Commit

Permalink
ready for production deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
newtondotcom committed Apr 20, 2024
1 parent 3ed1de9 commit 3685fdd
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions worker/gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ def get_transcribe(audio_file, align=False):
tac = time.perf_counter()
print("Audio splitting took ",tac-tic," seconds")

#tic= time.perf_counter()
#result = model.transcribe(audio, batch_size=batch_size)
#toc = time.perf_counter()
#print("Transcription took ", toc - tic, " seconds")
tic= time.perf_counter()
result = model.transcribe(audio, batch_size=batch_size)
toc = time.perf_counter()
print("Transcription took ", toc - tic, " seconds")

#if align:
#return result['segments']
if align:
return result['segments']

# 2. Align whisper output
model_a, metadata = whisperx.load_align_model(language_code="fr", device=device)
Expand Down

0 comments on commit 3685fdd

Please sign in to comment.