mirror of
https://github.com/modelscope/FunASR
synced 2025-09-15 14:48:36 +08:00
websocket python
This commit is contained in:
parent
2b12b16d11
commit
2978c59a95
@ -167,7 +167,7 @@ async def message(id):
|
||||
# print(meg)
|
||||
wav_name = meg.get("wav_name", "demo")
|
||||
print(wav_name)
|
||||
text = meg["text"][0]
|
||||
text = meg["text"]
|
||||
if ibest_writer is not None:
|
||||
ibest_writer["text"][wav_name] = text
|
||||
if meg["mode"] == "online":
|
||||
|
||||
@ -138,10 +138,10 @@ async def async_asr(websocket, audio_in):
|
||||
rec_result = inference_pipeline_punc(text_in=rec_result['text'],
|
||||
param_dict=websocket.param_dict_punc)
|
||||
# print(rec_result)
|
||||
message = json.dumps({"mode": "offline", "text": [rec_result["text"]], "wav_name": websocket.wav_name})
|
||||
message = json.dumps({"mode": "offline", "text": rec_result["text"], "wav_name": websocket.wav_name})
|
||||
await websocket.send(message)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -1 +1 @@
|
||||
0.4.6
|
||||
0.4.7
|
||||
|
||||
Loading…
Reference in New Issue
Block a user