update usage for language, itn and hotwords

This commit is contained in:
pengzhendong
2025-12-16 14:19:08 +08:00
parent 7f77591531
commit a552da13e7
3 changed files with 38 additions and 4 deletions

View File

@ -11,7 +11,14 @@ def main():
)
wav_path = f"{model.model_path}/example/zh.mp3"
res = model.generate(input=[wav_path], cache={}, batch_size=1)
res = model.generate(
input=[wav_path],
cache={},
batch_size=1,
hotwords=["开放时间"],
language="zh", # auto, zh, en, ja
itn=True, # or False
)
text = res[0]["text"]
print(text)