| | |
| | | ([简体中文](./SDK_tutorial_online_zh.md)|English) |
| | | |
| | | # FunASR-realtime-transcribe service |
| | | # FunASR Realtime Transcribe Service |
| | | |
| | | FunASR offers a real-time speech-to-text service that can be easily deployed locally or on cloud servers. The service integrates various capabilities developed by the speech laboratory of DAMO Academy on the ModelScope, including voice activity detection (VAD), Paraformer-large non-streaming automatic speech recognition (ASR), Paraformer-large streaming ASR, and punctuation prediction (PUNC). The software package supports realtime speech-to-text service as well as high-precision transcription text correction at the end of each sentence and outputs text with punctuation. |
| | | |
| | |
| | | Download the deployment tool `funasr-runtime-deploy-online-cpu-zh.sh` |
| | | |
| | | ```shell |
| | | curl -O https://raw.githubusercontent.com/alibaba-damo-academy/FunASR/main/funasr/runtime/deploy_tools/funasr-runtime-deploy-online-cpu-en.sh; |
| | | curl -O https://raw.githubusercontent.com/alibaba-damo-academy/FunASR/main/funasr/runtime/deploy_tools/funasr-runtime-deploy-online-cpu-zh.sh; |
| | | # If there is a network problem, users in mainland China can use the following command: |
| | | # curl -O https://isv-data.oss-cn-hangzhou.aliyuncs.com/ics/MaaS/ASR/shell/funasr-runtime-deploy-online-cpu-en.sh; |
| | | # curl -O https://isv-data.oss-cn-hangzhou.aliyuncs.com/ics/MaaS/ASR/shell/funasr-runtime-deploy-online-cpu-zh.sh; |
| | | ``` |
| | | |
| | | Execute the deployment tool and press the Enter key at the prompt to complete the installation and deployment of the server. Currently, the convenient deployment tool only supports Linux environments. For other environments, please refer to the development guide ([docs](./SDK_advanced_guide_offline.md)). |
| | | Execute the deployment tool and press the Enter key at the prompt to complete the installation and deployment of the server. Currently, the convenient deployment tool only supports Linux environments. For other environments, please refer to the development guide ([docs](./SDK_advanced_guide_online.md)). |
| | | ```shell |
| | | sudo bash funasr-runtime-deploy-online-cpu-zh.sh install --workspace ./funasr-runtime-resources |
| | | ``` |
| | |
| | | |
| | | After entering the samples/cpp directory, you can test it with CPP. The command is as follows: |
| | | ```shell |
| | | ./funasr-wss-client --server-ip 127.0.0.1 --port 10095 --wav-path ../audio/asr_example.wav |
| | | ./funasr-wss-client-2pass --server-ip 127.0.0.1 --port 10095 --wav-path ../audio/asr_example.wav |
| | | ``` |
| | | |
| | | Command parameter description: |
| | |
| | | --server-ip specifies the IP address of the machine where the FunASR runtime-SDK service is deployed. The default value is the local IP address (127.0.0.1). If the client and the service are not on the same server, the IP address needs to be changed to the IP address of the deployment machine. |
| | | --port specifies the deployment port number as 10095. |
| | | --mode: `offline` indicates that the inference mode is one-sentence recognition; `online` indicates that the inference mode is real-time speech recognition; `2pass` indicates real-time speech recognition, and offline models are used for error correction at the end of each sentence. |
| | | --chunk_size: indicates the latency configuration of the streaming model. [5,10,5] indicates that the current audio is 600ms, with a lookback of 300ms and a lookahead of 300ms. |
| | | --chunk-size: indicates the latency configuration of the streaming model. [5,10,5] indicates that the current audio is 600ms, with a lookback of 300ms and a lookahead of 300ms. |
| | | --wav-path specifies the audio file to be transcribed, and supports file paths. |
| | | --thread_num sets the number of concurrent send threads, with a default value of 1. |
| | | --ssl sets whether to enable SSL certificate verification, with a default value of 1 for enabling and 0 for disabling. |
| | | --threa-num sets the number of concurrent send threads, with a default value of 1. |
| | | --is-ssl sets whether to enable SSL certificate verification, with a default value of 1 for enabling and 0 for disabling. |
| | | ``` |
| | | |
| | | ### html-client |
| | |
| | | sudo bash funasr-runtime-deploy-online-cpu-zh.sh start |
| | | ``` |
| | | |
| | | ### Set SSL |
| | | |
| | | SSL verification is enabled by default. If you need to disable it, you can set it when starting. |
| | | ```shell |
| | | sudo bash funasr-runtime-deploy-online-cpu-zh.sh --ssl 0 |
| | | ``` |
| | | |
| | | ### Stop the FunASR service |
| | | |
| | |
| | | sudo bash funasr-runtime-deploy-online-cpu-zh.sh update --workspace ./funasr-runtime-resources |
| | | ``` |
| | | |
| | | ### Set SSL |
| | | |
| | | SSL verification is enabled by default. If you need to disable it, you can set it when starting. |
| | | ```shell |
| | | sudo bash funasr-runtime-deploy-online-cpu-zh.sh update --ssl 0 |
| | | ``` |
| | | |
| | | |
| | | ## Contact Us |