zixiiu / Digital_Life_Server

Yet another voice assistant, but alive.
MIT License
2.47k stars 465 forks source link

CzJam DL_Launcher 是必须的吗? #61

Open petulat opened 1 year ago

petulat commented 1 year ago

在Linux服务器上启动了SockerServer.py。用网页访问,报错如下: 报错定位是 file = self.__receive_file() 这一句(代码位置),这个函数里为啥有一句 self.conn.send(b'sb')?)

(digital_life) petulat@gpu_server:~/code/zdir/Digital_Life_Server$ python SocketServer.py --chatVer 3 --stream False --character paimon --model gpt-3.5-turbo --proxy http://127.0.0.1:9999 --port 38584--APIKey xxx
/home/petulat/anaconda3/envs/digital_life/lib/python3.9/site-packages/revChatGPT/__init__.py:27: UserWarning: The current Python is not a recommended version, 3.10+ is recommended
  __import__("warnings").warn(
2023-06-09 00:30:24,356 INFO Initializing Server...
2023-06-09 00:30:24,357 INFO Initializing ASR Service...
2023-06-09 00:30:28,171 INFO Initializing ChatGPT Service...
2023-06-09 00:30:28,172 INFO chatGPT prompt: paimon35.txt
2023-06-09 00:30:28,238 INFO machine identifier: xxx
2023-06-09 00:30:28,340 INFO you have your own api key. Great.
2023-06-09 00:30:28,703 INFO API Chatbot initialized.
2023-06-09 00:30:28,703 INFO Initializing TTS Service for character_paimon...
2023-06-09 00:30:31,529 INFO Loaded checkpoint 'TTS/models/paimon6k_390k.pth' (iteration 8864)
2023-06-09 00:30:31,550 INFO Initializing Sentiment Engine...
2023-06-09 00:30:37,774 INFO Server is listening on 127.0.0.1:38584...
2023-06-09 01:22:47,991 INFO Connected by ('127.0.0.1', 44278)
2023-06-09 01:22:48,123 ERROR [Errno 32] Broken pipe
2023-06-09 01:22:48,123 ERROR Traceback (most recent call last):
  File "/home/petulat/code/zdir/Digital_Life_Server/SocketServer.py", line 107, in listen
    file = self.__receive_file()
  File "/home/petulat/code/zdir/Digital_Life_Server/SocketServer.py", line 166, in __receive_file
    self.conn.send(b'sb')
BrokenPipeError: [Errno 32] Broken pipe

2023-06-09 01:22:48,123 INFO Server is listening on 127.0.0.1:9528...

这个报错导致无法进入内循环的语音识别环节。 报错原因似乎是下游管道关闭,我用网页直接连接的。 用安卓APK连接 没有这个报错,但是apk提示:没有连接到服务器,请重新输入

我不清楚目前的问题是网络原因,还是客户端原因。

项目ReadME提到了其他两部分 :UE 客户端作为前端 :CzJam/DL_Launcher:我理解就是给 SocketServer.py 的各种启动参数做了个可视化界面,非必须。

关于 DL_Launcher 我的理解对吗,这个组件是不必要的吗?如果必要,什么作用呢,且在无界面Linux服务器端如何使用 DL_Launcher 呢?

yaohaizhou commented 1 year ago

同感,DL_Launcher在linux服务器下应该是不需要吧

LIEGU0317 commented 1 year ago

self.conn.send(b'sb')可能是某个特定操作的成功标志,或者是作为客户端接收到数据的确认信号。比如_send broken_之类的。(个人见解)