MCPcopy Create free account
hub / github.com/modelscope/FunASR / wait_for_end

Method wait_for_end

runtime/funasr_api/funasr_stream.py:57–69  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

55
56 # return all result for this stream
57 def wait_for_end(self):
58 try:
59
60 message = json.dumps({"is_speaking": False})
61 self.funasr_core.websocket.send(message)
62 self.funasr_core.wait_for_result()
63 self.funasr_core.close()
64
65 # return the msg
66 return self.funasr_core.rec_text
67 except Exception as e:
68 print("error get_final_result ",e)
69 return ""
70
71
72

Callers 1

Calls 2

wait_for_resultMethod · 0.80
closeMethod · 0.45

Tested by

no test coverage detected