From a836eca98e30fa67d45167dac40f359ae42d42ec Mon Sep 17 00:00:00 2001 From: 游雁 <zhifu.gzf@alibaba-inc.com> Date: 星期三, 17 七月 2024 10:16:19 +0800 Subject: [PATCH] update --- README_zh.md | 10 ++++++++++ README.md | 10 ++++++++++ 2 files changed, 20 insertions(+), 0 deletions(-) diff --git a/README.md b/README.md index 3a99b99..525b563 100644 --- a/README.md +++ b/README.md @@ -156,6 +156,16 @@ text = rich_transcription_postprocess(res[0]["text"]) print(text) ``` +Parameter Descriptions: +- `model_dir`: The name of the model, or the model's path on the local disk. +- `trust_remote_code`: + - When set to `True`, this indicates that the model's code implementation should be loaded from the location specified by `remote_code`, which points to the exact code for the model (for example, `model.py` in the current directory). It supports absolute paths, relative paths, and network URLs. + - When set to `False`, this signifies that the model's code implementation is the integrated version within [FunASR](https://github.com/modelscope/FunASR). In this case, any modifications to `model.py` in the current directory will not take effect because the version loaded is the internal one from FunASR. For the model code, [click here to view](https://github.com/modelscope/FunASR/tree/main/funasr/models/sense_voice). +- `max_single_segment_time`: The maximum length of audio segments that the `vad_model` can cut, measured in milliseconds (ms). +- `use_itn`: Indicates whether the output should include punctuation and inverse text normalization. +- `batch_size_s`: Represents a dynamic batch size where the total duration of the audio in the batch is measured in seconds (s). +- `merge_vad`: Whether to concatenate short audio fragments cut by the vad model, with the merged length being `merge_length_s`, measured in seconds (s). + #### Paraformer ```python from funasr import AutoModel diff --git a/README_zh.md b/README_zh.md index 70a6d25..5b3985f 100644 --- a/README_zh.md +++ b/README_zh.md @@ -155,6 +155,16 @@ text = rich_transcription_postprocess(res[0]["text"]) print(text) ``` +鍙傛暟璇存槑锛� +- `model_dir`锛氭ā鍨嬪悕绉帮紝鎴栨湰鍦扮鐩樹腑鐨勬ā鍨嬭矾寰勩�� +- `trust_remote_code`锛� + - `True`琛ㄧずmodel浠g爜瀹炵幇浠巂remote_code`澶勫姞杞斤紝`remote_code`鎸囧畾`model`鍏蜂綋浠g爜鐨勪綅缃紙渚嬪锛屽綋鍓嶇洰褰曚笅鐨刞model.py`锛夛紝鏀寔缁濆璺緞涓庣浉瀵硅矾寰勶紝浠ュ強缃戠粶url銆� + - `False`琛ㄧず锛宮odel浠g爜瀹炵幇涓� [FunASR](https://github.com/modelscope/FunASR) 鍐呴儴闆嗘垚鐗堟湰锛屾鏃朵慨鏀瑰綋鍓嶇洰褰曚笅鐨刞model.py`涓嶄細鐢熸晥锛屽洜涓哄姞杞界殑鏄痜unasr鍐呴儴鐗堟湰锛屾ā鍨嬩唬鐮乕鐐瑰嚮鏌ョ湅](https://github.com/modelscope/FunASR/tree/main/funasr/models/sense_voice)銆� +- `max_single_segment_time`: 琛ㄧず`vad_model`鏈�澶у垏鍓查煶棰戞椂闀�, 鍗曚綅鏄绉抦s銆� +- `use_itn`锛氳緭鍑虹粨鏋滀腑鏄惁鍖呭惈鏍囩偣涓庨�嗘枃鏈鍒欏寲銆� +- `batch_size_s` 琛ㄧず閲囩敤鍔ㄦ�乥atch锛宐atch涓�婚煶棰戞椂闀匡紝鍗曚綅涓虹s銆� +- `merge_vad`锛氭槸鍚﹀皢 vad 妯″瀷鍒囧壊鐨勭煭闊抽纰庣墖鍚堟垚锛屽悎骞跺悗闀垮害涓篳merge_length_s`锛屽崟浣嶄负绉抯銆� + #### Paraformer ```python from funasr import AutoModel -- Gitblit v1.9.1