{"slug": "funasr-using-hugging-face-hub-with-paraformer-zh-errors", "title": "Funasr using hugging face hub with paraformer-zh errors", "summary": "A bug in FunASR's paraformer-zh model on Hugging Face Hub causes missing timestamps and a KeyError: 'text' error, according to a developer's investigation. The issue can be worked around by setting pred_timestamp=True, which restored timestamps in controlled tests on CPU and T4. The problem appears to be two separate timestamp-related bugs in FunASR rather than a fundamental incompatibility with the intended pipeline.", "body_md": "For now, after looking into this, it seems quite likely that the issue is related to **a bug on the FunASR side**:\n\nI do **not** think your intended setup is fundamentally unsupported.\n\nThe current [ funasr/paraformer-zh Hugging Face model card](https://huggingface.co/funasr/paraformer-zh) explicitly shows the full pipeline with VAD, punctuation, and speaker diarization, and says that the output includes timestamps and speaker labels. So I would not abandon the HF route or the diarization goal just because of this error.\n\nWhat I found is closer to **two separate timestamp-related problems in FunASR**, plus a secondary output-schema issue.\n\nThe cheapest first test is simply:\n\n```\nresult = model.generate(\n    input=audio,\n    pred_timestamp=True,\n)\n```\n\nIn controlled reproductions with the HF Paraformer model, this was enough to change the ASR result from **no timestamp** to **timestamp present**, on both CPU and T4.\n\nSo, for practical debugging, I would start there before changing the model stack.\n\nA rough decision flow is:\n\n```\nadd pred_timestamp=True\n        |\n        +-- still no timestamp\n        |       -> check which model/config actually resolved\n        |\n        +-- timestamp appears\n                |\n                +-- timestamps stay within the audio duration\n                |       -> continue checking the speaker pipeline\n                |\n                +-- timestamps extend well beyond the audio duration\n                        -> likely the separate GPU dynamic-batching issue below\n```\n\nThere is also a public reproduction notebook here:\n\n1. Why the missing timestamp looks like an internal FunASR integration issueSo my default route would be:\n\n`pred_timestamp=True`\n\n`KeyError: 'text'`\n\nafter missing timestamps as likely secondary, and inspect the actual `sentence_info`\n\nkeys rather than assuming the documented schema was reached.So, at least from these reproductions, this looks much more like **a couple of FunASR integration/length-handling bugs that can be separated and worked around** than a reason to give up on what you are trying to build.", "url": "https://wpnews.pro/news/funasr-using-hugging-face-hub-with-paraformer-zh-errors", "canonical_source": "https://discuss.huggingface.co/t/funasr-using-hugging-face-hub-with-paraformer-zh-errors/179223#post_2", "published_at": "2026-08-25 03:21:26+00:00", "updated_at": "2026-08-25 03:43:49.176457+00:00", "lang": "en", "topics": ["artificial-intelligence", "machine-learning", "natural-language-processing", "ai-tools"], "entities": ["FunASR", "paraformer-zh", "Hugging Face Hub"], "alternates": {"html": "https://wpnews.pro/news/funasr-using-hugging-face-hub-with-paraformer-zh-errors", "markdown": "https://wpnews.pro/news/funasr-using-hugging-face-hub-with-paraformer-zh-errors.md", "text": "https://wpnews.pro/news/funasr-using-hugging-face-hub-with-paraformer-zh-errors.txt", "jsonld": "https://wpnews.pro/news/funasr-using-hugging-face-hub-with-paraformer-zh-errors.jsonld"}}