Manjot Singh commited on
Commit
e14e19e
·
1 Parent(s): dbbb6ed

added device=0 if cuda avbl

Browse files
Files changed (1) hide show
  1. audio_processing.py +1 -1
audio_processing.py CHANGED
@@ -35,7 +35,7 @@ def process_audio(audio_file, translate=False, model_size="small"):
35
  start_time = time.time()
36
 
37
  try:
38
- device = "cuda" if torch.cuda.is_available() else "cpu"
39
  print(f"Using device: {device}")
40
  compute_type = "float16"
41
  audio = whisperx.load_audio(audio_file)
 
35
  start_time = time.time()
36
 
37
  try:
38
+ device = 0 if torch.cuda.is_available() else "cpu"
39
  print(f"Using device: {device}")
40
  compute_type = "float16"
41
  audio = whisperx.load_audio(audio_file)