mirror of
https://github.com/modelscope/FunASR
synced 2025-09-15 14:48:36 +08:00
modify grpc environment dependencies
This commit is contained in:
parent
45dc9e484f
commit
42f90b4ca1
@ -5,7 +5,6 @@ import time
|
|||||||
|
|
||||||
import paraformer_pb2_grpc
|
import paraformer_pb2_grpc
|
||||||
from paraformer_pb2 import Response
|
from paraformer_pb2 import Response
|
||||||
from rapid_paraformer.utils.frontend import load_bytes
|
|
||||||
|
|
||||||
|
|
||||||
class ASRServicer(paraformer_pb2_grpc.ASRServicer):
|
class ASRServicer(paraformer_pb2_grpc.ASRServicer):
|
||||||
@ -110,6 +109,7 @@ class ASRServicer(paraformer_pb2_grpc.ASRServicer):
|
|||||||
else:
|
else:
|
||||||
asr_result = ""
|
asr_result = ""
|
||||||
elif self.backend == "onnxruntime":
|
elif self.backend == "onnxruntime":
|
||||||
|
from rapid_paraformer.utils.frontend import load_bytes
|
||||||
array = load_bytes(tmp_data)
|
array = load_bytes(tmp_data)
|
||||||
asr_result = self.inference_16k_pipeline(array)[0]
|
asr_result = self.inference_16k_pipeline(array)[0]
|
||||||
end_time = int(round(time.time() * 1000))
|
end_time = int(round(time.time() * 1000))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user