[WIP/TEST] distil-wisperの処理を追加
This commit is contained in:
@@ -812,6 +812,9 @@ class Config:
|
|||||||
"large-v1": "large-v1",
|
"large-v1": "large-v1",
|
||||||
"large-v2": "large-v2",
|
"large-v2": "large-v2",
|
||||||
"large-v3": "large-v3",
|
"large-v3": "large-v3",
|
||||||
|
"distil-small": "distil-small",
|
||||||
|
"distil-medium": "distil-medium",
|
||||||
|
"distil-large-v2": "distil-large-v2",
|
||||||
}
|
}
|
||||||
|
|
||||||
self._MAX_MIC_ENERGY_THRESHOLD = 2000
|
self._MAX_MIC_ENERGY_THRESHOLD = 2000
|
||||||
|
|||||||
@@ -925,6 +925,12 @@ def createMainWindow(splash):
|
|||||||
# set Translation Engine
|
# set Translation Engine
|
||||||
updateTranslationEngineAndEngineList()
|
updateTranslationEngineAndEngineList()
|
||||||
|
|
||||||
|
# set Transcription Engine
|
||||||
|
if config.USE_WHISPER_FEATURE is True:
|
||||||
|
config.SELECTED_TRANSCRIPTION_ENGINE = "Whisper"
|
||||||
|
else:
|
||||||
|
config.SELECTED_TRANSCRIPTION_ENGINE = "Google"
|
||||||
|
|
||||||
# set word filter
|
# set word filter
|
||||||
model.addKeywords()
|
model.addKeywords()
|
||||||
|
|
||||||
|
|||||||
@@ -140,6 +140,9 @@ config_window:
|
|||||||
large_v1: "large_v1 model (%{capacity})"
|
large_v1: "large_v1 model (%{capacity})"
|
||||||
large_v2: "large_v2 model (%{capacity})"
|
large_v2: "large_v2 model (%{capacity})"
|
||||||
large_v3: "large_v3 model (%{capacity})"
|
large_v3: "large_v3 model (%{capacity})"
|
||||||
|
distil_small: "distil-small model (%{capacity})"
|
||||||
|
distil_medium: "distil-medium model (%{capacity})"
|
||||||
|
distil_large_v2: "distil-large-v2 model (%{capacity})"
|
||||||
|
|
||||||
deepl_auth_key:
|
deepl_auth_key:
|
||||||
label: DeepL Auth Key
|
label: DeepL Auth Key
|
||||||
|
|||||||
2
main.py
2
main.py
@@ -13,9 +13,9 @@ if __name__ == "__main__":
|
|||||||
downloadCTranslate2Weight(config.PATH_LOCAL, config.CTRANSLATE2_WEIGHT_TYPE, splash.updateDownloadProgress)
|
downloadCTranslate2Weight(config.PATH_LOCAL, config.CTRANSLATE2_WEIGHT_TYPE, splash.updateDownloadProgress)
|
||||||
|
|
||||||
from models.transcription.transcription_whisper import downloadWhisperWeight
|
from models.transcription.transcription_whisper import downloadWhisperWeight
|
||||||
# whisperのダウンロードの説明に変更する必要あり
|
|
||||||
if config.USE_WHISPER_FEATURE is True:
|
if config.USE_WHISPER_FEATURE is True:
|
||||||
downloadWhisperWeight(config.PATH_LOCAL, config.WHISPER_WEIGHT_TYPE, splash.updateDownloadProgress)
|
downloadWhisperWeight(config.PATH_LOCAL, config.WHISPER_WEIGHT_TYPE, splash.updateDownloadProgress)
|
||||||
|
|
||||||
splash.toProgress(0)
|
splash.toProgress(0)
|
||||||
|
|
||||||
import controller
|
import controller
|
||||||
|
|||||||
@@ -15,6 +15,9 @@ _MODELS = {
|
|||||||
"large-v1": "Systran/faster-whisper-large-v1",
|
"large-v1": "Systran/faster-whisper-large-v1",
|
||||||
"large-v2": "Systran/faster-whisper-large-v2",
|
"large-v2": "Systran/faster-whisper-large-v2",
|
||||||
"large-v3": "Systran/faster-whisper-large-v3",
|
"large-v3": "Systran/faster-whisper-large-v3",
|
||||||
|
"distil-small": "Systran/faster-distil-whisper-small.en",
|
||||||
|
"distil-medium": "Systran/faster-distil-whisper-medium.en",
|
||||||
|
"distil-large-v2": "Systran/faster-distil-whisper-large-v2"
|
||||||
}
|
}
|
||||||
|
|
||||||
_FILENAMES = [
|
_FILENAMES = [
|
||||||
|
|||||||
17
view.py
17
view.py
@@ -947,13 +947,16 @@ class View():
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def getSelectableWhisperWeightTypeDict():
|
def getSelectableWhisperWeightTypeDict():
|
||||||
return {
|
return {
|
||||||
config.SELECTABLE_WHISPER_WEIGHT_TYPE_DICT["tiny"]: i18n.t("config_window.whisper_weight_type.tiny", capacity="t"),
|
config.SELECTABLE_WHISPER_WEIGHT_TYPE_DICT["tiny"]: i18n.t("config_window.whisper_weight_type.tiny", capacity="74.5MB"),
|
||||||
config.SELECTABLE_WHISPER_WEIGHT_TYPE_DICT["base"]: i18n.t("config_window.whisper_weight_type.base", capacity="b"),
|
config.SELECTABLE_WHISPER_WEIGHT_TYPE_DICT["base"]: i18n.t("config_window.whisper_weight_type.base", capacity="141MB"),
|
||||||
config.SELECTABLE_WHISPER_WEIGHT_TYPE_DICT["small"]: i18n.t("config_window.whisper_weight_type.small", capacity="s"),
|
config.SELECTABLE_WHISPER_WEIGHT_TYPE_DICT["small"]: i18n.t("config_window.whisper_weight_type.small", capacity="463MB"),
|
||||||
config.SELECTABLE_WHISPER_WEIGHT_TYPE_DICT["medium"]: i18n.t("config_window.whisper_weight_type.medium", capacity="m"),
|
config.SELECTABLE_WHISPER_WEIGHT_TYPE_DICT["medium"]: i18n.t("config_window.whisper_weight_type.medium", capacity="1.42GB"),
|
||||||
config.SELECTABLE_WHISPER_WEIGHT_TYPE_DICT["large-v1"]: i18n.t("config_window.whisper_weight_type.large_v1", capacity="l_v1"),
|
config.SELECTABLE_WHISPER_WEIGHT_TYPE_DICT["large-v1"]: i18n.t("config_window.whisper_weight_type.large_v1", capacity="2.87GB"),
|
||||||
config.SELECTABLE_WHISPER_WEIGHT_TYPE_DICT["large-v2"]: i18n.t("config_window.whisper_weight_type.large_v2", capacity="l_v2"),
|
config.SELECTABLE_WHISPER_WEIGHT_TYPE_DICT["large-v2"]: i18n.t("config_window.whisper_weight_type.large_v2", capacity="2.87GB"),
|
||||||
config.SELECTABLE_WHISPER_WEIGHT_TYPE_DICT["large-v3"]: i18n.t("config_window.whisper_weight_type.large_v3", capacity="l_v3"),
|
config.SELECTABLE_WHISPER_WEIGHT_TYPE_DICT["large-v3"]: i18n.t("config_window.whisper_weight_type.large_v3", capacity="2.87GB"),
|
||||||
|
config.SELECTABLE_WHISPER_WEIGHT_TYPE_DICT["distil-small"]: i18n.t("config_window.whisper_weight_type.distil_small", capacity="319MB"),
|
||||||
|
config.SELECTABLE_WHISPER_WEIGHT_TYPE_DICT["distil-medium"]: i18n.t("config_window.whisper_weight_type.distil_medium", capacity="755MB"),
|
||||||
|
config.SELECTABLE_WHISPER_WEIGHT_TYPE_DICT["distil-large-v2"]: i18n.t("config_window.whisper_weight_type.distil_large_v2", capacity="1.41GB"),
|
||||||
}
|
}
|
||||||
|
|
||||||
# Open Webpage Functions
|
# Open Webpage Functions
|
||||||
|
|||||||
Reference in New Issue
Block a user