- Qwen3-ASR: support spk_model with forced_aligner for speaker diarization
- Qwen3-ASR: fix list input handling (numpy/tensor to tuple format)
- Qwen3-ASR: output timestamp as [start_ms, end_ms] for pipeline compatibility
- Qwen3-ASR: graceful fallback when forced_aligner not configured
- Remove punc_model from Fun-ASR-Nano/SenseVoice/Qwen3-ASR SPK demos and tests
(these models output punctuation natively)
- Fix test scripts to handle both text/sentence keys in sentence_info
- auto_model: set return_time_stamps=True when spk_model present
Integrates ERes2NetV2 from 3D-Speaker into FunASR as a speaker
verification/diarization model. Can be used standalone or as spk_model
combined with VAD + ASR for speaker-attributed transcription.
Usage (standalone speaker embedding):
model = AutoModel(model="iic/speech_eres2netv2_sv_zh-cn_16k-common")
res = model.generate(input="audio.wav")
embedding = res[0]["spk_embedding"] # shape: [1, 192]
Usage (with ASR + speaker diarization):
model = AutoModel(
model="paraformer-zh",
vad_model="fsmn-vad",
spk_model="iic/speech_eres2netv2_sv_zh-cn_16k-common",
)
res = model.generate(input="audio.wav")
Tested end-to-end: ModelScope download + embedding extraction verified.
New files:
- funasr/models/eres2net/eres2netv2.py (network architecture)
- funasr/models/eres2net/model.py (FunASR wrapper with inference)
- tests_models/test_eres2netv2.py
- examples/industrial_data_pretraining/eres2netv2_sv/demo.py
- examples/industrial_data_pretraining/eres2netv2_sv/demo_sv.py
Add GLMASR wrapper class integrating GLM-ASR-Nano-2512 (1.5B) into
FunASR. Uses HuggingFace transformers AutoModel + AutoProcessor with
trust_remote_code. Supports 17 languages with dialect and low-volume
speech optimization.
Usage:
from funasr import AutoModel
model = AutoModel(model="zai-org/GLM-ASR-Nano-2512", hub="hf", device="cuda:0")
res = model.generate(input="audio.wav")
# ModelScope (Chinese users)
model = AutoModel(model="ZhipuAI/GLM-ASR-Nano-2512", hub="ms", device="cuda:0")
Tested end-to-end on CPU with Chinese and English audio.
New files:
- funasr/models/glm_asr/model.py
- funasr/models/glm_asr/__init__.py
- tests_models/test_glm_asr.py
- examples/industrial_data_pretraining/glm_asr/demo.py
- examples/industrial_data_pretraining/glm_asr/demo_ms.py
Note: requires transformers>=5.0.0 (pip install git+https://github.com/huggingface/transformers)
Usage now follows FunASR convention:
from funasr import AutoModel
model = AutoModel(model="Qwen/Qwen3-ASR-1.7B", hub="hf", device="cuda:0")
res = model.generate(input="audio.wav", language="Chinese")
Changes:
- Register model class under hub paths ("Qwen/Qwen3-ASR-1.7B",
"Qwen/Qwen3-ASR-0.6B") so AutoModel can resolve them after
download_from_hf finds no configuration.json
- model_path defaults to kwargs["model"] for hub path compatibility
- Update test to use standard AutoModel(model=..., hub="hf") pattern
Tested end-to-end: AutoModel downloads from HuggingFace and runs
inference correctly.
Add Qwen3ASR wrapper class that integrates the qwen-asr package into
FunASR's registry system, following standard AutoModel usage pattern:
from funasr import AutoModel
model = AutoModel(
model="Qwen3ASR",
model_conf={"model_path": "Qwen/Qwen3-ASR-1.7B", "dtype": "bf16"},
device="cuda:0",
)
res = model.generate(input="audio.wav", language="Chinese")
Supports:
- Multi-language ASR (52 languages)
- Auto language detection
- Forced language mode
- Timestamp output via forced aligner
- HuggingFace/ModelScope model loading
Tested end-to-end with Chinese and English audio on CPU (0.6B model).
New files:
- funasr/models/qwen3_asr/model.py
- funasr/models/qwen3_asr/__init__.py
- tests_models/test_qwen3_asr.py
Add Qwen3ASR wrapper class that integrates the qwen-asr package into
FunASR's registry system. Supports:
- Multi-language ASR (52 languages)
- Auto language detection
- Forced language mode
- Timestamp output via forced aligner
- Both HuggingFace and ModelScope model loading
New files:
- funasr/models/qwen3_asr/model.py
- funasr/models/qwen3_asr/__init__.py
- tests_models/test_qwen3_asr.py
- Fix SinusoidalPositionEncoder and StreamSinusoidalPositionEncoder in transformer/embedding.py
- Fix SinusoidalPositionEncoder in sense_voice/model.py
- Missing super().__init__() caused state_dict() crash with newer PyTorch versions
- Add test_fsmn_vad_streaming.py: chunk-by-chunk VAD test with consistency check
- Skip deepcopy for large immutable objects (token_list, tokenizer, frontend, etc.)
- Only deepcopy mutable dict/list values that may be modified during inference
- Reduces per-call overhead from 352ms to 0.1ms (3459x improvement)
- Rewrite streaming test to use proper chunk-by-chunk input
- Verified: 5 consecutive streaming sessions produce identical output
- Convert dict-format timestamps to list-format for downstream compatibility
- Fix spk_embedding to concatenate all chunk embeddings from sv_chunk
- Handle timestamps/timestamp key difference in vad_segment mode
- Auto fallback to vad_segment mode when punc_model is missing
- Add demo_spk.py example and test script
- Update README/README_zh with news and usage demo