Streaming variant of Paraformer that processes audio in chunks, delivering results in real-time as audio arrives.
1from funasr import AutoModel
2
3model = AutoModel(
4 model="funasr/paraformer-zh-streaming",
5 hub="hf",
6 device="cuda",
7)
8
9# Streaming inference with chunk processing
10import sounddevice as sd
11import numpy as np
12
13chunk_size = [0, 10, 5] # [lookback, chunk, lookahead] in 60ms frames
14result = model.generate(
15 input="audio.wav",
16 chunk_size=chunk_size,
17 encoder_chunk_look_back=4,
18 decoder_chunk_look_back=1,
19)
20print(result[0]["text"])
This repository publishes the model weights and accompanying files under the
Apache License 2.0, unless an individual file carries a different notice. At the immutable
apache-2.0-20260804 tag, this statement covers
model.pt,
config.yaml,
configuration.json,
am.mvn,
seg_dict,
tokens.json, the example audio, the architecture figure, and this model card.
1model = AutoModel(
2 model="funasr/paraformer-zh-streaming",
3 model_revision="apache-2.0-20260804",
4 hub="hf",
5 device="cuda",
6)
Record the resolved commit SHA and artifact checksums in deployment metadata. The historical revision 45df2405b92dfeb21e01ea4465954677005ae370 did not contain the license file referenced by its model card and remains unchanged; new integrations should use the immutable tag above. This clarification applies to the tagged snapshot and does not rewrite an older revision retroactively.