diff --git a/controller.py b/controller.py index cd77fd76..e013a425 100644 --- a/controller.py +++ b/controller.py @@ -672,8 +672,6 @@ def createMainWindow(): "callback_set_mic_word_filter": callbackSetMicWordFilter, # Transcription Tab (Speaker) - # "callback_set_speaker_device": callbackSetSpeakerDevice, - "list_speaker_device": model.getListOutputDevice(), "callback_set_speaker_energy_threshold": callbackSetSpeakerEnergyThreshold, "callback_set_speaker_dynamic_energy_threshold": callbackSetSpeakerDynamicEnergyThreshold, "callback_check_speaker_threshold": callbackCheckSpeakerThreshold, diff --git a/locales/en.yml b/locales/en.yml index bf153767..85c2b5d7 100644 --- a/locales/en.yml +++ b/locales/en.yml @@ -102,8 +102,7 @@ config_window: label: Mic Word Filter desc: "It will not send the sentence if the word(s) included in the set list of words.\nHow to set: e.g. AAA,BBB,CCC" - speaker_device: - label: Speaker Device + speaker_dynamic_energy_threshold: label_for_automatic: "Speaker Energy Threshold (Current Setting: Automatic)" desc_for_automatic: "Automatically determine speaker input sensitivity." diff --git a/locales/ja.yml b/locales/ja.yml index a823c097..6b6a5705 100644 --- a/locales/ja.yml +++ b/locales/ja.yml @@ -102,8 +102,7 @@ config_window: label: ワードフィルター desc: "設定された単語を検出すると、その文章は送信されません。\n設定の例: AAA,BBB,CCC" - speaker_device: - label: スピーカー(デバイス) + speaker_dynamic_energy_threshold: label_for_automatic: "スピーカー入力感度の調整 (現在の設定: 自動)" desc_for_automatic: スピーカーの入力感度を自動的に調節する。 diff --git a/view.py b/view.py index 442c66e2..a46018b0 100644 --- a/view.py +++ b/view.py @@ -253,13 +253,6 @@ class View(): # Transcription Tab (Speaker) - VAR_LABEL_SPEAKER_DEVICE=StringVar(value=i18n.t("config_window.speaker_device.label")), - VAR_DESC_SPEAKER_DEVICE=None, - LIST_SPEAKER_DEVICE=[], - CALLBACK_SET_SPEAKER_DEVICE=None, - VAR_SPEAKER_DEVICE=StringVar(value=config.CHOICE_SPEAKER_DEVICE), - - VAR_LABEL_SPEAKER_DYNAMIC_ENERGY_THRESHOLD=StringVar(value=""), VAR_DESC_SPEAKER_DYNAMIC_ENERGY_THRESHOLD=StringVar(value=""), CALLBACK_SET_SPEAKER_DYNAMIC_ENERGY_THRESHOLD=None, @@ -432,9 +425,6 @@ class View(): self.view_variable.CALLBACK_SET_MIC_WORD_FILTER = config_window_registers.get("callback_set_mic_word_filter", None) # Transcription Tab (Speaker) - self.view_variable.CALLBACK_SET_SPEAKER_DEVICE = config_window_registers.get("callback_set_speaker_device", None) - config_window_registers.get("list_speaker_device", None) and self.updateList_SpeakerDevice(config_window_registers["list_speaker_device"]) - self.view_variable.CALLBACK_SET_SPEAKER_ENERGY_THRESHOLD = config_window_registers.get("callback_set_speaker_energy_threshold", None) self.view_variable.CALLBACK_SET_SPEAKER_DYNAMIC_ENERGY_THRESHOLD = config_window_registers.get("callback_set_speaker_dynamic_energy_threshold", None) self.view_variable.CALLBACK_CHECK_SPEAKER_THRESHOLD = config_window_registers.get("callback_check_speaker_threshold", None) @@ -484,17 +474,6 @@ class View(): ) self.replaceMicThresholdCheckButton_Disabled() - if config.CHOICE_SPEAKER_DEVICE == "NoDevice": - self.view_variable.VAR_SPEAKER_DEVICE.set("No Speaker Device Detected") - vrct_gui._changeConfigWindowWidgetsStatus( - status="disabled", - target_names=[ - "sb__optionmenu_speaker_device", - ] - ) - self.replaceSpeakerThresholdCheckButton_Disabled() - - if config.INPUT_MIC_DYNAMIC_ENERGY_THRESHOLD is True: self.closeMicEnergyThresholdWidget() @@ -789,10 +768,7 @@ class View(): def initSpeakerThresholdCheckButton(self): - if config.CHOICE_SPEAKER_DEVICE == "NoDevice": - self.replaceSpeakerThresholdCheckButton_Disabled() - else: - self.replaceSpeakerThresholdCheckButton_Passive() + self.replaceSpeakerThresholdCheckButton_Passive() @staticmethod def replaceSpeakerThresholdCheckButton_Active(): @@ -844,13 +820,6 @@ class View(): vrct_gui.config_window.sb__progressbar_x_slider__progressbar_mic_energy_threshold.set(0) - def updateList_SpeakerDevice(self, new_speaker_device_list:list): - self.view_variable.LIST_SPEAKER_DEVICE = new_speaker_device_list - vrct_gui.dropdown_menu_window.updateDropdownMenuValues( - dropdown_menu_widget_id="sb__optionmenu_speaker_device", - dropdown_menu_values=new_speaker_device_list, - ) - @staticmethod def updateSetProgressBar_SpeakerEnergy(new_speaker_energy): vrct_gui.config_window.sb__progressbar_x_slider__progressbar_speaker_energy_threshold.set(new_speaker_energy/config.MAX_SPEAKER_ENERGY_THRESHOLD) diff --git a/vrct_gui/_changeConfigWindowWidgetsStatus.py b/vrct_gui/_changeConfigWindowWidgetsStatus.py index 0263837b..95ebb187 100644 --- a/vrct_gui/_changeConfigWindowWidgetsStatus.py +++ b/vrct_gui/_changeConfigWindowWidgetsStatus.py @@ -27,11 +27,6 @@ def _changeConfigWindowWidgetsStatus(config_window, settings, view_variable, sta target_widget = config_window.sb__widgets["sb__optionmenu_mic_device"] disableOptionmenuWidget(target_widget) - case "sb__optionmenu_speaker_device": - if status == "disabled": - target_widget = config_window.sb__widgets["sb__optionmenu_speaker_device"] - disableOptionmenuWidget(target_widget) - case "sb__optionmenu_appearance_theme": if status == "disabled": target_widget = config_window.sb__widgets["sb__optionmenu_appearance_theme"] diff --git a/vrct_gui/config_window/widgets/createSideMenuAndSettingsBoxContainers/setting_box_containers/setting_box_transcription/createSettingBox_Speaker.py b/vrct_gui/config_window/widgets/createSideMenuAndSettingsBoxContainers/setting_box_containers/setting_box_transcription/createSettingBox_Speaker.py index 64ec1854..a9d1ad9b 100644 --- a/vrct_gui/config_window/widgets/createSideMenuAndSettingsBoxContainers/setting_box_containers/setting_box_transcription/createSettingBox_Speaker.py +++ b/vrct_gui/config_window/widgets/createSideMenuAndSettingsBoxContainers/setting_box_containers/setting_box_transcription/createSettingBox_Speaker.py @@ -4,7 +4,6 @@ from .._SettingBoxGenerator import _SettingBoxGenerator def createSettingBox_Speaker(setting_box_wrapper, config_window, settings, view_variable): sbg = _SettingBoxGenerator(setting_box_wrapper, config_window, settings, view_variable) - createSettingBoxDropdownMenu = sbg.createSettingBoxDropdownMenu createSettingBoxSwitch = sbg.createSettingBoxSwitch createSettingBoxProgressbarXSlider = sbg.createSettingBoxProgressbarXSlider createSettingBoxEntry = sbg.createSettingBoxEntry @@ -14,9 +13,6 @@ def createSettingBox_Speaker(setting_box_wrapper, config_window, settings, view_ callFunctionIfCallable(view_variable.CALLBACK_CHECK_SPEAKER_THRESHOLD, is_turned_on) - def optionmenu_input_speaker_device_callback(value): - callFunctionIfCallable(view_variable.CALLBACK_SET_SPEAKER_DEVICE, value) - def slider_input_speaker_energy_threshold_callback(value): callFunctionIfCallable(view_variable.CALLBACK_SET_SPEAKER_ENERGY_THRESHOLD, value) @@ -36,18 +32,6 @@ def createSettingBox_Speaker(setting_box_wrapper, config_window, settings, view_ row=0 - config_window.sb__speaker_device = createSettingBoxDropdownMenu( - for_var_label_text=view_variable.VAR_LABEL_SPEAKER_DEVICE, - for_var_desc_text=view_variable.VAR_DESC_SPEAKER_DEVICE, - optionmenu_attr_name="sb__optionmenu_speaker_device", - dropdown_menu_values=view_variable.LIST_SPEAKER_DEVICE, - dropdown_menu_width=settings.uism.RESPONSIVE_UI_SIZE_INT_500, - command=lambda value: optionmenu_input_speaker_device_callback(value), - variable=view_variable.VAR_SPEAKER_DEVICE, - ) - config_window.sb__speaker_device.grid(row=row) - row+=1 - config_window.sb__speaker_dynamic_energy_threshold = createSettingBoxSwitch( for_var_label_text=view_variable.VAR_LABEL_SPEAKER_DYNAMIC_ENERGY_THRESHOLD, for_var_desc_text=view_variable.VAR_DESC_SPEAKER_DYNAMIC_ENERGY_THRESHOLD,