From 3cdb83537b6c76f2dbe2a4335c805a37aae9e537 Mon Sep 17 00:00:00 2001
From: 游雁 <zhifu.gzf@alibaba-inc.com>
Date: 星期一, 25 三月 2024 00:25:18 +0800
Subject: [PATCH] finetune

---
 examples/README_zh.md |   49 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 49 insertions(+), 0 deletions(-)

diff --git a/examples/README_zh.md b/examples/README_zh.md
index 563fe7c..60c3d97 100644
--- a/examples/README_zh.md
+++ b/examples/README_zh.md
@@ -352,6 +352,55 @@
 ```
 娴忚鍣ㄤ腑鎵撳紑锛歨ttp://localhost:6006/
 
+### 璁粌鍚庢ā鍨嬫祴璇�
+
+
+#### 鏈塩onfiguration.json
+
+鍋囧畾锛岃缁冩ā鍨嬭矾寰勪负锛�./model_dir锛屽鏋滄敼鐩綍涓嬫湁鐢熸垚configuration.json锛屽彧闇�瑕佸皢 [涓婅堪妯″瀷鎺ㄧ悊鏂规硶](https://github.com/alibaba-damo-academy/FunASR/blob/main/examples/README_zh.md#%E6%A8%A1%E5%9E%8B%E6%8E%A8%E7%90%86) 涓ā鍨嬪悕瀛椾慨鏀逛负妯″瀷璺緞鍗冲彲
+
+渚嬪锛�
+
+浠巗hell鎺ㄧ悊
+```shell
+python -m funasr.bin.inference ++model="./model_dir" ++input=="${input}" ++output_dir="${output_dir}"
+```
+浠巔ython鎺ㄧ悊
+
+```python
+from funasr import AutoModel
+
+model = AutoModel(model="./model_dir")
+
+res = model.generate(input=wav_file)
+print(res)
+```
+
+#### 鏃燾onfiguration.json鏃�
+
+濡傛灉妯″瀷璺緞涓棤configuration.json鏃讹紝闇�瑕佹墜鍔ㄦ寚瀹氬叿浣撻厤缃枃浠惰矾寰勪笌妯″瀷璺緞
+
+```shell
+python -m funasr.bin.inference \
+--config-path "${local_path}" \
+--config-name "${config}" \
+++init_param="${init_param}" \
+++tokenizer_conf.token_list="${tokens}" \
+++frontend_conf.cmvn_file="${cmvn_file}" \
+++input="${input}" \
+++output_dir="${output_dir}" \
+++device="${device}"
+```
+
+鍙傛暟浠嬬粛
+- `config-path`锛氫负瀹為獙涓繚瀛樼殑 `config.yaml`锛屽彲浠ヤ粠瀹為獙杈撳嚭鐩綍涓煡鎵俱��
+- `config-name`锛氶厤缃枃浠跺悕锛屼竴鑸负 `config.yaml`锛屾敮鎸亂aml鏍煎紡涓巎son鏍煎紡锛屼緥濡� `config.json`
+- `init_param`锛氶渶瑕佹祴璇曠殑妯″瀷鍙傛暟锛屼竴鑸负`model.pt`锛屽彲浠ヨ嚜宸遍�夋嫨鍏蜂綋鐨勬ā鍨嬫枃浠�
+- `tokenizer_conf.token_list`锛氳瘝琛ㄦ枃浠惰矾寰勶紝涓�鑸湪 `config.yaml` 鏈夋寚瀹氾紝鏃犻渶鍐嶆墜鍔ㄦ寚瀹氾紝褰� `config.yaml` 涓矾寰勪笉姝g‘鏃讹紝闇�瑕佸湪姝ゅ鎵嬪姩鎸囧畾銆�
+- `frontend_conf.cmvn_file`锛歸av鎻愬彇fbank涓敤鍒扮殑cmvn鏂囦欢锛屼竴鑸湪 `config.yaml` 鏈夋寚瀹氾紝鏃犻渶鍐嶆墜鍔ㄦ寚瀹氾紝褰� `config.yaml` 涓矾寰勪笉姝g‘鏃讹紝闇�瑕佸湪姝ゅ鎵嬪姩鎸囧畾銆�
+
+鍏朵粬鍙傛暟鍚屼笂锛屽畬鏁� [绀轰緥](https://github.com/alibaba-damo-academy/FunASR/blob/main/examples/industrial_data_pretraining/paraformer/infer_from_local.sh)
+
 
 <a name="妯″瀷瀵煎嚭涓庢祴璇�"></a>
 ## 妯″瀷瀵煎嚭涓庢祴璇�

--
Gitblit v1.9.1