From 60e73760a7a8391bec8567ac880212aec92e1db8 Mon Sep 17 00:00:00 2001 From: Sakamoto Shiina <68018796+ShiinaSakamoto@users.noreply.github.com> Date: Tue, 12 Sep 2023 23:24:05 +0900 Subject: [PATCH] =?UTF-8?q?[bugfix]=20CTkEntry=E7=B3=BB=E3=81=A7=E3=80=81?= =?UTF-8?q?=E5=85=A5=E5=8A=9B=E5=80=A4=E3=81=AB=E7=B0=A1=E6=98=93=E3=83=90?= =?UTF-8?q?=E3=83=AA=E3=83=87=E3=83=BC=E3=82=B7=E3=83=A7=E3=83=B3=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0=E3=80=82=20Tkinter=E3=81=AEVariable=E3=82=92=E4=BD=BF?= =?UTF-8?q?=E3=81=A3=E3=81=A6=E3=81=84=E3=82=8BCTkEntry=E3=81=AF=E3=80=81?= =?UTF-8?q?=E5=9E=8B=E3=82=92=E5=8F=AF=E8=83=BD=E3=81=AA=E3=82=82=E3=81=AE?= =?UTF-8?q?=E3=81=AFStrings=E5=9E=8B=E3=81=AB=E3=80=82(=E7=A9=BA=E6=96=87?= =?UTF-8?q?=E5=AD=97=E3=81=AA=E3=81=A9int=E5=9E=8B=E3=81=AB=E5=A4=89?= =?UTF-8?q?=E6=8F=9B=E3=81=A7=E3=81=8D=E3=81=9A=E3=82=A8=E3=83=A9=E3=83=BC?= =?UTF-8?q?=E3=81=AB=E3=81=AA=E3=81=A3=E3=81=A6=E3=81=97=E3=81=BE=E3=81=86?= =?UTF-8?q?=E3=81=AE=E3=81=A7)=20UI=E5=81=B4=E3=81=A7=E3=81=AF=E3=81=A9?= =?UTF-8?q?=E3=82=93=E3=81=AA=E5=9E=8B=E3=81=A7=E3=81=82=E3=82=8C=E5=80=A4?= =?UTF-8?q?=E3=81=A7=E3=81=82=E3=82=8C=E3=82=B3=E3=83=B3=E3=83=88=E3=83=AD?= =?UTF-8?q?=E3=83=BC=E3=83=A9=E3=81=B8=E5=80=A4=E3=82=92=E6=B8=A1=E3=81=97?= =?UTF-8?q?=E3=80=81=E3=82=B3=E3=83=B3=E3=83=88=E3=83=AD=E3=83=BC=E3=83=A9?= =?UTF-8?q?=E3=81=8C=E5=88=A4=E6=96=AD=E3=81=97=E3=81=A6=E5=87=A6=E7=90=86?= =?UTF-8?q?=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB(CTkEntry=E3=81=AB?= =?UTF-8?q?=E3=82=BB=E3=83=83=E3=83=88=E3=81=97=E3=81=9F=E3=82=8A=E5=80=A4?= =?UTF-8?q?=E3=82=92=E5=89=8A=E9=99=A4=E3=81=97=E3=81=9F=E3=82=8A)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 78 +++++++++++++++++-- view.py | 73 ++++++++++++++--- .../_SettingBoxGenerator.py | 24 ++---- .../createSettingBox_Mic.py | 4 +- .../createSettingBox_Speaker.py | 4 +- 5 files changed, 146 insertions(+), 37 deletions(-) diff --git a/main.py b/main.py index ef3ac904..0d90847a 100644 --- a/main.py +++ b/main.py @@ -293,8 +293,21 @@ def callbackSetMicDevice(value): view.replaceConfigWindowMicThresholdCheckButtonToPassive() def callbackSetMicEnergyThreshold(value): - print("callbackSetMicEnergyThreshold", int(value)) + print("callbackSetMicEnergyThreshold", value) + try: + if 0 > int(value) or int(value) > config.MAX_MIC_ENERGY_THRESHOLD: raise ValueError() + except: + view.setGuiVariable_MicEnergyThreshold( + slider_value=config.INPUT_MIC_ENERGY_THRESHOLD, + entry_value=None, + ) + return config.INPUT_MIC_ENERGY_THRESHOLD = int(value) + view.setGuiVariable_MicEnergyThreshold( + slider_value=config.INPUT_MIC_ENERGY_THRESHOLD, + entry_value=str(config.INPUT_MIC_ENERGY_THRESHOLD), + ) + def callbackSetMicDynamicEnergyThreshold(value): print("callbackSetMicDynamicEnergyThreshold", value) @@ -321,16 +334,34 @@ def callbackCheckMicThreshold(is_turned_on): # view.setConfigWindowCompactModeSwitchStatusToNormal() def callbackSetMicRecordTimeout(value): - print("callbackSetMicRecordTimeout", int(value)) + print("callbackSetMicRecordTimeout", value) + try: + if int(value) < 0: raise ValueError() + except: + view.setGuiVariable_MicRecordTimeout(delete=True) + return config.INPUT_MIC_RECORD_TIMEOUT = int(value) + view.setGuiVariable_MicRecordTimeout(str(config.INPUT_MIC_RECORD_TIMEOUT)) def callbackSetMicPhraseTimeout(value): - print("callbackSetMicPhraseTimeout", int(value)) + print("callbackSetMicPhraseTimeout", value) + try: + if int(value) < 0: raise ValueError() + except: + view.setGuiVariable_MicPhraseTimeout(delete=True) + return config.INPUT_MIC_PHRASE_TIMEOUT = int(value) + view.setGuiVariable_MicPhraseTimeout(str(config.INPUT_MIC_PHRASE_TIMEOUT)) def callbackSetMicMaxPhrases(value): - print("callbackSetMicMaxPhrases", int(value)) + print("callbackSetMicMaxPhrases", value) + try: + if int(value) < 0: raise ValueError() + except: + view.setGuiVariable_MicMaxPhrases(delete=True) + return config.INPUT_MIC_MAX_PHRASES = int(value) + view.setGuiVariable_MicMaxPhrases(str(config.INPUT_MIC_MAX_PHRASES)) def callbackSetMicWordFilter(value): print("callbackSetMicWordFilter", value) @@ -354,8 +385,21 @@ def callbackSetSpeakerDevice(value): view.replaceConfigWindowSpeakerThresholdCheckButtonToPassive() def callbackSetSpeakerEnergyThreshold(value): - print("callbackSetSpeakerEnergyThreshold", int(value)) + print("callbackSetSpeakerEnergyThreshold", value) + try: + if 0 > int(value) or int(value) > config.MAX_SPEAKER_ENERGY_THRESHOLD: raise ValueError() + except: + view.setGuiVariable_SpeakerEnergyThreshold( + slider_value=config.INPUT_SPEAKER_ENERGY_THRESHOLD, + entry_value=None, + ) + return config.INPUT_SPEAKER_ENERGY_THRESHOLD = int(value) + view.setGuiVariable_SpeakerEnergyThreshold( + slider_value=config.INPUT_SPEAKER_ENERGY_THRESHOLD, + entry_value=str(config.INPUT_SPEAKER_ENERGY_THRESHOLD), + ) + def callbackSetSpeakerDynamicEnergyThreshold(value): print("callbackSetSpeakerDynamicEnergyThreshold", value) @@ -383,16 +427,34 @@ def callbackCheckSpeakerThreshold(is_turned_on): # view.setConfigWindowCompactModeSwitchStatusToNormal() def callbackSetSpeakerRecordTimeout(value): - print("callbackSetSpeakerRecordTimeout", int(value)) + print("callbackSetSpeakerRecordTimeout", value) + try: + if int(value) < 0: raise ValueError() + except: + view.setGuiVariable_SpeakerRecordTimeout(delete=True) + return config.INPUT_SPEAKER_RECORD_TIMEOUT = int(value) + view.setGuiVariable_SpeakerRecordTimeout(str(config.INPUT_SPEAKER_RECORD_TIMEOUT)) def callbackSetSpeakerPhraseTimeout(value): - print("callbackSetSpeakerPhraseTimeout", int(value)) + print("callbackSetSpeakerPhraseTimeout", value) + try: + if int(value) < 0: raise ValueError() + except: + view.setGuiVariable_SpeakerPhraseTimeout(delete=True) + return config.INPUT_SPEAKER_PHRASE_TIMEOUT = int(value) + view.setGuiVariable_SpeakerPhraseTimeout(str(config.INPUT_SPEAKER_PHRASE_TIMEOUT)) def callbackSetSpeakerMaxPhrases(value): - print("callbackSetSpeakerMaxPhrases", int(value)) + print("callbackSetSpeakerMaxPhrases", value) + try: + if int(value) < 0: raise ValueError() + except: + view.setGuiVariable_SpeakerMaxPhrases(delete=True) + return config.INPUT_SPEAKER_MAX_PHRASES = int(value) + view.setGuiVariable_SpeakerMaxPhrases(str(config.INPUT_SPEAKER_MAX_PHRASES)) # Others Tab diff --git a/view.py b/view.py index fa986a52..f3e783e1 100644 --- a/view.py +++ b/view.py @@ -1,3 +1,4 @@ +from typing import Union from types import SimpleNamespace from tkinter import font as tk_font from languages import selectable_languages @@ -146,7 +147,8 @@ class View(): VAR_DESC_MIC_ENERGY_THRESHOLD=StringVar(value="Slider to modify the threshold for activating voice input.\nPress the microphone button to start input and speak something, so you can adjust it while monitoring the actual volume. 0 to 2000 (Default: 300)"), SLIDER_RANGE_MIC_ENERGY_THRESHOLD=(0, config.MAX_MIC_ENERGY_THRESHOLD), CALLBACK_CHECK_MIC_THRESHOLD=None, - VAR_MIC_ENERGY_THRESHOLD=IntVar(value=config.INPUT_MIC_ENERGY_THRESHOLD), + VAR_MIC_ENERGY_THRESHOLD__SLIDER=IntVar(value=config.INPUT_MIC_ENERGY_THRESHOLD), + VAR_MIC_ENERGY_THRESHOLD__ENTRY=StringVar(value=config.INPUT_MIC_ENERGY_THRESHOLD), VAR_LABEL_MIC_DYNAMIC_ENERGY_THRESHOLD=StringVar(value="Mic Dynamic Energy Threshold"), VAR_DESC_MIC_DYNAMIC_ENERGY_THRESHOLD=StringVar(value="When this feature is selected, it will automatically adjust in a way that works well, based on the set Mic Energy Threshold."), @@ -156,17 +158,17 @@ class View(): VAR_LABEL_MIC_RECORD_TIMEOUT=StringVar(value="Mic Record Timeout"), VAR_DESC_MIC_RECORD_TIMEOUT=StringVar(value="(Default: 3)"), CALLBACK_SET_MIC_RECORD_TIMEOUT=None, - VAR_MIC_RECORD_TIMEOUT=IntVar(value=config.INPUT_MIC_RECORD_TIMEOUT), + VAR_MIC_RECORD_TIMEOUT=StringVar(value=config.INPUT_MIC_RECORD_TIMEOUT), VAR_LABEL_MIC_PHRASE_TIMEOUT=StringVar(value="Mic Phrase Timeout"), VAR_DESC_MIC_PHRASE_TIMEOUT=StringVar(value="(Default: 3)"), CALLBACK_SET_MIC_PHRASE_TIMEOUT=None, - VAR_MIC_PHRASE_TIMEOUT=IntVar(value=config.INPUT_MIC_PHRASE_TIMEOUT), + VAR_MIC_PHRASE_TIMEOUT=StringVar(value=config.INPUT_MIC_PHRASE_TIMEOUT), VAR_LABEL_MIC_MAX_PHRASES=StringVar(value="Mic Max Phrases"), VAR_DESC_MIC_MAX_PHRASES=StringVar(value="It will stop recording and send the recordings when the set count of phrase(s) is reached. (Default: 10)"), CALLBACK_SET_MIC_MAX_PHRASES=None, - VAR_MIC_MAX_PHRASES=IntVar(value=config.INPUT_MIC_MAX_PHRASES), + VAR_MIC_MAX_PHRASES=StringVar(value=config.INPUT_MIC_MAX_PHRASES), VAR_LABEL_MIC_WORD_FILTER=StringVar(value="Mic Word Filter"), VAR_DESC_MIC_WORD_FILTER=StringVar(value="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"), @@ -185,7 +187,8 @@ class View(): VAR_DESC_SPEAKER_ENERGY_THRESHOLD=StringVar(value="Slider to modify the threshold for activating voice input.\nPress the headphones mark button to start input and speak something, so you can adjust it while monitoring the actual volume. 0 to 4000 (Default: 300)"), SLIDER_RANGE_SPEAKER_ENERGY_THRESHOLD=(0, config.MAX_SPEAKER_ENERGY_THRESHOLD), CALLBACK_CHECK_SPEAKER_THRESHOLD=None, - VAR_SPEAKER_ENERGY_THRESHOLD=IntVar(value=config.INPUT_SPEAKER_ENERGY_THRESHOLD), + VAR_SPEAKER_ENERGY_THRESHOLD__SLIDER=IntVar(value=config.INPUT_SPEAKER_ENERGY_THRESHOLD), + VAR_SPEAKER_ENERGY_THRESHOLD__ENTRY=StringVar(value=config.INPUT_SPEAKER_ENERGY_THRESHOLD), VAR_LABEL_SPEAKER_DYNAMIC_ENERGY_THRESHOLD=StringVar(value="Speaker Dynamic Energy Threshold"), VAR_DESC_SPEAKER_DYNAMIC_ENERGY_THRESHOLD=StringVar(value="When this feature is selected, it will automatically adjust in a way that works well, based on the set Speaker Energy Threshold."), @@ -195,17 +198,17 @@ class View(): VAR_LABEL_SPEAKER_RECORD_TIMEOUT=StringVar(value="Speaker Record Timeout"), VAR_DESC_SPEAKER_RECORD_TIMEOUT=StringVar(value="(Default: 3)"), CALLBACK_SET_SPEAKER_RECORD_TIMEOUT=None, - VAR_SPEAKER_RECORD_TIMEOUT=IntVar(value=config.INPUT_SPEAKER_RECORD_TIMEOUT), + VAR_SPEAKER_RECORD_TIMEOUT=StringVar(value=config.INPUT_SPEAKER_RECORD_TIMEOUT), VAR_LABEL_SPEAKER_PHRASE_TIMEOUT=StringVar(value="Speaker Phrase Timeout"), VAR_DESC_SPEAKER_PHRASE_TIMEOUT=StringVar(value="It will stop recording and receive the recordings when the set second(s) is reached. (Default: 3)"), CALLBACK_SET_SPEAKER_PHRASE_TIMEOUT=None, - VAR_SPEAKER_PHRASE_TIMEOUT=IntVar(value=config.INPUT_SPEAKER_PHRASE_TIMEOUT), + VAR_SPEAKER_PHRASE_TIMEOUT=StringVar(value=config.INPUT_SPEAKER_PHRASE_TIMEOUT), VAR_LABEL_SPEAKER_MAX_PHRASES=StringVar(value="Speaker Max Phrases"), VAR_DESC_SPEAKER_MAX_PHRASES=StringVar(value="It will stop recording and receive the recordings when the set count of phrase(s) is reached. (Default: 10)"), CALLBACK_SET_SPEAKER_MAX_PHRASES=None, - VAR_SPEAKER_MAX_PHRASES=IntVar(value=config.INPUT_SPEAKER_MAX_PHRASES), + VAR_SPEAKER_MAX_PHRASES=StringVar(value=config.INPUT_SPEAKER_MAX_PHRASES), # Others Tab @@ -240,7 +243,7 @@ class View(): VAR_LABEL_OSC_PORT=StringVar(value="OSC Port"), VAR_DESC_OSC_PORT=StringVar(value="(Default: 9000)"), CALLBACK_SET_OSC_PORT=None, - VAR_OSC_PORT=IntVar(value=config.OSC_PORT), + VAR_OSC_PORT=StringVar(value=config.OSC_PORT), ) @@ -555,4 +558,56 @@ class View(): def updateSetProgressBar_SpeakerEnergy(self, new_speaker_energy): vrct_gui.config_window.sb__progressbar_x_slider__progressbar_speaker_energy_threshold.set(new_speaker_energy/config.MAX_SPEAKER_ENERGY_THRESHOLD) + + + def setGuiVariable_MicEnergyThreshold(self, slider_value:int, entry_value:Union[None, str]=None): + self.view_variable.VAR_MIC_ENERGY_THRESHOLD__SLIDER.set(slider_value) + if entry_value is None: + self._clearEntryBox(vrct_gui.config_window.sb__progressbar_x_slider__entry_mic_energy_threshold) + else: + self.view_variable.VAR_MIC_ENERGY_THRESHOLD__ENTRY.set(entry_value) + + def setGuiVariable_SpeakerEnergyThreshold(self, slider_value:int, entry_value:Union[None, str]=None): + self.view_variable.VAR_SPEAKER_ENERGY_THRESHOLD__SLIDER.set(slider_value) + if entry_value is None: + self._clearEntryBox(vrct_gui.config_window.sb__progressbar_x_slider__entry_speaker_energy_threshold) + else: + self.view_variable.VAR_SPEAKER_ENERGY_THRESHOLD__ENTRY.set(entry_value) + + + + def setGuiVariable_MicRecordTimeout(self, value:str="", delete=False): + if delete is True: self._clearEntryBox(vrct_gui.config_window.sb__entry_mic_record_timeout) + self.view_variable.VAR_MIC_RECORD_TIMEOUT.set(value) + + def setGuiVariable_MicPhraseTimeout(self, value:str="", delete=False): + if delete is True: self._clearEntryBox(vrct_gui.config_window.sb__entry_mic_phrase_timeout) + self.view_variable.VAR_MIC_PHRASE_TIMEOUT.set(value) + + def setGuiVariable_MicMaxPhrases(self, value:str="", delete=False): + if delete is True: self._clearEntryBox(vrct_gui.config_window.sb__entry_mic_max_phrases) + self.view_variable.VAR_MIC_MAX_PHRASES.set(value) + + + + def setGuiVariable_SpeakerRecordTimeout(self, value:str="", delete=False): + if delete is True: self._clearEntryBox(vrct_gui.config_window.sb__entry_speaker_record_timeout) + self.view_variable.VAR_SPEAKER_RECORD_TIMEOUT.set(value) + + def setGuiVariable_SpeakerPhraseTimeout(self, value:str="", delete=False): + if delete is True: self._clearEntryBox(vrct_gui.config_window.sb__entry_speaker_phrase_timeout) + self.view_variable.VAR_SPEAKER_PHRASE_TIMEOUT.set(value) + + def setGuiVariable_SpeakerMaxPhrases(self, value:str="", delete=False): + if delete is True: self._clearEntryBox(vrct_gui.config_window.sb__entry_speaker_max_phrases) + self.view_variable.VAR_SPEAKER_MAX_PHRASES.set(value) + + + @staticmethod + def _clearEntryBox(entry_widget): + entry_widget.delete(0, CTK_END) + + + + view = View() \ No newline at end of file diff --git a/vrct_gui/config_window/widgets/createSideMenuAndSettingsBoxContainers/setting_box_containers/_SettingBoxGenerator.py b/vrct_gui/config_window/widgets/createSideMenuAndSettingsBoxContainers/setting_box_containers/_SettingBoxGenerator.py index 20b43474..89f947e1 100644 --- a/vrct_gui/config_window/widgets/createSideMenuAndSettingsBoxContainers/setting_box_containers/_SettingBoxGenerator.py +++ b/vrct_gui/config_window/widgets/createSideMenuAndSettingsBoxContainers/setting_box_containers/_SettingBoxGenerator.py @@ -186,7 +186,8 @@ class _SettingBoxGenerator(): passive_button_attr_name, passive_button_command, active_button_attr_name, active_button_command, button_image_file, - variable, + entry_variable, + slider_variable, slider_number_of_steps: Union[int, None] = None, ): @@ -205,28 +206,15 @@ class _SettingBoxGenerator(): BUTTON_PADDING = int(BAR_WIDTH + BAR_PADDING + self.uism.SB__PROGRESSBAR_X_SLIDER__BUTTON_RIGHT_PADX) def adjusted_command__for_entry_bind__Any_KeyRelease(e): - # try: - # int(e.widget.get()) - # except: - # e.widget.delete(0, CTK_END) - # return - # print(int(e.widget.get())) - - - i = int(e.widget.get()) - if i < 0 or i > slider_range[1]: - e.widget.delete(0, CTK_END) - i = max(0, min(int(e.widget.get()), slider_range[1])) - # e.widget.insert(0, i) - command(i) + command(e.widget.get()) def adjusted_command__for_slider(value): - command(int(value)) + command(value) entry_widget = CTkEntry( setting_box_progressbar_x_slider_frame, width=ENTRY_WIDTH, height=self.uism.SB__PROGRESSBAR_X_SLIDER__ENTRY_HEIGHT, - textvariable=variable, + textvariable=entry_variable, font=CTkFont(family=self.FONT_FAMILY, size=self.uism.SB__ENTRY_FONT_SIZE, weight="normal"), ) @@ -244,7 +232,7 @@ class _SettingBoxGenerator(): to=slider_range[1], number_of_steps=slider_number_of_steps, command=adjusted_command__for_slider, - variable=variable, + variable=slider_variable, height=self.uism.SB__PROGRESSBAR_X_SLIDER__SLIDER_HEIGHT, width=BAR_WIDTH, border_width=0, diff --git a/vrct_gui/config_window/widgets/createSideMenuAndSettingsBoxContainers/setting_box_containers/setting_box_transcription/createSettingBox_Mic.py b/vrct_gui/config_window/widgets/createSideMenuAndSettingsBoxContainers/setting_box_containers/setting_box_transcription/createSettingBox_Mic.py index 689452ca..82731054 100644 --- a/vrct_gui/config_window/widgets/createSideMenuAndSettingsBoxContainers/setting_box_containers/setting_box_transcription/createSettingBox_Mic.py +++ b/vrct_gui/config_window/widgets/createSideMenuAndSettingsBoxContainers/setting_box_containers/setting_box_transcription/createSettingBox_Mic.py @@ -74,12 +74,14 @@ def createSettingBox_Mic(setting_box_wrapper, config_window, settings, view_vari for_var_label_text=view_variable.VAR_LABEL_MIC_ENERGY_THRESHOLD, for_var_desc_text=view_variable.VAR_DESC_MIC_ENERGY_THRESHOLD, command=slider_input_mic_energy_threshold_callback, - variable=view_variable.VAR_MIC_ENERGY_THRESHOLD, + entry_attr_name="sb__progressbar_x_slider__entry_mic_energy_threshold", + entry_variable=view_variable.VAR_MIC_ENERGY_THRESHOLD__ENTRY, slider_attr_name="progressbar_x_slider__slider_mic_energy_threshold", slider_range=view_variable.SLIDER_RANGE_MIC_ENERGY_THRESHOLD, + slider_variable=view_variable.VAR_MIC_ENERGY_THRESHOLD__SLIDER, progressbar_attr_name="sb__progressbar_x_slider__progressbar_mic_energy_threshold", 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 5742292a..60d6d168 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 @@ -55,12 +55,14 @@ def createSettingBox_Speaker(setting_box_wrapper, config_window, settings, view_ for_var_label_text=view_variable.VAR_LABEL_SPEAKER_ENERGY_THRESHOLD, for_var_desc_text=view_variable.VAR_DESC_SPEAKER_ENERGY_THRESHOLD, command=slider_input_speaker_energy_threshold_callback, - variable=view_variable.VAR_SPEAKER_ENERGY_THRESHOLD, + + entry_variable=view_variable.VAR_SPEAKER_ENERGY_THRESHOLD__ENTRY, entry_attr_name="sb__progressbar_x_slider__entry_speaker_energy_threshold", slider_attr_name="progressbar_x_slider__slider_speaker_energy_threshold", slider_range=view_variable.SLIDER_RANGE_SPEAKER_ENERGY_THRESHOLD, + slider_variable=view_variable.VAR_SPEAKER_ENERGY_THRESHOLD__SLIDER, progressbar_attr_name="sb__progressbar_x_slider__progressbar_speaker_energy_threshold",