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

Method rec_buf

runtime/funasr_api/funasr_api.py:75–82  ·  view source on GitHub ↗
(self,audio_buf,ffmpeg_decode=False)

Source from the content-addressed store, hash-verified

73
74 # rec buffer, set ffmpeg_decode=True if audio is not PCM or WAV type
75 def rec_buf(self,audio_buf,ffmpeg_decode=False):
76 try:
77 funasr_core=self.new_core()
78 funasr_core.rec_buf(audio_buf,ffmpeg_decode=ffmpeg_decode)
79 return funasr_core.get_result()
80 except Exception as e:
81 print("rec_file",e)
82 return
83 # rec file
84 def rec_file(self,file_path):
85 try:

Callers 1

recognizer_exampleFunction · 0.95

Calls 2

new_coreMethod · 0.95
get_resultMethod · 0.45

Tested by

no test coverage detected