Skip to content

Commit

Permalink
支持转录功能,将文件拖动到 start_client_gui.exe
Browse files Browse the repository at this point in the history
  • Loading branch information
H1DDENADM1N committed Jan 23, 2024
1 parent 530966f commit 9784e06
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
1 change: 1 addition & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
3. Server 和 Client 以 tab 集成在一个 gui,无任务栏占用。
4. 双击 start.exe 运行,可自行设置开机自启动。
5. 已包含所有 Python 环境和 models 模型,解压即用。
6. 支持转录功能,将文件拖动到 start_client_gui.exe

下载地址:

Expand Down
File renamed without changes.
20 changes: 15 additions & 5 deletions start _client_gui.py → start_client_gui.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
import sys
import subprocess
from queue import Queue
Expand Down Expand Up @@ -116,8 +117,17 @@ def update_text_box(self):
self.text_box_client.append(line)

if __name__ == '__main__':
app = QApplication([])
apply_stylesheet(app, theme='dark_teal.xml')
gui = GUI()
gui.show()
sys.exit(app.exec())
if sys.argv[1:]:
# 如果参数传入文件,那就转录文件
CapsWriter_path = os.path.dirname(os.path.abspath(__file__))
script_path = os.path.join(CapsWriter_path, 'core_client.py')
python_exe_path = os.path.join(CapsWriter_path, 'runtime\\python.exe')
args = [arg for arg in sys.argv[1:]]
subprocess.run([python_exe_path, script_path] + args)
else:
# GUI
app = QApplication([])
apply_stylesheet(app, theme='dark_teal.xml')
gui = GUI()
gui.show()
sys.exit(app.exec())

0 comments on commit 9784e06

Please sign in to comment.