Skip to content
Discussion options

You must be logged in to vote

Update for current FunASR (main at 1d8080a, verified on 2026-07-15).

The original modelscope.pipeline examples above describe the ModelScope pipeline API. For current native FunASR code, the shortest path is AutoModel.

1. Offline punctuation restoration

Use ct-punc for the current Chinese/English model:

from funasr import AutoModel

model = AutoModel(
    model="ct-punc",
    device="cpu",  # use "cuda" when available
    disable_update=True,
)

text = "那今天的天气呢也是蛮好的啊你觉得怎么样呢我觉得还不错"
result = model.generate(input=text)[0]
print(result["text"])

Output from the environment listed below:

那今天的天气呢也是蛮好的啊,你觉得怎么样呢?我觉得还不错。

result also contains key and punc_array. The current aliases are:

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by LauraGPT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants