Skip to content

Commit

Permalink
🔇 move printouts into logging
Browse files Browse the repository at this point in the history
Signed-off-by: peter szemraj <[email protected]>
  • Loading branch information
pszemraj committed Oct 11, 2022
1 parent a3b86e6 commit 8dca3c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vid2cleantxt/transcribe.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,9 +263,9 @@ def transcribe_video_whisper(
chunk_directory = prep_transc_pydub(
clip_name, clip_directory, ac_storedir, chunk_dur, verbose=verbose
)
torch_validate_cuda()
gc.collect()
device = "cuda" if torch.cuda.is_available() else "cpu"
logging.info(f"transcribing on {device}")
full_transc = []
GPU_update_incr = (
math.ceil(len(chunk_directory) / 2) if len(chunk_directory) > 1 else 1
Expand Down Expand Up @@ -390,9 +390,9 @@ def transcribe_video_wav2vec(
chunk_directory = prep_transc_pydub(
clip_name, clip_directory, ac_storedir, chunk_dur, verbose=verbose
) # split the video into chunks
torch_validate_cuda()
gc.collect()
device = "cuda" if torch.cuda.is_available() else "cpu" # set device
logging.info(f"transcribing on {device}")
full_transc = []
GPU_update_incr = (
math.ceil(len(chunk_directory) / 2) if len(chunk_directory) > 1 else 1
Expand Down

0 comments on commit 8dca3c3

Please sign in to comment.