Commit 12f22d5e authored by 翟艳秋(20软)'s avatar 翟艳秋(20软)

Merge branch 'feat_1' of http://gitlab.uiiai.com/xuanweiace/accessibility_movie_2 into old_version

parents 7a5a6e45 61f85863
......@@ -16,7 +16,7 @@ class Detect_Dialog(QDialog, Ui_Dialog):
super(Detect_Dialog, self).__init__()
self.setupUi(self)
self.setWindowTitle("检测")
self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setText("start detect")
self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setText("开始检测")
self.pushButton.clicked.connect(self.openFile)
self.pushButton_2.clicked.connect(self.openTableFile)
self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).clicked.connect(self.start_detect)
......
......@@ -62,6 +62,9 @@ class MainWindow(QMainWindow, Ui_MainWindow):
self.video_timer = QTimer()
self.video_timer.timeout.connect(self.change_videotime_label_slot)
self.video_timer.start(1000) # todo 作为参数配置
self.refresh_tab_timer = QTimer()
self.refresh_tab_timer.timeout.connect(self.refresh_tab_slot)
"""
状态栏相关空间
"""
......@@ -485,10 +488,16 @@ class MainWindow(QMainWindow, Ui_MainWindow):
return
self.projectContext.setExcelPath(file_path)
self.projectContext.load_excel_from_path()
self.all_tableWidget_idx = 0
self.pb_tableWidget_idx = 0
self.zm_tableWidget_idx = 0
self.set_table_to_window()
def open_excel_with_project_path(self):
self.projectContext.load_excel_from_path()
self.all_tableWidget_idx = 0
self.pb_tableWidget_idx = 0
self.zm_tableWidget_idx = 0
self.set_table_to_window()
def set_table_to_window(self):
self.projectContext.initial_ing = True
......@@ -505,13 +514,13 @@ class MainWindow(QMainWindow, Ui_MainWindow):
self.zm_tableWidget.setRowCount(len(subtitle_list))
self.zm_tableWidget.setColumnCount(len(subtitle_header))
self.zm_tableWidget.setHorizontalHeaderLabels(subtitle_header)
for i in range(len(subtitle_list)):
for i in range(self.zm_tableWidget_idx, len(subtitle_list)):
self.setElememtToTable(self.zm_tableWidget, subtitle_list[i], i)
self.pb_tableWidget.setRowCount(len(aside_list))
self.pb_tableWidget.setColumnCount(len(aside_header))
self.pb_tableWidget.setHorizontalHeaderLabels(aside_header)
for i in range(len(aside_list)):
for i in range(self.pb_tableWidget_idx, len(aside_list)):
self.setElememtToTable(self.pb_tableWidget, aside_list[i], i)
......@@ -519,9 +528,15 @@ class MainWindow(QMainWindow, Ui_MainWindow):
self.all_tableWidget.setRowCount(len(all_elements))
self.all_tableWidget.setColumnCount(len(contentHeader))
self.all_tableWidget.setHorizontalHeaderLabels(contentHeader)
for i in range(len(all_elements)):
for i in range(self.all_tableWidget_idx, len(all_elements)):
self.setElememtToTable(self.all_tableWidget, all_elements[i], i)
self.all_tableWidget_idx = len(all_elements)
self.pb_tableWidget_idx = len(aside_list)
self.zm_tableWidget_idx = len(subtitle_list)
self.projectContext.initial_ing = False
def setElememtToTable(self, table: QTableWidget, elem: Element, idx: int):
......
......@@ -91,7 +91,7 @@ def speech_synthesis(text: str, output_file: str, speaker: Speaker, speed: float
"""
audio_path = tmp_file
speech_config = SpeechConfig(
subscription="ffa331815f0f4c7fa418bb6c2e1c4e17", region="eastus")
subscription="db34d38d2d3447d482e0f977c66bd624", region="eastus")
speech_config.speech_synthesis_language = "zh-CN"
speech_config.speech_synthesis_voice_name = speaker.speaker_code
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment