Allow CTranslate2 backend to choose device and compute types.
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 = "
|
| 109 |
-
compute_type = "
|
|
|
|
| 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,
|