CT-Punc (Controllable Time-delay Punctuation) restores punctuation marks for unpunctuated text, commonly used as a post-processing step after speech recognition.
1from funasr import AutoModel
2
3# Standalone punctuation restoration
4model = AutoModel(model="funasr/ct-punc", hub="hf", device="cuda")
5result = model.generate(input="我们今天讨论三个议题首先是产品发布其次是市场策略最后是团队建设")
6print(result[0]["text"])
7# → 我们今天讨论三个议题,首先是产品发布,其次是市场策略,最后是团队建设。
1from funasr import AutoModel
2
3model = AutoModel(
4 model="funasr/paraformer-zh",
5 hub="hf",
6 vad_model="funasr/fsmn-vad",
7 punc_model="funasr/ct-punc",
8 device="cuda",
9)
10result = model.generate(input="audio.wav")
11# Output text includes punctuation automatically