👍️[Update] Controller : WHISPER_WEIGHT_TYPEに"none"を設定した場合の処理を追加

This commit is contained in:
misyaguziya
2024-10-31 17:10:51 +09:00
parent fd1140c813
commit 5e2aea8f7e
2 changed files with 26 additions and 18 deletions

View File

@@ -118,6 +118,8 @@ class Model:
return self.translator.isLoadedCTranslate2Model()
def checkTranscriptionWhisperModelWeight(self, weight_type:str):
if weight_type == "none":
return True
return checkWhisperWeight(config.PATH_LOCAL, weight_type)
def downloadWhisperModelWeight(self, weight_type, callback=None, end_callback=None):
@@ -424,7 +426,7 @@ class Model:
max_phrases=config.MIC_MAX_PHRASES,
transcription_engine=config.SELECTED_TRANSCRIPTION_ENGINE,
root=config.PATH_LOCAL,
whisper_weight_type=config.WHISPER_WEIGHT_TYPE,
whisper_weight_type=config.WHISPER_WEIGHT_TYPE if config.WHISPER_WEIGHT_TYPE != "none" else None,
device=config.SELECTED_TRANSCRIPTION_COMPUTE_DEVICE["device"],
device_index=config.SELECTED_TRANSCRIPTION_COMPUTE_DEVICE["device_index"],
)
@@ -588,7 +590,7 @@ class Model:
max_phrases=config.SPEAKER_MAX_PHRASES,
transcription_engine=config.SELECTED_TRANSCRIPTION_ENGINE,
root=config.PATH_LOCAL,
whisper_weight_type=config.WHISPER_WEIGHT_TYPE,
whisper_weight_type=config.WHISPER_WEIGHT_TYPE if config.WHISPER_WEIGHT_TYPE != "none" else None,
device=config.SELECTED_TRANSCRIPTION_COMPUTE_DEVICE["device"],
device_index=config.SELECTED_TRANSCRIPTION_COMPUTE_DEVICE["device_index"],
)