xiaoyunchong.xyc commited on
Commit ·
abb99a3
1
Parent(s): a7088d6
docs: add hub=hf to code examples, use HF model IDs for vad_model
Browse files- README.md +3 -3
- README_zh.md +3 -3
README.md
CHANGED
|
@@ -78,8 +78,8 @@ def main():
|
|
| 78 |
model_dir = "FunAudioLLM/Fun-ASR-Nano-2512"
|
| 79 |
model = AutoModel(
|
| 80 |
model=model_dir,
|
|
|
|
| 81 |
trust_remote_code=True,
|
| 82 |
-
remote_code="./model.py",
|
| 83 |
device="cuda:0",
|
| 84 |
)
|
| 85 |
|
|
@@ -102,10 +102,10 @@ def main():
|
|
| 102 |
|
| 103 |
model = AutoModel(
|
| 104 |
model=model_dir,
|
|
|
|
| 105 |
trust_remote_code=True,
|
| 106 |
-
vad_model="fsmn-vad",
|
| 107 |
vad_kwargs={"max_single_segment_time": 30000},
|
| 108 |
-
remote_code="./model.py",
|
| 109 |
device="cuda:0",
|
| 110 |
)
|
| 111 |
res = model.generate(input=[wav_path], cache={}, batch_size=1)
|
|
|
|
| 78 |
model_dir = "FunAudioLLM/Fun-ASR-Nano-2512"
|
| 79 |
model = AutoModel(
|
| 80 |
model=model_dir,
|
| 81 |
+
hub="hf",
|
| 82 |
trust_remote_code=True,
|
|
|
|
| 83 |
device="cuda:0",
|
| 84 |
)
|
| 85 |
|
|
|
|
| 102 |
|
| 103 |
model = AutoModel(
|
| 104 |
model=model_dir,
|
| 105 |
+
hub="hf",
|
| 106 |
trust_remote_code=True,
|
| 107 |
+
vad_model="funasr/fsmn-vad",
|
| 108 |
vad_kwargs={"max_single_segment_time": 30000},
|
|
|
|
| 109 |
device="cuda:0",
|
| 110 |
)
|
| 111 |
res = model.generate(input=[wav_path], cache={}, batch_size=1)
|
README_zh.md
CHANGED
|
@@ -78,8 +78,8 @@ def main():
|
|
| 78 |
model_dir = "FunAudioLLM/Fun-ASR-Nano-2512"
|
| 79 |
model = AutoModel(
|
| 80 |
model=model_dir,
|
|
|
|
| 81 |
trust_remote_code=True,
|
| 82 |
-
remote_code="./model.py",
|
| 83 |
device="cuda:0",
|
| 84 |
)
|
| 85 |
|
|
@@ -102,10 +102,10 @@ def main():
|
|
| 102 |
|
| 103 |
model = AutoModel(
|
| 104 |
model=model_dir,
|
|
|
|
| 105 |
trust_remote_code=True,
|
| 106 |
-
vad_model="fsmn-vad",
|
| 107 |
vad_kwargs={"max_single_segment_time": 30000},
|
| 108 |
-
remote_code="./model.py",
|
| 109 |
device="cuda:0",
|
| 110 |
)
|
| 111 |
res = model.generate(input=[wav_path], cache={}, batch_size=1)
|
|
|
|
| 78 |
model_dir = "FunAudioLLM/Fun-ASR-Nano-2512"
|
| 79 |
model = AutoModel(
|
| 80 |
model=model_dir,
|
| 81 |
+
hub="hf",
|
| 82 |
trust_remote_code=True,
|
|
|
|
| 83 |
device="cuda:0",
|
| 84 |
)
|
| 85 |
|
|
|
|
| 102 |
|
| 103 |
model = AutoModel(
|
| 104 |
model=model_dir,
|
| 105 |
+
hub="hf",
|
| 106 |
trust_remote_code=True,
|
| 107 |
+
vad_model="funasr/fsmn-vad",
|
| 108 |
vad_kwargs={"max_single_segment_time": 30000},
|
|
|
|
| 109 |
device="cuda:0",
|
| 110 |
)
|
| 111 |
res = model.generate(input=[wav_path], cache={}, batch_size=1)
|