怎么设置多个热词? #2550
Answered
by
LauraGPT
JiweiYu175
asked this question in
Q&A
怎么设置多个热词?
#2550
-
|
如题 |
Beta Was this translation helpful? Give feedback.
Answered by
LauraGPT
Jul 15, 2026
Replies: 1 comment
-
|
以 result = model.generate(
input="audio.wav",
hotword="达摩院 魔搭",
)当前解析器会对字符串执行空白切分。热词较多,或者热词本身包含空格时,建议使用 UTF-8 文本文件,每行一个热词: 然后传文件路径: result = model.generate(input="audio.wav", hotword="/path/to/hotwords.txt")注意不要混淆两套接口:
新 CLI 可使用逗号分隔: |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
LauraGPT
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
以
paraformer-zh(SeACo/Contextual Paraformer)的 Python 接口为例,多个热词放在单数参数hotword中,并用空白分隔:当前解析器会对字符串执行空白切分。热词较多,或者热词本身包含空格时,建议使用 UTF-8 文本文件,每行一个热词:
然后传文件路径:
注意不要混淆两套接口:
hotword="达摩院 魔搭"hotwords=["达摩院", "魔搭"]新 CLI 可使用逗号分隔:
funasr audio.wav --model paraformer --hotwords "达摩院,魔搭"。Paraformer 的参数路由已由 #3237 合并到主干。对应实现:SeACo Paraformer hotword parser。