游雁
2023-03-24 f89ec5d5c903ca956e28da8224102befaaf72fb8
funasr/runtime/python/libtorch/README.md
@@ -1,4 +1,4 @@
## Using paraformer with libtorch
## Using funasr with libtorch
### Introduction
@@ -7,13 +7,6 @@
### Steps:
1. Export the model.
   - Command: (`Tips`: torch >= 1.11.0 is required.)
      ```shell
      python -m funasr.export.export_model [model_name] [export_dir] false
      ```
      `model_name`: the model is to export.
      `export_dir`: the dir where the onnx is export.
       More details ref to ([export docs](https://github.com/alibaba-damo-academy/FunASR/tree/main/funasr/export))
@@ -27,11 +20,9 @@
         ```
2. Install the `torch_paraformer`.
2. Install the `funasr_torch`.
    ```shell
    git clone https://github.com/alibaba/FunASR.git && cd FunASR
    cd funasr/runtime/python/libtorch
    python setup.py install
    pip install funasr_torch -i https://pypi.Python.org/simple
    ```
@@ -41,7 +32,7 @@
   - Output: `List[str]`: recognition result.
   - Example:
        ```python
        from torch_paraformer import Paraformer
        from funasr_torch import Paraformer
        model_dir = "/nfs/zhifu.gzf/export/damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch"
        model = Paraformer(model_dir, batch_size=1)