Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
accessibility_movie_2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵心治
accessibility_movie_2
Commits
12f22d5e
Commit
12f22d5e
authored
Oct 30, 2022
by
翟艳秋(20软)
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feat_1' of
http://gitlab.uiiai.com/xuanweiace/accessibility_movie_2
into old_version
parents
7a5a6e45
61f85863
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
5 deletions
+20
-5
detect_dialog.py
detect_dialog.py
+1
-1
main_window.py
main_window.py
+18
-3
speech_synthesis.py
speech_synthesis.py
+1
-1
No files found.
detect_dialog.py
View file @
12f22d5e
...
@@ -16,7 +16,7 @@ class Detect_Dialog(QDialog, Ui_Dialog):
...
@@ -16,7 +16,7 @@ class Detect_Dialog(QDialog, Ui_Dialog):
super
(
Detect_Dialog
,
self
)
.
__init__
()
super
(
Detect_Dialog
,
self
)
.
__init__
()
self
.
setupUi
(
self
)
self
.
setupUi
(
self
)
self
.
setWindowTitle
(
"检测"
)
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
.
clicked
.
connect
(
self
.
openFile
)
self
.
pushButton_2
.
clicked
.
connect
(
self
.
openTableFile
)
self
.
pushButton_2
.
clicked
.
connect
(
self
.
openTableFile
)
self
.
buttonBox
.
button
(
QDialogButtonBox
.
StandardButton
.
Ok
)
.
clicked
.
connect
(
self
.
start_detect
)
self
.
buttonBox
.
button
(
QDialogButtonBox
.
StandardButton
.
Ok
)
.
clicked
.
connect
(
self
.
start_detect
)
...
...
main_window.py
View file @
12f22d5e
...
@@ -62,6 +62,9 @@ class MainWindow(QMainWindow, Ui_MainWindow):
...
@@ -62,6 +62,9 @@ class MainWindow(QMainWindow, Ui_MainWindow):
self
.
video_timer
=
QTimer
()
self
.
video_timer
=
QTimer
()
self
.
video_timer
.
timeout
.
connect
(
self
.
change_videotime_label_slot
)
self
.
video_timer
.
timeout
.
connect
(
self
.
change_videotime_label_slot
)
self
.
video_timer
.
start
(
1000
)
# todo 作为参数配置
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):
...
@@ -485,10 +488,16 @@ class MainWindow(QMainWindow, Ui_MainWindow):
return
return
self
.
projectContext
.
setExcelPath
(
file_path
)
self
.
projectContext
.
setExcelPath
(
file_path
)
self
.
projectContext
.
load_excel_from_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
()
self
.
set_table_to_window
()
def
open_excel_with_project_path
(
self
):
def
open_excel_with_project_path
(
self
):
self
.
projectContext
.
load_excel_from_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
()
self
.
set_table_to_window
()
def
set_table_to_window
(
self
):
def
set_table_to_window
(
self
):
self
.
projectContext
.
initial_ing
=
True
self
.
projectContext
.
initial_ing
=
True
...
@@ -505,13 +514,13 @@ class MainWindow(QMainWindow, Ui_MainWindow):
...
@@ -505,13 +514,13 @@ class MainWindow(QMainWindow, Ui_MainWindow):
self
.
zm_tableWidget
.
setRowCount
(
len
(
subtitle_list
))
self
.
zm_tableWidget
.
setRowCount
(
len
(
subtitle_list
))
self
.
zm_tableWidget
.
setColumnCount
(
len
(
subtitle_header
))
self
.
zm_tableWidget
.
setColumnCount
(
len
(
subtitle_header
))
self
.
zm_tableWidget
.
setHorizontalHeaderLabels
(
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
.
setElememtToTable
(
self
.
zm_tableWidget
,
subtitle_list
[
i
],
i
)
self
.
pb_tableWidget
.
setRowCount
(
len
(
aside_list
))
self
.
pb_tableWidget
.
setRowCount
(
len
(
aside_list
))
self
.
pb_tableWidget
.
setColumnCount
(
len
(
aside_header
))
self
.
pb_tableWidget
.
setColumnCount
(
len
(
aside_header
))
self
.
pb_tableWidget
.
setHorizontalHeaderLabels
(
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
)
self
.
setElememtToTable
(
self
.
pb_tableWidget
,
aside_list
[
i
],
i
)
...
@@ -519,9 +528,15 @@ class MainWindow(QMainWindow, Ui_MainWindow):
...
@@ -519,9 +528,15 @@ class MainWindow(QMainWindow, Ui_MainWindow):
self
.
all_tableWidget
.
setRowCount
(
len
(
all_elements
))
self
.
all_tableWidget
.
setRowCount
(
len
(
all_elements
))
self
.
all_tableWidget
.
setColumnCount
(
len
(
contentHeader
))
self
.
all_tableWidget
.
setColumnCount
(
len
(
contentHeader
))
self
.
all_tableWidget
.
setHorizontalHeaderLabels
(
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
.
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
self
.
projectContext
.
initial_ing
=
False
def
setElememtToTable
(
self
,
table
:
QTableWidget
,
elem
:
Element
,
idx
:
int
):
def
setElememtToTable
(
self
,
table
:
QTableWidget
,
elem
:
Element
,
idx
:
int
):
...
...
speech_synthesis.py
View file @
12f22d5e
...
@@ -91,7 +91,7 @@ def speech_synthesis(text: str, output_file: str, speaker: Speaker, speed: float
...
@@ -91,7 +91,7 @@ def speech_synthesis(text: str, output_file: str, speaker: Speaker, speed: float
"""
"""
audio_path
=
tmp_file
audio_path
=
tmp_file
speech_config
=
SpeechConfig
(
speech_config
=
SpeechConfig
(
subscription
=
"
ffa331815f0f4c7fa418bb6c2e1c4e17
"
,
region
=
"eastus"
)
subscription
=
"
db34d38d2d3447d482e0f977c66bd624
"
,
region
=
"eastus"
)
speech_config
.
speech_synthesis_language
=
"zh-CN"
speech_config
.
speech_synthesis_language
=
"zh-CN"
speech_config
.
speech_synthesis_voice_name
=
speaker
.
speaker_code
speech_config
.
speech_synthesis_voice_name
=
speaker
.
speaker_code
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment