[WIP/TEST] UI: 機能と見た目を繋ぎました。設定画面からいじれます。

This commit is contained in:
Sakamoto Shiina
2024-02-02 18:08:18 +09:00
parent 1de239549f
commit ee5c4c05ce
6 changed files with 145 additions and 2 deletions

View File

@@ -7,7 +7,7 @@ from ._createSettingBoxContainer import _createSettingBoxContainer
from .setting_box_containers.setting_box_appearance import createSettingBox_Appearance
from .setting_box_containers.setting_box_transcription import createSettingBox_Mic, createSettingBox_Speaker
from .setting_box_containers.setting_box_transcription import createSettingBox_Mic, createSettingBox_Speaker, createSettingBox_InternalModel
from .setting_box_containers.setting_box_others import createSettingBox_Others, createSettingBox_Others_SendMessageFormats, createSettingBox_Others_ReceivedMessageFormats, createSettingBox_Others_Additional
from .setting_box_containers.setting_box_advanced_settings import createSettingBox_AdvancedSettings
from .setting_box_containers.setting_box_translation import createSettingBox_Translation
@@ -94,6 +94,10 @@ def createSideMenuAndSettingsBoxContainers(config_window, settings, view_variabl
"var_section_title": view_variable.VAR_SECOND_TITLE_TRANSCRIPTION_SPEAKER,
"setting_box": createSettingBox_Speaker
},
{
"var_section_title": view_variable.VAR_SECOND_TITLE_TRANSCRIPTION_INTERNAL_MODEL,
"setting_box": createSettingBox_InternalModel
},
]
},
},

View File

@@ -1,2 +1,3 @@
from .createSettingBox_Mic import createSettingBox_Mic
from .createSettingBox_Speaker import createSettingBox_Speaker
from .createSettingBox_Speaker import createSettingBox_Speaker
from .createSettingBox_InternalModel import createSettingBox_InternalModel

View File

@@ -0,0 +1,37 @@
from utils import callFunctionIfCallable
from .._SettingBoxGenerator import _SettingBoxGenerator
def createSettingBox_InternalModel(setting_box_wrapper, config_window, settings, view_variable):
sbg = _SettingBoxGenerator(setting_box_wrapper, config_window, settings, view_variable)
createSettingBoxSwitch = sbg.createSettingBoxSwitch
createSettingBoxDropdownMenu = sbg.createSettingBoxDropdownMenu
def switchUseWhisperFeatureCallback(switch_widget):
callFunctionIfCallable(view_variable.CALLBACK_SET_USE_WHISPER_FEATURE, switch_widget.get())
def optionmenuWhisperWeightTypeCallback(value):
callFunctionIfCallable(view_variable.CALLBACK_SET_WHISPER_WEIGHT_TYPE, value)
row=0
config_window.sb__use_whisper_feature = createSettingBoxSwitch(
for_var_label_text=view_variable.VAR_LABEL_USE_WHISPER_FEATURE,
for_var_desc_text=view_variable.VAR_DESC_USE_WHISPER_FEATURE,
switch_attr_name="sb__switch_use_whisper_feature",
command=lambda: switchUseWhisperFeatureCallback(config_window.sb__switch_use_whisper_feature),
variable=view_variable.VAR_USE_WHISPER_FEATURE
)
config_window.sb__use_whisper_feature.grid(row=row, pady=0)
row+=1
config_window.sb__whisper_weight_type = createSettingBoxDropdownMenu(
for_var_label_text=view_variable.VAR_LABEL_WHISPER_WEIGHT_TYPE,
for_var_desc_text=view_variable.VAR_DESC_WHISPER_WEIGHT_TYPE,
optionmenu_attr_name="sb__optionmenu_whisper_weight_type",
dropdown_menu_values=view_variable.DICT_WHISPER_WEIGHT_TYPE,
command=lambda value: optionmenuWhisperWeightTypeCallback(value),
variable=view_variable.VAR_WHISPER_WEIGHT_TYPE,
)
config_window.sb__whisper_weight_type.grid(row=row, pady=0)
row+=1