FunASR/funasr/runtime/python/grpc
2023-01-29 19:01:36 +08:00
..
__pycache__ fix client, add pb file 2023-01-29 19:01:36 +08:00
proto add workflow 2023-01-29 18:33:29 +08:00
grpc_client.py add client 2023-01-29 18:18:12 +08:00
grpc_main_client_mic.py fix client, add pb file 2023-01-29 19:01:36 +08:00
grpc_main_server.py update readme, for start grpc server and client 2023-01-29 18:23:13 +08:00
grpc_server.py update server for argsparser 2023-01-29 17:29:28 +08:00
paraformer_pb2_grpc.py fix client, add pb file 2023-01-29 19:01:36 +08:00
paraformer_pb2.py fix client, add pb file 2023-01-29 19:01:36 +08:00
Readme.md update readme format 2023-01-29 18:36:26 +08:00

Using paraformer with grpc

We can send streaming audio data to server in real-time with grpc client every 10 ms e.g., and get transcribed text when stop speaking. The audio data is in streaming, the asr inference process is in offline.

Steps

Step 1) Generate protobuf file for grpc

python -m grpc_tools.protoc  --proto_path=./proto -I ./proto    --python_out=. --grpc_python_out=./ ./proto/paraformer.proto

Step 2) start grpc server

python grpc_main_server.py --port 10095

Step 3) start grpc client

python grpc_main_client_mic.py --host 127.0.0.1 --port 10095

Workflow in desgin

avatar