1 Star 0 Fork 308

Linland / fay

forked from xszyou / fay 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
main.py 1.23 KB
一键复制 编辑 原始数据 按行查看 历史
xszyou 提交于 2023-05-06 11:12 . 新增实时照片驱动集成
import os
import sys
from io import BytesIO
from PyQt5 import QtGui
from PyQt5.QtWidgets import QApplication
from ai_module import ali_nls
from core import wsa_server
from gui import flask_server
from gui.window import MainWindow
from utils import config_util
from scheduler.thread_manager import MyThread
def __clear_samples():
if not os.path.exists("./samples"):
os.mkdir("./samples")
for file_name in os.listdir('./samples'):
if file_name.startswith('sample-') and file_name.endswith('.mp3'):
os.remove('./samples/' + file_name)
def __clear_songs():
if not os.path.exists("./songs"):
os.mkdir("./songs")
for file_name in os.listdir('./songs'):
if file_name.endswith('.mp3'):
os.remove('./songs/' + file_name)
if __name__ == '__main__':
__clear_samples()
__clear_songs()
config_util.load_config()
ws_server = wsa_server.new_instance(port=10002)
ws_server.start_server()
web_ws_server = wsa_server.new_web_instance(port=10003)
web_ws_server.start_server()
ali_nls.start()
flask_server.start()
app = QApplication(sys.argv)
app.setWindowIcon(QtGui.QIcon('icon.png'))
win = MainWindow()
win.show()
app.exit(app.exec_())
Python
1
https://gitee.com/linland-xie/fay.git
git@gitee.com:linland-xie/fay.git
linland-xie
fay
fay
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891