Skip to content

Commit

Permalink
Enabled multithreaded transcribing again as I'm not sure if it's only…
Browse files Browse the repository at this point in the history
… my env which OOMs
  • Loading branch information
BoneGoat committed Jul 3, 2020
1 parent bf75606 commit 4c4b1ec
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions align/align.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,15 +485,10 @@ def pre_filter():

samples = list(progress(pre_filter(), desc='VAD splitting'))

# TODO: OOM
#pool = multiprocessing.Pool(initializer=init_stt,
# initargs=(output_graph_path, scorer_path),
# processes=args.stt_workers)
#transcripts = list(progress(pool.imap(stt, samples), desc='Transcribing', total=len(samples)))
transcripts = []
init_stt(output_graph_path, scorer_path)
for sample in samples:
transcripts.append(stt(sample))
pool = multiprocessing.Pool(initializer=init_stt,
initargs=(output_graph_path, scorer_path),
processes=args.stt_workers)
transcripts = list(progress(pool.imap(stt, samples), desc='Transcribing', total=len(samples)))

fragments = []
for time_start, time_end, segment_transcript in transcripts:
Expand Down

0 comments on commit 4c4b1ec

Please sign in to comment.