FunASR icon indicating copy to clipboard operation
FunASR copied to clipboard

funasr_wss_client 报错

Open monkeycc opened this issue 2 years ago • 1 comments
trafficstars

python funasr_wss_client.py
Namespace(audio_in=None, chunk_interval=10, chunk_size=[5, 10, 5], host='localhost', mode='2pass', output_dir=None, port=10095, send_without_sleep=True, ssl=1, thread_num=1, words_max_print=10000)
Namespace(audio_in=None, chunk_interval=10, chunk_size=[5, 10, 5], host='localhost', mode='2pass', output_dir=None, port=10095, send_without_sleep=True, ssl=1, thread_num=1, words_max_print=10000)
connect to wss://localhost:10095
'clear' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
pid0_0: 你
Exception: received 1000 (OK); then sent 1000 (OK)
Process Process-1:
Traceback (most recent call last):
  File "E:\anaconda3\envs\mm\lib\multiprocessing\process.py", line 315, in _bootstrap
    self.run()
  File "E:\anaconda3\envs\mm\lib\multiprocessing\process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "E:\2023_Code_WEB\FunASR-main\funasr\runtime\python\websocket\funasr_wss_client.py", line 280, in one_thread
    asyncio.get_event_loop().run_until_complete(ws_client(id, chunk_begin, chunk_size))
  File "E:\anaconda3\envs\mm\lib\asyncio\base_events.py", line 616, in run_until_complete
    return future.result()
  File "E:\2023_Code_WEB\FunASR-main\funasr\runtime\python\websocket\funasr_wss_client.py", line 275, in ws_client
    await asyncio.gather(task, task3)
  File "E:\2023_Code_WEB\FunASR-main\funasr\runtime\python\websocket\funasr_wss_client.py", line 110, in record_microphone
    await websocket.send(message)
  File "E:\anaconda3\envs\mm\lib\site-packages\websockets\legacy\protocol.py", line 635, in send
    await self.ensure_open()
  File "E:\anaconda3\envs\mm\lib\site-packages\websockets\legacy\protocol.py", line 944, in ensure_open
    raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedOK: received 1000 (OK); then sent 1000 (OK)
end

注释os.system('clear')之后 报错:


python funasr_wss_client.py
Namespace(audio_in=None, chunk_interval=10, chunk_size=[5, 10, 5], host='localhost', mode='2pass', output_dir=None, port=10095, send_without_sleep=True, ssl=1, thread_num=1, words_max_print=10000)
Namespace(audio_in=None, chunk_interval=10, chunk_size=[5, 10, 5], host='localhost', mode='2pass', output_dir=None, port=10095, send_without_sleep=True, ssl=1, thread_num=1, words_max_print=10000)
connect to wss://localhost:10095
Exception: received 1000 (OK); then sent 1000 (OK)
Process Process-1:
Traceback (most recent call last):
  File "E:\anaconda3\envs\mm\lib\multiprocessing\process.py", line 315, in _bootstrap
    self.run()
  File "E:\anaconda3\envs\mm\lib\multiprocessing\process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "E:\2023_Code_WEB\FunASR-main\funasr\runtime\python\websocket\funasr_wss_client.py", line 280, in one_thread
    asyncio.get_event_loop().run_until_complete(ws_client(id, chunk_begin, chunk_size))
  File "E:\anaconda3\envs\mm\lib\asyncio\base_events.py", line 616, in run_until_complete
    return future.result()
  File "E:\2023_Code_WEB\FunASR-main\funasr\runtime\python\websocket\funasr_wss_client.py", line 275, in ws_client
    await asyncio.gather(task, task3)
  File "E:\2023_Code_WEB\FunASR-main\funasr\runtime\python\websocket\funasr_wss_client.py", line 110, in record_microphone
    await websocket.send(message)
  File "E:\anaconda3\envs\mm\lib\site-packages\websockets\legacy\protocol.py", line 635, in send
    await self.ensure_open()
  File "E:\anaconda3\envs\mm\lib\site-packages\websockets\legacy\protocol.py", line 944, in ensure_open
    raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedOK: received 1000 (OK); then sent 1000 (OK)
end
python funasr_wss_server.py --port 10095 --certfile server.crt  --keyfile server.key
2023-09-17 21:16:34,298 - modelscope - INFO - PyTorch version 2.0.1+cu117 Found.
2023-09-17 21:16:34,300 - modelscope - INFO - Loading ast index from C:\Users\mm\.cache\modelscope\ast_indexer
2023-09-17 21:16:34,398 - modelscope - INFO - Loading done! Current index file version is 1.9.1, with md5 576f47119d5001825e0da05b59ab84f0 and a total number of 924 components indexed
model loading
model loaded! only support one client at the same time now!!!!
new user connected
Exception: object of type 'NoneType' has no len()

monkeycc avatar Sep 17 '23 13:09 monkeycc

(建议英文提问,不强制)

OS: [e.g. linux]

Python/C++ Version:

Package Version:pytorch、torchaudio、modelscope、funasr version(pip list)

Model:

Command:

Details:

Error log:

LauraGPT avatar Sep 25 '23 09:09 LauraGPT

If the issue persists, please reopen the issue and provide detailed steps to reproduce, as well as server and client logs.

lyblsgo avatar Feb 05 '24 07:02 lyblsgo