Update funasr_wss_server.py (#1322)

解决报

```python
return await cast(
  File "funasr_wss_server.py", line 188, in ws_serve
    int(websocket.status_dict_asr_online["chunk_size"][1]) * 60 / websocket.chunk_interval)
ValueError: invalid literal for int() with base 10: ','
^CTraceback (most recent call last):
  File "funasr_wss_server.py", line 302, in <module>
    asyncio.get_event_loop().run_forever()
```
This commit is contained in:
dudulu 2024-01-31 16:22:05 +08:00 committed by GitHub
parent 3f487c4290
commit 6cdbcf4b0a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -179,7 +179,8 @@ async def ws_serve(websocket, path):
if "wav_name" in messagejson:
websocket.wav_name = messagejson.get("wav_name")
if "chunk_size" in messagejson:
websocket.status_dict_asr_online["chunk_size"] = messagejson["chunk_size"]
chunk_size = messagejson["chunk_size"].split(',')
websocket.status_dict_asr_online["chunk_size"] = [int(x) for x in chunk_size]
if "encoder_chunk_look_back" in messagejson:
websocket.status_dict_asr_online["encoder_chunk_look_back"] = messagejson["encoder_chunk_look_back"]
if "decoder_chunk_look_back" in messagejson: