diff --git a/README.md b/README.md
index 9cc281b1..68b0b044 100644
--- a/README.md
+++ b/README.md
@@ -1140,6 +1140,8 @@ cmd输入命令即可:`doctoc /path/to/file`
- 优化audio中vits接口的设计&优化代码减少冗余
- 新增本地问答音频库,机制类似点歌,通过编辑音频文件名做为触发匹配关键词,优先级第二高,匹配命中后直接会进行匹配音频的播放。
- 新增自定义上下限音频随机变速,对普通音频播放和文案音频播放可以进行随机变速配置。(GUI未适配)
+
+### 2023-07-20
- 增加ffmpeg缺失的解决方案
- 文案模式增加了一组文案配置,也就是说有2块文案,会进行左右切换的播放,都播放完毕后会进行新的一轮播放。
- 新增LLM后的第二重过滤(违禁词、链接、拼音)
@@ -1148,6 +1150,7 @@ cmd输入命令即可:`doctoc /path/to/file`
- 新增用户名过滤(违禁词、链接、拼音)
- 修复本地问答音频匹配,传入音频后缀导致的匹配错误bug
- 新增本地问答库匹配 最低相似度配置,用于微调需要的关键词匹配度,已自定义触发灵敏度。
+- 音频随机变速 GUI适配
diff --git a/UI_main.py b/UI_main.py
index bd804ae3..5970693f 100644
--- a/UI_main.py
+++ b/UI_main.py
@@ -86,7 +86,7 @@ def setupUi(self, MainWindow):
self.scrollArea.setWidgetResizable(True)
self.scrollArea.setObjectName("scrollArea")
self.scrollAreaWidgetContents = QtWidgets.QWidget()
- self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, -501, 980, 6470))
+ self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, -1387, 980, 6694))
self.scrollAreaWidgetContents.setObjectName("scrollAreaWidgetContents")
self.verticalLayout = QtWidgets.QVBoxLayout(self.scrollAreaWidgetContents)
self.verticalLayout.setContentsMargins(35, 20, 35, 20)
@@ -97,6 +97,15 @@ def setupUi(self, MainWindow):
self.gridLayout = QtWidgets.QGridLayout(self.formWidget)
self.gridLayout.setContentsMargins(0, 0, 0, 0)
self.gridLayout.setObjectName("gridLayout")
+ self.label_need_lang = QtWidgets.QLabel(self.formWidget)
+ self.label_need_lang.setObjectName("label_need_lang")
+ self.gridLayout.addWidget(self.label_need_lang, 3, 0, 1, 1)
+ self.lineEdit_before_prompt = QtWidgets.QLineEdit(self.formWidget)
+ self.lineEdit_before_prompt.setObjectName("lineEdit_before_prompt")
+ self.gridLayout.addWidget(self.lineEdit_before_prompt, 4, 1, 1, 1)
+ self.lineEdit_after_prompt = QtWidgets.QLineEdit(self.formWidget)
+ self.lineEdit_after_prompt.setObjectName("lineEdit_after_prompt")
+ self.gridLayout.addWidget(self.lineEdit_after_prompt, 5, 1, 1, 1)
self.comboBox_platform = QtWidgets.QComboBox(self.formWidget)
self.comboBox_platform.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))
self.comboBox_platform.setObjectName("comboBox_platform")
@@ -105,51 +114,6 @@ def setupUi(self, MainWindow):
self.comboBox_platform.addItem("")
self.comboBox_platform.addItem("")
self.gridLayout.addWidget(self.comboBox_platform, 0, 1, 1, 1)
- self.groupBox = QtWidgets.QGroupBox(self.formWidget)
- self.groupBox.setStyleSheet("")
- self.groupBox.setObjectName("groupBox")
- self.gridLayout_26 = QtWidgets.QGridLayout(self.groupBox)
- self.gridLayout_26.setObjectName("gridLayout_26")
- self.gridLayout_25 = QtWidgets.QGridLayout()
- self.gridLayout_25.setObjectName("gridLayout_25")
- self.textEdit_filter_before_must_str = QtWidgets.QTextEdit(self.groupBox)
- self.textEdit_filter_before_must_str.setObjectName("textEdit_filter_before_must_str")
- self.gridLayout_25.addWidget(self.textEdit_filter_before_must_str, 0, 1, 1, 1)
- self.label_filter_badwords_path = QtWidgets.QLabel(self.groupBox)
- self.label_filter_badwords_path.setObjectName("label_filter_badwords_path")
- self.gridLayout_25.addWidget(self.label_filter_badwords_path, 2, 0, 1, 1)
- self.lineEdit_filter_bad_pinyin_path = QtWidgets.QLineEdit(self.groupBox)
- self.lineEdit_filter_bad_pinyin_path.setObjectName("lineEdit_filter_bad_pinyin_path")
- self.gridLayout_25.addWidget(self.lineEdit_filter_bad_pinyin_path, 3, 1, 1, 1)
- self.lineEdit_filter_max_len = QtWidgets.QLineEdit(self.groupBox)
- self.lineEdit_filter_max_len.setObjectName("lineEdit_filter_max_len")
- self.gridLayout_25.addWidget(self.lineEdit_filter_max_len, 4, 1, 1, 1)
- self.label_filter_max_char_len = QtWidgets.QLabel(self.groupBox)
- self.label_filter_max_char_len.setObjectName("label_filter_max_char_len")
- self.gridLayout_25.addWidget(self.label_filter_max_char_len, 5, 0, 1, 1)
- self.label_filter_after_must_str = QtWidgets.QLabel(self.groupBox)
- self.label_filter_after_must_str.setObjectName("label_filter_after_must_str")
- self.gridLayout_25.addWidget(self.label_filter_after_must_str, 1, 0, 1, 1)
- self.textEdit_filter_after_must_str = QtWidgets.QTextEdit(self.groupBox)
- self.textEdit_filter_after_must_str.setObjectName("textEdit_filter_after_must_str")
- self.gridLayout_25.addWidget(self.textEdit_filter_after_must_str, 1, 1, 1, 1)
- self.label_filter_max_len = QtWidgets.QLabel(self.groupBox)
- self.label_filter_max_len.setObjectName("label_filter_max_len")
- self.gridLayout_25.addWidget(self.label_filter_max_len, 4, 0, 1, 1)
- self.label_filter_before_must_str = QtWidgets.QLabel(self.groupBox)
- self.label_filter_before_must_str.setObjectName("label_filter_before_must_str")
- self.gridLayout_25.addWidget(self.label_filter_before_must_str, 0, 0, 1, 1)
- self.lineEdit_filter_max_char_len = QtWidgets.QLineEdit(self.groupBox)
- self.lineEdit_filter_max_char_len.setObjectName("lineEdit_filter_max_char_len")
- self.gridLayout_25.addWidget(self.lineEdit_filter_max_char_len, 5, 1, 1, 1)
- self.lineEdit_filter_badwords_path = QtWidgets.QLineEdit(self.groupBox)
- self.lineEdit_filter_badwords_path.setObjectName("lineEdit_filter_badwords_path")
- self.gridLayout_25.addWidget(self.lineEdit_filter_badwords_path, 2, 1, 1, 1)
- self.label_filter_bad_pinyin_path = QtWidgets.QLabel(self.groupBox)
- self.label_filter_bad_pinyin_path.setObjectName("label_filter_bad_pinyin_path")
- self.gridLayout_25.addWidget(self.label_filter_bad_pinyin_path, 3, 0, 1, 1)
- self.gridLayout_26.addLayout(self.gridLayout_25, 0, 0, 1, 1)
- self.gridLayout.addWidget(self.groupBox, 14, 0, 1, 3)
self.comboBox_chat_type = QtWidgets.QComboBox(self.formWidget)
self.comboBox_chat_type.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))
self.comboBox_chat_type.setObjectName("comboBox_chat_type")
@@ -161,14 +125,27 @@ def setupUi(self, MainWindow):
self.comboBox_chat_type.addItem("")
self.comboBox_chat_type.addItem("")
self.gridLayout.addWidget(self.comboBox_chat_type, 2, 1, 1, 1)
- self.comboBox_need_lang = QtWidgets.QComboBox(self.formWidget)
- self.comboBox_need_lang.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))
- self.comboBox_need_lang.setObjectName("comboBox_need_lang")
- self.comboBox_need_lang.addItem("")
- self.comboBox_need_lang.addItem("")
- self.comboBox_need_lang.addItem("")
- self.comboBox_need_lang.addItem("")
- self.gridLayout.addWidget(self.comboBox_need_lang, 3, 1, 1, 1)
+ self.comboBox_audio_synthesis_type = QtWidgets.QComboBox(self.formWidget)
+ self.comboBox_audio_synthesis_type.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))
+ self.comboBox_audio_synthesis_type.setObjectName("comboBox_audio_synthesis_type")
+ self.comboBox_audio_synthesis_type.addItem("")
+ self.comboBox_audio_synthesis_type.addItem("")
+ self.comboBox_audio_synthesis_type.addItem("")
+ self.comboBox_audio_synthesis_type.addItem("")
+ self.gridLayout.addWidget(self.comboBox_audio_synthesis_type, 10, 1, 1, 1)
+ self.checkBox_read_user_name = QtWidgets.QCheckBox(self.formWidget)
+ self.checkBox_read_user_name.setObjectName("checkBox_read_user_name")
+ self.gridLayout.addWidget(self.checkBox_read_user_name, 11, 1, 1, 1)
+ self.label_platform = QtWidgets.QLabel(self.formWidget)
+ self.label_platform.setAutoFillBackground(True)
+ self.label_platform.setObjectName("label_platform")
+ self.gridLayout.addWidget(self.label_platform, 0, 0, 1, 1)
+ self.lineEdit_room_display_id = QtWidgets.QLineEdit(self.formWidget)
+ self.lineEdit_room_display_id.setObjectName("lineEdit_room_display_id")
+ self.gridLayout.addWidget(self.lineEdit_room_display_id, 1, 1, 1, 1)
+ self.label_chat_type = QtWidgets.QLabel(self.formWidget)
+ self.label_chat_type.setObjectName("label_chat_type")
+ self.gridLayout.addWidget(self.label_chat_type, 2, 0, 1, 1)
self.groupBox_thanks = QtWidgets.QGroupBox(self.formWidget)
self.groupBox_thanks.setObjectName("groupBox_thanks")
self.gridLayout_42 = QtWidgets.QGridLayout(self.groupBox_thanks)
@@ -204,78 +181,6 @@ def setupUi(self, MainWindow):
self.checkBox_thanks_gift_enable.setObjectName("checkBox_thanks_gift_enable")
self.gridLayout_42.addWidget(self.checkBox_thanks_gift_enable, 1, 1, 1, 1)
self.gridLayout.addWidget(self.groupBox_thanks, 16, 0, 1, 3)
- self.groupBox_live2d = QtWidgets.QGroupBox(self.formWidget)
- self.groupBox_live2d.setObjectName("groupBox_live2d")
- self.gridLayout_30 = QtWidgets.QGridLayout(self.groupBox_live2d)
- self.gridLayout_30.setObjectName("gridLayout_30")
- self.gridLayout_29 = QtWidgets.QGridLayout()
- self.gridLayout_29.setObjectName("gridLayout_29")
- self.checkBox_live2d_enable = QtWidgets.QCheckBox(self.groupBox_live2d)
- self.checkBox_live2d_enable.setObjectName("checkBox_live2d_enable")
- self.gridLayout_29.addWidget(self.checkBox_live2d_enable, 0, 1, 1, 1)
- self.lineEdit_live2d_port = QtWidgets.QLineEdit(self.groupBox_live2d)
- self.lineEdit_live2d_port.setObjectName("lineEdit_live2d_port")
- self.gridLayout_29.addWidget(self.lineEdit_live2d_port, 1, 1, 1, 1)
- self.label_live2d_port = QtWidgets.QLabel(self.groupBox_live2d)
- self.label_live2d_port.setObjectName("label_live2d_port")
- self.gridLayout_29.addWidget(self.label_live2d_port, 1, 0, 1, 1)
- self.label_live2d_enable = QtWidgets.QLabel(self.groupBox_live2d)
- self.label_live2d_enable.setObjectName("label_live2d_enable")
- self.gridLayout_29.addWidget(self.label_live2d_enable, 0, 0, 1, 1)
- self.label_live2d_name = QtWidgets.QLabel(self.groupBox_live2d)
- self.label_live2d_name.setObjectName("label_live2d_name")
- self.gridLayout_29.addWidget(self.label_live2d_name, 2, 0, 1, 1)
- self.comboBox_live2d_name = QtWidgets.QComboBox(self.groupBox_live2d)
- self.comboBox_live2d_name.setObjectName("comboBox_live2d_name")
- self.gridLayout_29.addWidget(self.comboBox_live2d_name, 2, 1, 1, 1)
- self.gridLayout_29.setColumnStretch(0, 1)
- self.gridLayout_29.setColumnStretch(1, 8)
- self.gridLayout_30.addLayout(self.gridLayout_29, 0, 0, 1, 1)
- self.gridLayout.addWidget(self.groupBox_live2d, 18, 0, 1, 3)
- self.groupBox_chatglm = QtWidgets.QGroupBox(self.formWidget)
- self.groupBox_chatglm.setObjectName("groupBox_chatglm")
- self.gridLayout_9 = QtWidgets.QGridLayout(self.groupBox_chatglm)
- self.gridLayout_9.setObjectName("gridLayout_9")
- self.gridLayout_8 = QtWidgets.QGridLayout()
- self.gridLayout_8.setObjectName("gridLayout_8")
- self.label_chatglm_api_ip_port = QtWidgets.QLabel(self.groupBox_chatglm)
- self.label_chatglm_api_ip_port.setObjectName("label_chatglm_api_ip_port")
- self.gridLayout_8.addWidget(self.label_chatglm_api_ip_port, 0, 0, 1, 1)
- self.lineEdit_chatglm_max_length = QtWidgets.QLineEdit(self.groupBox_chatglm)
- self.lineEdit_chatglm_max_length.setObjectName("lineEdit_chatglm_max_length")
- self.gridLayout_8.addWidget(self.lineEdit_chatglm_max_length, 1, 1, 1, 1)
- self.lineEdit_chatglm_top_p = QtWidgets.QLineEdit(self.groupBox_chatglm)
- self.lineEdit_chatglm_top_p.setObjectName("lineEdit_chatglm_top_p")
- self.gridLayout_8.addWidget(self.lineEdit_chatglm_top_p, 2, 1, 1, 1)
- self.lineEdit_chatglm_api_ip_port = QtWidgets.QLineEdit(self.groupBox_chatglm)
- self.lineEdit_chatglm_api_ip_port.setObjectName("lineEdit_chatglm_api_ip_port")
- self.gridLayout_8.addWidget(self.lineEdit_chatglm_api_ip_port, 0, 1, 1, 1)
- self.label_chatglm_top_p = QtWidgets.QLabel(self.groupBox_chatglm)
- self.label_chatglm_top_p.setObjectName("label_chatglm_top_p")
- self.gridLayout_8.addWidget(self.label_chatglm_top_p, 2, 0, 1, 1)
- self.label_chatglm_max_length = QtWidgets.QLabel(self.groupBox_chatglm)
- self.label_chatglm_max_length.setObjectName("label_chatglm_max_length")
- self.gridLayout_8.addWidget(self.label_chatglm_max_length, 1, 0, 1, 1)
- self.label_chatglm_temperature = QtWidgets.QLabel(self.groupBox_chatglm)
- self.label_chatglm_temperature.setObjectName("label_chatglm_temperature")
- self.gridLayout_8.addWidget(self.label_chatglm_temperature, 3, 0, 1, 1)
- self.lineEdit_chatglm_temperature = QtWidgets.QLineEdit(self.groupBox_chatglm)
- self.lineEdit_chatglm_temperature.setObjectName("lineEdit_chatglm_temperature")
- self.gridLayout_8.addWidget(self.lineEdit_chatglm_temperature, 3, 1, 1, 1)
- self.gridLayout_9.addLayout(self.gridLayout_8, 0, 0, 1, 1)
- self.gridLayout.addWidget(self.groupBox_chatglm, 23, 0, 1, 3)
- self.label_chat_type = QtWidgets.QLabel(self.formWidget)
- self.label_chat_type.setObjectName("label_chat_type")
- self.gridLayout.addWidget(self.label_chat_type, 2, 0, 1, 1)
- self.label_need_lang = QtWidgets.QLabel(self.formWidget)
- self.label_need_lang.setObjectName("label_need_lang")
- self.gridLayout.addWidget(self.label_need_lang, 3, 0, 1, 1)
- self.label_room_display_id = QtWidgets.QLabel(self.formWidget)
- self.label_room_display_id.setObjectName("label_room_display_id")
- self.gridLayout.addWidget(self.label_room_display_id, 1, 0, 1, 1)
- self.lineEdit_after_prompt = QtWidgets.QLineEdit(self.formWidget)
- self.lineEdit_after_prompt.setObjectName("lineEdit_after_prompt")
- self.gridLayout.addWidget(self.lineEdit_after_prompt, 5, 1, 1, 1)
self.groupBox_claude = QtWidgets.QGroupBox(self.formWidget)
self.groupBox_claude.setObjectName("groupBox_claude")
self.gridLayout_7 = QtWidgets.QGridLayout(self.groupBox_claude)
@@ -295,14 +200,7 @@ def setupUi(self, MainWindow):
self.lineEdit_claude_bot_user_id = QtWidgets.QLineEdit(self.groupBox_claude)
self.lineEdit_claude_bot_user_id.setObjectName("lineEdit_claude_bot_user_id")
self.gridLayout_7.addWidget(self.lineEdit_claude_bot_user_id, 1, 1, 1, 1)
- self.gridLayout.addWidget(self.groupBox_claude, 22, 0, 1, 3)
- self.label_before_prompt = QtWidgets.QLabel(self.formWidget)
- self.label_before_prompt.setObjectName("label_before_prompt")
- self.gridLayout.addWidget(self.label_before_prompt, 4, 0, 1, 1)
- self.label_platform = QtWidgets.QLabel(self.formWidget)
- self.label_platform.setAutoFillBackground(True)
- self.label_platform.setObjectName("label_platform")
- self.gridLayout.addWidget(self.label_platform, 0, 0, 1, 1)
+ self.gridLayout.addWidget(self.groupBox_claude, 23, 0, 1, 3)
self.groupBox_log = QtWidgets.QGroupBox(self.formWidget)
self.groupBox_log.setObjectName("groupBox_log")
self.gridLayout_47 = QtWidgets.QGridLayout(self.groupBox_log)
@@ -335,23 +233,6 @@ def setupUi(self, MainWindow):
self.gridLayout_46.setColumnStretch(1, 5)
self.gridLayout_47.addLayout(self.gridLayout_46, 0, 0, 1, 1)
self.gridLayout.addWidget(self.groupBox_log, 12, 0, 1, 3)
- self.lineEdit_before_prompt = QtWidgets.QLineEdit(self.formWidget)
- self.lineEdit_before_prompt.setObjectName("lineEdit_before_prompt")
- self.gridLayout.addWidget(self.lineEdit_before_prompt, 4, 1, 1, 1)
- self.label_audio_synthesis_type = QtWidgets.QLabel(self.formWidget)
- self.label_audio_synthesis_type.setObjectName("label_audio_synthesis_type")
- self.gridLayout.addWidget(self.label_audio_synthesis_type, 10, 0, 1, 1)
- self.comboBox_audio_synthesis_type = QtWidgets.QComboBox(self.formWidget)
- self.comboBox_audio_synthesis_type.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))
- self.comboBox_audio_synthesis_type.setObjectName("comboBox_audio_synthesis_type")
- self.comboBox_audio_synthesis_type.addItem("")
- self.comboBox_audio_synthesis_type.addItem("")
- self.comboBox_audio_synthesis_type.addItem("")
- self.comboBox_audio_synthesis_type.addItem("")
- self.gridLayout.addWidget(self.comboBox_audio_synthesis_type, 10, 1, 1, 1)
- self.lineEdit_room_display_id = QtWidgets.QLineEdit(self.formWidget)
- self.lineEdit_room_display_id.setObjectName("lineEdit_room_display_id")
- self.gridLayout.addWidget(self.lineEdit_room_display_id, 1, 1, 1, 1)
self.groupBox_local_qa = QtWidgets.QGroupBox(self.formWidget)
self.groupBox_local_qa.setObjectName("groupBox_local_qa")
self.gridLayout_51 = QtWidgets.QGridLayout(self.groupBox_local_qa)
@@ -390,9 +271,91 @@ def setupUi(self, MainWindow):
self.gridLayout_50.addWidget(self.lineEdit_local_qa_similarity, 4, 1, 1, 1)
self.gridLayout_51.addLayout(self.gridLayout_50, 0, 0, 1, 1)
self.gridLayout.addWidget(self.groupBox_local_qa, 13, 0, 1, 3)
+ self.groupBox = QtWidgets.QGroupBox(self.formWidget)
+ self.groupBox.setStyleSheet("")
+ self.groupBox.setObjectName("groupBox")
+ self.gridLayout_26 = QtWidgets.QGridLayout(self.groupBox)
+ self.gridLayout_26.setObjectName("gridLayout_26")
+ self.gridLayout_25 = QtWidgets.QGridLayout()
+ self.gridLayout_25.setObjectName("gridLayout_25")
+ self.textEdit_filter_before_must_str = QtWidgets.QTextEdit(self.groupBox)
+ self.textEdit_filter_before_must_str.setObjectName("textEdit_filter_before_must_str")
+ self.gridLayout_25.addWidget(self.textEdit_filter_before_must_str, 0, 1, 1, 1)
+ self.label_filter_badwords_path = QtWidgets.QLabel(self.groupBox)
+ self.label_filter_badwords_path.setObjectName("label_filter_badwords_path")
+ self.gridLayout_25.addWidget(self.label_filter_badwords_path, 2, 0, 1, 1)
+ self.lineEdit_filter_bad_pinyin_path = QtWidgets.QLineEdit(self.groupBox)
+ self.lineEdit_filter_bad_pinyin_path.setObjectName("lineEdit_filter_bad_pinyin_path")
+ self.gridLayout_25.addWidget(self.lineEdit_filter_bad_pinyin_path, 3, 1, 1, 1)
+ self.lineEdit_filter_max_len = QtWidgets.QLineEdit(self.groupBox)
+ self.lineEdit_filter_max_len.setObjectName("lineEdit_filter_max_len")
+ self.gridLayout_25.addWidget(self.lineEdit_filter_max_len, 4, 1, 1, 1)
+ self.label_filter_max_char_len = QtWidgets.QLabel(self.groupBox)
+ self.label_filter_max_char_len.setObjectName("label_filter_max_char_len")
+ self.gridLayout_25.addWidget(self.label_filter_max_char_len, 5, 0, 1, 1)
+ self.label_filter_after_must_str = QtWidgets.QLabel(self.groupBox)
+ self.label_filter_after_must_str.setObjectName("label_filter_after_must_str")
+ self.gridLayout_25.addWidget(self.label_filter_after_must_str, 1, 0, 1, 1)
+ self.textEdit_filter_after_must_str = QtWidgets.QTextEdit(self.groupBox)
+ self.textEdit_filter_after_must_str.setObjectName("textEdit_filter_after_must_str")
+ self.gridLayout_25.addWidget(self.textEdit_filter_after_must_str, 1, 1, 1, 1)
+ self.label_filter_max_len = QtWidgets.QLabel(self.groupBox)
+ self.label_filter_max_len.setObjectName("label_filter_max_len")
+ self.gridLayout_25.addWidget(self.label_filter_max_len, 4, 0, 1, 1)
+ self.label_filter_before_must_str = QtWidgets.QLabel(self.groupBox)
+ self.label_filter_before_must_str.setObjectName("label_filter_before_must_str")
+ self.gridLayout_25.addWidget(self.label_filter_before_must_str, 0, 0, 1, 1)
+ self.lineEdit_filter_max_char_len = QtWidgets.QLineEdit(self.groupBox)
+ self.lineEdit_filter_max_char_len.setObjectName("lineEdit_filter_max_char_len")
+ self.gridLayout_25.addWidget(self.lineEdit_filter_max_char_len, 5, 1, 1, 1)
+ self.lineEdit_filter_badwords_path = QtWidgets.QLineEdit(self.groupBox)
+ self.lineEdit_filter_badwords_path.setObjectName("lineEdit_filter_badwords_path")
+ self.gridLayout_25.addWidget(self.lineEdit_filter_badwords_path, 2, 1, 1, 1)
+ self.label_filter_bad_pinyin_path = QtWidgets.QLabel(self.groupBox)
+ self.label_filter_bad_pinyin_path.setObjectName("label_filter_bad_pinyin_path")
+ self.gridLayout_25.addWidget(self.label_filter_bad_pinyin_path, 3, 0, 1, 1)
+ self.gridLayout_26.addLayout(self.gridLayout_25, 0, 0, 1, 1)
+ self.gridLayout.addWidget(self.groupBox, 14, 0, 1, 3)
+ self.groupBox_live2d = QtWidgets.QGroupBox(self.formWidget)
+ self.groupBox_live2d.setObjectName("groupBox_live2d")
+ self.gridLayout_30 = QtWidgets.QGridLayout(self.groupBox_live2d)
+ self.gridLayout_30.setObjectName("gridLayout_30")
+ self.gridLayout_29 = QtWidgets.QGridLayout()
+ self.gridLayout_29.setObjectName("gridLayout_29")
+ self.checkBox_live2d_enable = QtWidgets.QCheckBox(self.groupBox_live2d)
+ self.checkBox_live2d_enable.setObjectName("checkBox_live2d_enable")
+ self.gridLayout_29.addWidget(self.checkBox_live2d_enable, 0, 1, 1, 1)
+ self.lineEdit_live2d_port = QtWidgets.QLineEdit(self.groupBox_live2d)
+ self.lineEdit_live2d_port.setObjectName("lineEdit_live2d_port")
+ self.gridLayout_29.addWidget(self.lineEdit_live2d_port, 1, 1, 1, 1)
+ self.label_live2d_port = QtWidgets.QLabel(self.groupBox_live2d)
+ self.label_live2d_port.setObjectName("label_live2d_port")
+ self.gridLayout_29.addWidget(self.label_live2d_port, 1, 0, 1, 1)
+ self.label_live2d_enable = QtWidgets.QLabel(self.groupBox_live2d)
+ self.label_live2d_enable.setObjectName("label_live2d_enable")
+ self.gridLayout_29.addWidget(self.label_live2d_enable, 0, 0, 1, 1)
+ self.label_live2d_name = QtWidgets.QLabel(self.groupBox_live2d)
+ self.label_live2d_name.setObjectName("label_live2d_name")
+ self.gridLayout_29.addWidget(self.label_live2d_name, 2, 0, 1, 1)
+ self.comboBox_live2d_name = QtWidgets.QComboBox(self.groupBox_live2d)
+ self.comboBox_live2d_name.setObjectName("comboBox_live2d_name")
+ self.gridLayout_29.addWidget(self.comboBox_live2d_name, 2, 1, 1, 1)
+ self.gridLayout_29.setColumnStretch(0, 1)
+ self.gridLayout_29.setColumnStretch(1, 8)
+ self.gridLayout_30.addLayout(self.gridLayout_29, 0, 0, 1, 1)
+ self.gridLayout.addWidget(self.groupBox_live2d, 18, 0, 1, 3)
+ self.label_read_user_name = QtWidgets.QLabel(self.formWidget)
+ self.label_read_user_name.setObjectName("label_read_user_name")
+ self.gridLayout.addWidget(self.label_read_user_name, 11, 0, 1, 1)
+ self.label_room_display_id = QtWidgets.QLabel(self.formWidget)
+ self.label_room_display_id.setObjectName("label_room_display_id")
+ self.gridLayout.addWidget(self.label_room_display_id, 1, 0, 1, 1)
self.label_after_prompt = QtWidgets.QLabel(self.formWidget)
self.label_after_prompt.setObjectName("label_after_prompt")
self.gridLayout.addWidget(self.label_after_prompt, 5, 0, 1, 1)
+ self.label_audio_synthesis_type = QtWidgets.QLabel(self.formWidget)
+ self.label_audio_synthesis_type.setObjectName("label_audio_synthesis_type")
+ self.gridLayout.addWidget(self.label_audio_synthesis_type, 10, 0, 1, 1)
self.groupBox_openai = QtWidgets.QGroupBox(self.formWidget)
self.groupBox_openai.setObjectName("groupBox_openai")
self.gridLayout_4 = QtWidgets.QGridLayout(self.groupBox_openai)
@@ -413,7 +376,15 @@ def setupUi(self, MainWindow):
self.textEdit_openai_api_key.setObjectName("textEdit_openai_api_key")
self.gridLayout_2.addWidget(self.textEdit_openai_api_key, 1, 1, 1, 2)
self.gridLayout_4.addLayout(self.gridLayout_2, 0, 0, 1, 1)
- self.gridLayout.addWidget(self.groupBox_openai, 19, 0, 1, 3)
+ self.gridLayout.addWidget(self.groupBox_openai, 20, 0, 1, 3)
+ self.comboBox_need_lang = QtWidgets.QComboBox(self.formWidget)
+ self.comboBox_need_lang.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))
+ self.comboBox_need_lang.setObjectName("comboBox_need_lang")
+ self.comboBox_need_lang.addItem("")
+ self.comboBox_need_lang.addItem("")
+ self.comboBox_need_lang.addItem("")
+ self.comboBox_need_lang.addItem("")
+ self.gridLayout.addWidget(self.comboBox_need_lang, 3, 1, 1, 1)
self.groupBox_chatgpt = QtWidgets.QGroupBox(self.formWidget)
self.groupBox_chatgpt.setObjectName("groupBox_chatgpt")
self.gridLayout_5 = QtWidgets.QGridLayout(self.groupBox_chatgpt)
@@ -482,13 +453,90 @@ def setupUi(self, MainWindow):
self.comboBox_chatgpt_model.addItem("")
self.gridLayout_3.addWidget(self.comboBox_chatgpt_model, 0, 1, 1, 1)
self.gridLayout_5.addLayout(self.gridLayout_3, 0, 0, 1, 1)
- self.gridLayout.addWidget(self.groupBox_chatgpt, 20, 0, 2, 3)
- self.label_read_user_name = QtWidgets.QLabel(self.formWidget)
- self.label_read_user_name.setObjectName("label_read_user_name")
- self.gridLayout.addWidget(self.label_read_user_name, 11, 0, 1, 1)
- self.checkBox_read_user_name = QtWidgets.QCheckBox(self.formWidget)
- self.checkBox_read_user_name.setObjectName("checkBox_read_user_name")
- self.gridLayout.addWidget(self.checkBox_read_user_name, 11, 1, 1, 1)
+ self.gridLayout.addWidget(self.groupBox_chatgpt, 21, 0, 2, 3)
+ self.label_before_prompt = QtWidgets.QLabel(self.formWidget)
+ self.label_before_prompt.setObjectName("label_before_prompt")
+ self.gridLayout.addWidget(self.label_before_prompt, 4, 0, 1, 1)
+ self.groupBox_chatglm = QtWidgets.QGroupBox(self.formWidget)
+ self.groupBox_chatglm.setObjectName("groupBox_chatglm")
+ self.gridLayout_9 = QtWidgets.QGridLayout(self.groupBox_chatglm)
+ self.gridLayout_9.setObjectName("gridLayout_9")
+ self.gridLayout_8 = QtWidgets.QGridLayout()
+ self.gridLayout_8.setObjectName("gridLayout_8")
+ self.label_chatglm_api_ip_port = QtWidgets.QLabel(self.groupBox_chatglm)
+ self.label_chatglm_api_ip_port.setObjectName("label_chatglm_api_ip_port")
+ self.gridLayout_8.addWidget(self.label_chatglm_api_ip_port, 0, 0, 1, 1)
+ self.lineEdit_chatglm_max_length = QtWidgets.QLineEdit(self.groupBox_chatglm)
+ self.lineEdit_chatglm_max_length.setObjectName("lineEdit_chatglm_max_length")
+ self.gridLayout_8.addWidget(self.lineEdit_chatglm_max_length, 1, 1, 1, 1)
+ self.lineEdit_chatglm_top_p = QtWidgets.QLineEdit(self.groupBox_chatglm)
+ self.lineEdit_chatglm_top_p.setObjectName("lineEdit_chatglm_top_p")
+ self.gridLayout_8.addWidget(self.lineEdit_chatglm_top_p, 2, 1, 1, 1)
+ self.lineEdit_chatglm_api_ip_port = QtWidgets.QLineEdit(self.groupBox_chatglm)
+ self.lineEdit_chatglm_api_ip_port.setObjectName("lineEdit_chatglm_api_ip_port")
+ self.gridLayout_8.addWidget(self.lineEdit_chatglm_api_ip_port, 0, 1, 1, 1)
+ self.label_chatglm_top_p = QtWidgets.QLabel(self.groupBox_chatglm)
+ self.label_chatglm_top_p.setObjectName("label_chatglm_top_p")
+ self.gridLayout_8.addWidget(self.label_chatglm_top_p, 2, 0, 1, 1)
+ self.label_chatglm_max_length = QtWidgets.QLabel(self.groupBox_chatglm)
+ self.label_chatglm_max_length.setObjectName("label_chatglm_max_length")
+ self.gridLayout_8.addWidget(self.label_chatglm_max_length, 1, 0, 1, 1)
+ self.label_chatglm_temperature = QtWidgets.QLabel(self.groupBox_chatglm)
+ self.label_chatglm_temperature.setObjectName("label_chatglm_temperature")
+ self.gridLayout_8.addWidget(self.label_chatglm_temperature, 3, 0, 1, 1)
+ self.lineEdit_chatglm_temperature = QtWidgets.QLineEdit(self.groupBox_chatglm)
+ self.lineEdit_chatglm_temperature.setObjectName("lineEdit_chatglm_temperature")
+ self.gridLayout_8.addWidget(self.lineEdit_chatglm_temperature, 3, 1, 1, 1)
+ self.gridLayout_9.addLayout(self.gridLayout_8, 0, 0, 1, 1)
+ self.gridLayout.addWidget(self.groupBox_chatglm, 24, 0, 1, 3)
+ self.groupBox_audio_random_speed = QtWidgets.QGroupBox(self.formWidget)
+ self.groupBox_audio_random_speed.setObjectName("groupBox_audio_random_speed")
+ self.gridLayout_53 = QtWidgets.QGridLayout(self.groupBox_audio_random_speed)
+ self.gridLayout_53.setObjectName("gridLayout_53")
+ self.gridLayout_52 = QtWidgets.QGridLayout()
+ self.gridLayout_52.setObjectName("gridLayout_52")
+ self.lineEdit_audio_random_speed_normal_speed_min = QtWidgets.QLineEdit(self.groupBox_audio_random_speed)
+ self.lineEdit_audio_random_speed_normal_speed_min.setObjectName("lineEdit_audio_random_speed_normal_speed_min")
+ self.gridLayout_52.addWidget(self.lineEdit_audio_random_speed_normal_speed_min, 2, 1, 1, 1)
+ self.label_audio_random_speed_normal_enable = QtWidgets.QLabel(self.groupBox_audio_random_speed)
+ self.label_audio_random_speed_normal_enable.setObjectName("label_audio_random_speed_normal_enable")
+ self.gridLayout_52.addWidget(self.label_audio_random_speed_normal_enable, 1, 0, 1, 1)
+ self.label_audio_random_speed_normal_speed_min = QtWidgets.QLabel(self.groupBox_audio_random_speed)
+ self.label_audio_random_speed_normal_speed_min.setObjectName("label_audio_random_speed_normal_speed_min")
+ self.gridLayout_52.addWidget(self.label_audio_random_speed_normal_speed_min, 2, 0, 1, 1)
+ self.label_audio_random_speed_normal_speed_max = QtWidgets.QLabel(self.groupBox_audio_random_speed)
+ self.label_audio_random_speed_normal_speed_max.setObjectName("label_audio_random_speed_normal_speed_max")
+ self.gridLayout_52.addWidget(self.label_audio_random_speed_normal_speed_max, 2, 2, 1, 1)
+ self.checkBox_audio_random_speed_normal_enable = QtWidgets.QCheckBox(self.groupBox_audio_random_speed)
+ self.checkBox_audio_random_speed_normal_enable.setObjectName("checkBox_audio_random_speed_normal_enable")
+ self.gridLayout_52.addWidget(self.checkBox_audio_random_speed_normal_enable, 1, 1, 1, 1)
+ self.lineEdit_audio_random_speed_normal_speed_max = QtWidgets.QLineEdit(self.groupBox_audio_random_speed)
+ self.lineEdit_audio_random_speed_normal_speed_max.setObjectName("lineEdit_audio_random_speed_normal_speed_max")
+ self.gridLayout_52.addWidget(self.lineEdit_audio_random_speed_normal_speed_max, 2, 3, 1, 1)
+ self.label_audio_random_speed_copywriting_enable = QtWidgets.QLabel(self.groupBox_audio_random_speed)
+ self.label_audio_random_speed_copywriting_enable.setObjectName("label_audio_random_speed_copywriting_enable")
+ self.gridLayout_52.addWidget(self.label_audio_random_speed_copywriting_enable, 3, 0, 1, 1)
+ self.checkBox_audio_random_speed_copywriting_enable = QtWidgets.QCheckBox(self.groupBox_audio_random_speed)
+ self.checkBox_audio_random_speed_copywriting_enable.setObjectName("checkBox_audio_random_speed_copywriting_enable")
+ self.gridLayout_52.addWidget(self.checkBox_audio_random_speed_copywriting_enable, 3, 1, 1, 1)
+ self.label_audio_random_speed_copywriting_speed_min = QtWidgets.QLabel(self.groupBox_audio_random_speed)
+ self.label_audio_random_speed_copywriting_speed_min.setObjectName("label_audio_random_speed_copywriting_speed_min")
+ self.gridLayout_52.addWidget(self.label_audio_random_speed_copywriting_speed_min, 4, 0, 1, 1)
+ self.lineEdit_audio_random_speed_copywriting_speed_min = QtWidgets.QLineEdit(self.groupBox_audio_random_speed)
+ self.lineEdit_audio_random_speed_copywriting_speed_min.setObjectName("lineEdit_audio_random_speed_copywriting_speed_min")
+ self.gridLayout_52.addWidget(self.lineEdit_audio_random_speed_copywriting_speed_min, 4, 1, 1, 1)
+ self.label_audio_random_speed_copywriting_speed_max = QtWidgets.QLabel(self.groupBox_audio_random_speed)
+ self.label_audio_random_speed_copywriting_speed_max.setObjectName("label_audio_random_speed_copywriting_speed_max")
+ self.gridLayout_52.addWidget(self.label_audio_random_speed_copywriting_speed_max, 4, 2, 1, 1)
+ self.lineEdit_audio_random_speed_copywriting_speed_max = QtWidgets.QLineEdit(self.groupBox_audio_random_speed)
+ self.lineEdit_audio_random_speed_copywriting_speed_max.setObjectName("lineEdit_audio_random_speed_copywriting_speed_max")
+ self.gridLayout_52.addWidget(self.lineEdit_audio_random_speed_copywriting_speed_max, 4, 3, 1, 1)
+ self.gridLayout_52.setColumnStretch(0, 1)
+ self.gridLayout_52.setColumnStretch(1, 2)
+ self.gridLayout_52.setColumnStretch(2, 1)
+ self.gridLayout_52.setColumnStretch(3, 2)
+ self.gridLayout_53.addLayout(self.gridLayout_52, 0, 0, 1, 1)
+ self.gridLayout.addWidget(self.groupBox_audio_random_speed, 19, 0, 1, 3)
self.verticalLayout.addWidget(self.formWidget)
self.groupBox_chat_with_file = QtWidgets.QGroupBox(self.scrollAreaWidgetContents)
self.groupBox_chat_with_file.setObjectName("groupBox_chat_with_file")
@@ -1418,17 +1466,11 @@ def retranslateUi(self, MainWindow):
self.pushButton_run.setText(_translate("MainWindow", "运行"))
self.pushButton_config_page.setText(_translate("MainWindow", "①配置页"))
self.pushButton_save.setText(_translate("MainWindow", "保存配置"))
+ self.label_need_lang.setText(_translate("MainWindow", "回复语言"))
self.comboBox_platform.setItemText(0, _translate("MainWindow", "哔哩哔哩"))
self.comboBox_platform.setItemText(1, _translate("MainWindow", "抖音"))
self.comboBox_platform.setItemText(2, _translate("MainWindow", "快手"))
self.comboBox_platform.setItemText(3, _translate("MainWindow", "聊天模式-谷歌"))
- self.groupBox.setTitle(_translate("MainWindow", "过滤"))
- self.label_filter_badwords_path.setText(_translate("MainWindow", "违禁词路径"))
- self.label_filter_max_char_len.setText(_translate("MainWindow", "最大字符数"))
- self.label_filter_after_must_str.setText(_translate("MainWindow", "弹幕后缀"))
- self.label_filter_max_len.setText(_translate("MainWindow", "最大单词数"))
- self.label_filter_before_must_str.setText(_translate("MainWindow", "弹幕前缀"))
- self.label_filter_bad_pinyin_path.setText(_translate("MainWindow", "违禁拼音路径"))
self.comboBox_chat_type.setItemText(0, _translate("MainWindow", "复读机"))
self.comboBox_chat_type.setItemText(1, _translate("MainWindow", "ChatGPT"))
self.comboBox_chat_type.setItemText(2, _translate("MainWindow", "Claude"))
@@ -1436,10 +1478,13 @@ def retranslateUi(self, MainWindow):
self.comboBox_chat_type.setItemText(4, _translate("MainWindow", "chat_with_file"))
self.comboBox_chat_type.setItemText(5, _translate("MainWindow", "Chatterbot"))
self.comboBox_chat_type.setItemText(6, _translate("MainWindow", "text-generation-webui"))
- self.comboBox_need_lang.setItemText(0, _translate("MainWindow", "所有"))
- self.comboBox_need_lang.setItemText(1, _translate("MainWindow", "中文"))
- self.comboBox_need_lang.setItemText(2, _translate("MainWindow", "英文"))
- self.comboBox_need_lang.setItemText(3, _translate("MainWindow", "日文"))
+ self.comboBox_audio_synthesis_type.setItemText(0, _translate("MainWindow", "Edge-TTS"))
+ self.comboBox_audio_synthesis_type.setItemText(1, _translate("MainWindow", "VITS-Fast"))
+ self.comboBox_audio_synthesis_type.setItemText(2, _translate("MainWindow", "elevenlabs"))
+ self.comboBox_audio_synthesis_type.setItemText(3, _translate("MainWindow", "genshinvoice_top"))
+ self.checkBox_read_user_name.setText(_translate("MainWindow", "启用"))
+ self.label_platform.setText(_translate("MainWindow", "平台"))
+ self.label_chat_type.setText(_translate("MainWindow", "聊天类型"))
self.groupBox_thanks.setTitle(_translate("MainWindow", "答谢"))
self.label_thanks_entrance_copy.setText(_translate("MainWindow", "入场文案"))
self.label_thanks_gift_copy.setText(_translate("MainWindow", "礼物文案"))
@@ -1448,24 +1493,9 @@ def retranslateUi(self, MainWindow):
self.label_thanks_entrance_enable.setText(_translate("MainWindow", "入场欢迎"))
self.label_thanks_gift_enable.setText(_translate("MainWindow", "礼物答谢"))
self.checkBox_thanks_gift_enable.setText(_translate("MainWindow", "启用"))
- self.groupBox_live2d.setTitle(_translate("MainWindow", "Live2D"))
- self.checkBox_live2d_enable.setText(_translate("MainWindow", "是"))
- self.label_live2d_port.setText(_translate("MainWindow", "端口"))
- self.label_live2d_enable.setText(_translate("MainWindow", "启用"))
- self.label_live2d_name.setText(_translate("MainWindow", "模型名"))
- self.groupBox_chatglm.setTitle(_translate("MainWindow", "ChatGLM"))
- self.label_chatglm_api_ip_port.setText(_translate("MainWindow", "api地址"))
- self.label_chatglm_top_p.setText(_translate("MainWindow", "前p个选择"))
- self.label_chatglm_max_length.setText(_translate("MainWindow", "最大长度限制"))
- self.label_chatglm_temperature.setText(_translate("MainWindow", "温度"))
- self.label_chat_type.setText(_translate("MainWindow", "聊天类型"))
- self.label_need_lang.setText(_translate("MainWindow", "回复语言"))
- self.label_room_display_id.setText(_translate("MainWindow", "直播间号"))
self.groupBox_claude.setTitle(_translate("MainWindow", "Claude"))
self.label_claude_slack_user_token.setText(_translate("MainWindow", "slack_user_token"))
self.label_claude_bot_user_id.setText(_translate("MainWindow", "bot_user_id"))
- self.label_before_prompt.setText(_translate("MainWindow", "提示词前缀"))
- self.label_platform.setText(_translate("MainWindow", "平台"))
self.groupBox_log.setTitle(_translate("MainWindow", "日志"))
self.comboBox_commit_log_type.setItemText(0, _translate("MainWindow", "问答"))
self.comboBox_commit_log_type.setItemText(1, _translate("MainWindow", "问题"))
@@ -1475,11 +1505,6 @@ def retranslateUi(self, MainWindow):
self.label_captions_file_path.setText(_translate("MainWindow", "字幕日志路径"))
self.label_captions_enable.setText(_translate("MainWindow", "字幕日志"))
self.checkBox_captions_enable.setText(_translate("MainWindow", "启用"))
- self.label_audio_synthesis_type.setText(_translate("MainWindow", "语音合成"))
- self.comboBox_audio_synthesis_type.setItemText(0, _translate("MainWindow", "Edge-TTS"))
- self.comboBox_audio_synthesis_type.setItemText(1, _translate("MainWindow", "VITS-Fast"))
- self.comboBox_audio_synthesis_type.setItemText(2, _translate("MainWindow", "elevenlabs"))
- self.comboBox_audio_synthesis_type.setItemText(3, _translate("MainWindow", "genshinvoice_top"))
self.groupBox_local_qa.setTitle(_translate("MainWindow", "本地问答"))
self.label_local_qa_text_file_path.setText(_translate("MainWindow", "文本问答数据路径"))
self.label_local_qa_audio_enable.setText(_translate("MainWindow", "音频匹配"))
@@ -1488,10 +1513,29 @@ def retranslateUi(self, MainWindow):
self.checkBox_local_qa_text_enable.setText(_translate("MainWindow", "启用"))
self.checkBox_local_qa_audio_enable.setText(_translate("MainWindow", "启用"))
self.label_local_qa_similarity.setText(_translate("MainWindow", "最低相似度"))
+ self.groupBox.setTitle(_translate("MainWindow", "过滤"))
+ self.label_filter_badwords_path.setText(_translate("MainWindow", "违禁词路径"))
+ self.label_filter_max_char_len.setText(_translate("MainWindow", "最大字符数"))
+ self.label_filter_after_must_str.setText(_translate("MainWindow", "弹幕后缀"))
+ self.label_filter_max_len.setText(_translate("MainWindow", "最大单词数"))
+ self.label_filter_before_must_str.setText(_translate("MainWindow", "弹幕前缀"))
+ self.label_filter_bad_pinyin_path.setText(_translate("MainWindow", "违禁拼音路径"))
+ self.groupBox_live2d.setTitle(_translate("MainWindow", "Live2D"))
+ self.checkBox_live2d_enable.setText(_translate("MainWindow", "是"))
+ self.label_live2d_port.setText(_translate("MainWindow", "端口"))
+ self.label_live2d_enable.setText(_translate("MainWindow", "启用"))
+ self.label_live2d_name.setText(_translate("MainWindow", "模型名"))
+ self.label_read_user_name.setText(_translate("MainWindow", "念用户名"))
+ self.label_room_display_id.setText(_translate("MainWindow", "直播间号"))
self.label_after_prompt.setText(_translate("MainWindow", "提示词后缀"))
+ self.label_audio_synthesis_type.setText(_translate("MainWindow", "语音合成"))
self.groupBox_openai.setTitle(_translate("MainWindow", "openai"))
self.label_openai_api.setText(_translate("MainWindow", "API"))
self.label_openai_api_key.setText(_translate("MainWindow", "API KEY"))
+ self.comboBox_need_lang.setItemText(0, _translate("MainWindow", "所有"))
+ self.comboBox_need_lang.setItemText(1, _translate("MainWindow", "中文"))
+ self.comboBox_need_lang.setItemText(2, _translate("MainWindow", "英文"))
+ self.comboBox_need_lang.setItemText(3, _translate("MainWindow", "日文"))
self.groupBox_chatgpt.setTitle(_translate("MainWindow", "chatgpt"))
self.label_chatgpt_model.setText(_translate("MainWindow", "模型"))
self.label_chatgpt_max_tokens.setText(_translate("MainWindow", "最大令牌数"))
@@ -1519,8 +1563,21 @@ def retranslateUi(self, MainWindow):
self.comboBox_chatgpt_model.setItemText(16, _translate("MainWindow", "text-ada-001"))
self.comboBox_chatgpt_model.setItemText(17, _translate("MainWindow", "text-moderation-latest"))
self.comboBox_chatgpt_model.setItemText(18, _translate("MainWindow", "text-moderation-stable"))
- self.label_read_user_name.setText(_translate("MainWindow", "念用户名"))
- self.checkBox_read_user_name.setText(_translate("MainWindow", "启用"))
+ self.label_before_prompt.setText(_translate("MainWindow", "提示词前缀"))
+ self.groupBox_chatglm.setTitle(_translate("MainWindow", "ChatGLM"))
+ self.label_chatglm_api_ip_port.setText(_translate("MainWindow", "api地址"))
+ self.label_chatglm_top_p.setText(_translate("MainWindow", "前p个选择"))
+ self.label_chatglm_max_length.setText(_translate("MainWindow", "最大长度限制"))
+ self.label_chatglm_temperature.setText(_translate("MainWindow", "温度"))
+ self.groupBox_audio_random_speed.setTitle(_translate("MainWindow", "音频随机变速"))
+ self.label_audio_random_speed_normal_enable.setText(_translate("MainWindow", "普通音频变速"))
+ self.label_audio_random_speed_normal_speed_min.setText(_translate("MainWindow", "速度下限"))
+ self.label_audio_random_speed_normal_speed_max.setText(_translate("MainWindow", "速度上限"))
+ self.checkBox_audio_random_speed_normal_enable.setText(_translate("MainWindow", "启用"))
+ self.label_audio_random_speed_copywriting_enable.setText(_translate("MainWindow", "文案音频变速"))
+ self.checkBox_audio_random_speed_copywriting_enable.setText(_translate("MainWindow", "启用"))
+ self.label_audio_random_speed_copywriting_speed_min.setText(_translate("MainWindow", "速度下限"))
+ self.label_audio_random_speed_copywriting_speed_max.setText(_translate("MainWindow", "速度上限"))
self.groupBox_chat_with_file.setTitle(_translate("MainWindow", "chat_with_file"))
self.label_chat_with_file_chain_type.setText(_translate("MainWindow", "链类型"))
self.label_chat_with_file_data_path.setText(_translate("MainWindow", "pdf文件路径"))
diff --git a/main.py b/main.py
index f17ecd7e..953b9321 100644
--- a/main.py
+++ b/main.py
@@ -286,6 +286,14 @@ def init_config(self):
self.ui.label_live2d_port.setToolTip("web服务运行的端口号,默认:12345,范围:0-65535,没事不要乱改就好")
self.ui.label_live2d_name.setToolTip("模型名称,模型存放于Live2D\live2d-model路径下,请注意路径和模型内容是否匹配")
+ # 音频随机变速
+ self.ui.label_audio_random_speed_normal_enable.setToolTip("是否启用普通音频的随机变速功能")
+ self.ui.label_audio_random_speed_normal_speed_min.setToolTip("普通音频的随机变速倍率的下限,就是正常语速乘以上下限直接随机出的数的倍率,\n就是变速后的语速,默认语速倍率为1")
+ self.ui.label_audio_random_speed_normal_speed_max.setToolTip("普通音频的随机变速倍率的上限,就是正常语速乘以上下限直接随机出的数的倍率,\n就是变速后的语速,默认语速倍率为1")
+ self.ui.label_audio_random_speed_normal_enable.setToolTip("是否启用文案音频的随机变速功能")
+ self.ui.label_audio_random_speed_normal_speed_min.setToolTip("文案音频的随机变速倍率的下限,就是正常语速乘以上下限直接随机出的数的倍率,\n就是变速后的语速,默认语速倍率为1")
+ self.ui.label_audio_random_speed_normal_speed_max.setToolTip("文案音频的随机变速倍率的上限,就是正常语速乘以上下限直接随机出的数的倍率,\n就是变速后的语速,默认语速倍率为1")
+
self.ui.label_audio_synthesis_type.setToolTip("语音合成的类型")
self.ui.label_openai_api.setToolTip("API请求地址,支持代理")
@@ -541,6 +549,16 @@ def init_config(self):
live2d_name_index = names.index(model_name)
self.ui.comboBox_live2d_name.setCurrentIndex(live2d_name_index)
+ # 音频随机变速
+ if config.get("audio_random_speed", "normal", "enable"):
+ self.ui.checkBox_audio_random_speed_normal_enable.setChecked(True)
+ self.ui.lineEdit_audio_random_speed_normal_speed_min.setText(str(config.get("audio_random_speed", "normal", "speed_min")))
+ self.ui.lineEdit_audio_random_speed_normal_speed_max.setText(str(config.get("audio_random_speed", "normal", "speed_max")))
+ if config.get("audio_random_speed", "copywriting", "enable"):
+ self.ui.checkBox_audio_random_speed_copywriting_enable.setChecked(True)
+ self.ui.lineEdit_audio_random_speed_copywriting_speed_min.setText(str(config.get("audio_random_speed", "copywriting", "speed_min")))
+ self.ui.lineEdit_audio_random_speed_copywriting_speed_max.setText(str(config.get("audio_random_speed", "copywriting", "speed_max")))
+
self.ui.lineEdit_header_useragent.setText(self.header_config['userAgent'])
self.ui.lineEdit_openai_api.setText(self.openai_config['api'])
@@ -1116,6 +1134,14 @@ def save(self):
elif audio_synthesis_type == "genshinvoice_top":
config_data["audio_synthesis_type"] = "genshinvoice_top"
+ # 音频随机变速
+ config_data["audio_random_speed"]["normal"]["enable"] = self.ui.checkBox_audio_random_speed_normal_enable.isChecked()
+ config_data["audio_random_speed"]["normal"]["speed_min"] = round(float(self.ui.lineEdit_audio_random_speed_normal_speed_min.text()), 2)
+ config_data["audio_random_speed"]["normal"]["speed_max"] = round(float(self.ui.lineEdit_audio_random_speed_normal_speed_max.text()), 2)
+ config_data["audio_random_speed"]["copywriting"]["enable"] = self.ui.checkBox_audio_random_speed_copywriting_enable.isChecked()
+ config_data["audio_random_speed"]["copywriting"]["speed_min"] = round(float(self.ui.lineEdit_audio_random_speed_copywriting_speed_min.text()), 2)
+ config_data["audio_random_speed"]["copywriting"]["speed_max"] = round(float(self.ui.lineEdit_audio_random_speed_copywriting_speed_max.text()), 2)
+
vits_config_path = self.ui.lineEdit_vits_config_path.text()
config_data["vits"]["config_path"] = vits_config_path
vits_api_ip_port = self.ui.lineEdit_vits_api_ip_port.text()
diff --git a/ui/main.ui b/ui/main.ui
index a1eb515e..c0a1c67f 100644
--- a/ui/main.ui
+++ b/ui/main.ui
@@ -134,9 +134,9 @@ font: 75 12pt "微软雅黑";
0
- -501
+ -1387
980
- 6470
+ 6694
@@ -170,6 +170,19 @@ font: 75 12pt "微软雅黑";
0
+ -
+
+
+ 回复语言
+
+
+
+ -
+
+
+ -
+
+
-
@@ -197,82 +210,6 @@ font: 75 12pt "微软雅黑";
- -
-
-
-
-
-
- 过滤
-
-
-
-
-
-
-
-
-
- -
-
-
- 违禁词路径
-
-
-
- -
-
-
- -
-
-
- -
-
-
- 最大字符数
-
-
-
- -
-
-
- 弹幕后缀
-
-
-
- -
-
-
- -
-
-
- 最大单词数
-
-
-
- -
-
-
- 弹幕前缀
-
-
-
- -
-
-
- -
-
-
- -
-
-
- 违禁拼音路径
-
-
-
-
-
-
-
-
-
@@ -315,33 +252,60 @@ font: 75 12pt "微软雅黑";
- -
-
+
-
+
PointingHandCursor
-
- 所有
+ Edge-TTS
-
- 中文
+ VITS-Fast
-
- 英文
+ elevenlabs
-
- 日文
+ genshinvoice_top
+ -
+
+
+ 启用
+
+
+
+ -
+
+
+ true
+
+
+ 平台
+
+
+
+ -
+
+
+ -
+
+
+ 聊天类型
+
+
+
-
@@ -409,131 +373,7 @@ font: 75 12pt "微软雅黑";
- -
-
-
- Live2D
-
-
-
-
-
-
-
-
-
- 是
-
-
-
- -
-
-
- -
-
-
- 端口
-
-
-
- -
-
-
- 启用
-
-
-
- -
-
-
- 模型名
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
- ChatGLM
-
-
-
-
-
-
-
-
-
- api地址
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- 前p个选择
-
-
-
- -
-
-
- 最大长度限制
-
-
-
- -
-
-
- 温度
-
-
-
- -
-
-
-
-
-
-
-
- -
-
-
- 聊天类型
-
-
-
- -
-
-
- 回复语言
-
-
-
- -
-
-
- 直播间号
-
-
-
- -
-
-
- -
Claude
@@ -566,23 +406,6 @@ font: 75 12pt "微软雅黑";
- -
-
-
- 提示词前缀
-
-
-
- -
-
-
- true
-
-
- 平台
-
-
-
-
@@ -651,46 +474,6 @@ font: 75 12pt "微软雅黑";
- -
-
-
- -
-
-
- 语音合成
-
-
-
- -
-
-
- PointingHandCursor
-
-
-
-
- Edge-TTS
-
-
- -
-
- VITS-Fast
-
-
- -
-
- elevenlabs
-
-
- -
-
- genshinvoice_top
-
-
-
-
- -
-
-
-
@@ -698,70 +481,207 @@ font: 75 12pt "微软雅黑";
-
-
-
-
-
+
+
-
+
+
+ 文本问答数据路径
+
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ 音频匹配
+
+
+
+ -
+
+
+ 文本匹配
+
+
+
+ -
+
+
+ 音频存储路径
+
+
+
+ -
+
+
+ 启用
+
+
+
+ -
+
+
+ 启用
+
+
+
+ -
+
+
+ 最低相似度
+
+
+
+ -
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+ 过滤
+
+
+
-
+
+
-
+
+
+ -
+
- 文本问答数据路径
+ 违禁词路径
-
-
+
+
+ -
+
+
+ -
+
+
+ 最大字符数
+
+
+
+ -
+
+
+ 弹幕后缀
+
+
-
-
+
- -
-
+
-
+
- 音频匹配
+ 最大单词数
-
-
+
- 文本匹配
+ 弹幕前缀
+ -
+
+
+ -
+
+
-
-
+
- 音频存储路径
+ 违禁拼音路径
+
+
+
+
+
+ -
+
+
+ Live2D
+
+
+
-
+
-
-
+
- 启用
+ 是
- -
-
+
-
+
+
+ -
+
+
+ 端口
+
+
+
+ -
+
启用
- -
-
+
-
+
- 最低相似度
+ 模型名
- -
-
+
-
+
+ -
+
+
+ 念用户名
+
+
+
+ -
+
+
+ 直播间号
+
+
+
-
@@ -769,7 +689,14 @@ font: 75 12pt "微软雅黑";
- -
+
-
+
+
+ 语音合成
+
+
+
+ -
openai
@@ -805,7 +732,34 @@ font: 75 12pt "微软雅黑";
- -
+
-
+
+
+ PointingHandCursor
+
+
-
+
+ 所有
+
+
+ -
+
+ 中文
+
+
+ -
+
+ 英文
+
+
+ -
+
+ 日文
+
+
+
+
+ -
chatgpt
@@ -984,18 +938,145 @@ font: 75 12pt "微软雅黑";
- -
-
+
-
+
- 念用户名
+ 提示词前缀
- -
-
-
- 启用
+
-
+
+
+ ChatGLM
+
+
+
-
+
+
-
+
+
+ api地址
+
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ 前p个选择
+
+
+
+ -
+
+
+ 最大长度限制
+
+
+
+ -
+
+
+ 温度
+
+
+
+ -
+
+
+
+
+
+
+
+ -
+
+
+ 音频随机变速
+
+
-
+
+
-
+
+
+ -
+
+
+ 普通音频变速
+
+
+
+ -
+
+
+ 速度下限
+
+
+
+ -
+
+
+ 速度上限
+
+
+
+ -
+
+
+ 启用
+
+
+
+ -
+
+
+ -
+
+
+ 文案音频变速
+
+
+
+ -
+
+
+ 启用
+
+
+
+ -
+
+
+ 速度下限
+
+
+
+ -
+
+
+ -
+
+
+ 速度上限
+
+
+
+ -
+
+
+
+
+