ba6972a647
1、唇型计算的视音素更换成33毫秒; 2、内置rwkv_api nlp可以直接使用; 3、降低情绪性向数字人端推送的频度; 4、非数字人连接状态不产生接口消息; 5、修复因mp3格式错误而导致一定概率不推送播放信息给数字人端的问题; 6、修复静音等指令执行时提前结束nlp逻辑,而导致用户提问消息不推送数字人端问题; 7、补充wav文件启动清理; 8、websocket工具类升级完善。
57 lines
1.5 KiB
Python
57 lines
1.5 KiB
Python
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
|
||
from core.content_db import Content_Db
|
||
import sys
|
||
sys.setrecursionlimit(sys.getrecursionlimit() * 5)
|
||
|
||
def __clear_samples():
|
||
if not os.path.exists("./samples"):
|
||
os.mkdir("./samples")
|
||
for file_name in os.listdir('./samples'):
|
||
if file_name.startswith('sample-'):
|
||
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()
|
||
dbstatus = os.path.exists("fay.db")
|
||
if(dbstatus == False):
|
||
contentdb = Content_Db()
|
||
contentdb.init_db()
|
||
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()
|
||
#Edit by xszyou in 20230516:增加本地asr后,aliyun调成可选配置
|
||
if config_util.ASR_mode == "ali":
|
||
ali_nls.start()
|
||
flask_server.start()
|
||
app = QApplication(sys.argv)
|
||
app.setWindowIcon(QtGui.QIcon('icon.png'))
|
||
win = MainWindow()
|
||
win.show()
|
||
app.exit(app.exec_())
|
||
|
||
|