Quentin Fuxa commited on
Commit
8288540
·
2 Parent(s): 1fdbcae e4ad5e2

Merge pull request #113 from needabetterusername/implement-107

Browse files
whisperlivekit/whisper_streaming_custom/backends.py CHANGED
@@ -105,8 +105,9 @@ class FasterWhisperASR(ASRBase):
105
  model_size_or_path = modelsize
106
  else:
107
  raise ValueError("Either modelsize or model_dir must be set")
108
- device = "cuda" if torch and torch.cuda.is_available() else "cpu"
109
- compute_type = "float16" if device == "cuda" else "float32"
 
110
 
111
  model = WhisperModel(
112
  model_size_or_path,
 
105
  model_size_or_path = modelsize
106
  else:
107
  raise ValueError("Either modelsize or model_dir must be set")
108
+ device = "auto" # Allow CTranslate2 to decide available device
109
+ compute_type = "auto" # Allow CTranslate2 to decide faster compute type
110
+
111
 
112
  model = WhisperModel(
113
  model_size_or_path,