modified server.py for ease of choosing faster-whisper-device

This commit is contained in:
ArrangingFear56
2024-12-10 01:03:49 +08:00
parent dbec27b18a
commit d86a8622c3
3 changed files with 5 additions and 3 deletions

View File

@@ -21,6 +21,7 @@ RECORDING_FILE_PATH = "stt_test.wav"
model_size = "large-v3-turbo"
def load_model(file_path=None,whisper_device="cuda",whisper_compute_type='float16'):
"""
Load given vosk model from file or default to en-us model.