li-lizhe
ae5c4ccdec
Remove hard torchaudio dependency for inference; add kaldi-native-fbank fbank backend ( #3526 )
...
* Remove hard torchaudio dependency for inference; add kaldi-native-fbank fbank backend
Make torchaudio an optional dependency for the inference path so FunASR
can run on Ascend NPU (aarch64) servers, where no matching torchaudio
wheel exists (Huawei's Ascend torch is version-decoupled from the PyTorch
upstream release line).
- Add funasr/utils/fbank.py: an fbank shim that delegates to
torchaudio.compliance.kaldi when torchaudio is installed, otherwise
falls back to kaldi-native-fbank (a torch-free C++ library with aarch64
wheels). Options and frame-shift API are mapped to torchaudio semantics
so outputs are equivalent.
- Switch funasr/frontends/wav_frontend.py, funasr/utils/speaker_utils.py
and funasr/models/campplus/utils.py to the shim.
- Make the torchaudio import optional in funasr/utils/load_utils.py
(resampler falls back to librosa).
No device-specific branching is introduced — a pure backend fallback that
also benefits CPU-only and other accelerator platforms.
Verified end-to-end on Ascend 910B (npu:0) with torchaudio absent:
paraformer-large loads and infers correctly, RTF ~0.016 (~60x realtime).
* Make torchaudio import optional in paraformer_v2, fun_asr_nano and dataset preprocessors
Follow-up to the inference-path change: make the remaining top-level
torchaudio imports optional so these modules import cleanly when
torchaudio is not installed (e.g. on Ascend NPU servers).
- funasr/models/paraformer_v2_community/model.py
- funasr/models/fun_asr_nano/tools/utils.py
- funasr/datasets/audio_datasets/preprocessor.py
- funasr/datasets/llm_datasets/preprocessor.py
Functions that still require torchaudio (forced_align, Resample) degrade
to a clear error only when called, rather than a hard import failure.
* Address review: declare knf extra, harden fbank fallback and torchaudio guards
Respond to maintainer review feedback.
- Declare kaldi-native-fbank as an optional 'knf' extra in setup.py; the
fbank module now raises an actionable ImportError only when fbank() is
actually called with neither torchaudio nor kaldi-native-fbank installed
(previously it failed at import time with a bare ModuleNotFoundError).
- Harden the fbank fallback contract: handle the channel argument explicitly
and reject torchaudio-only options (subtract_mean, min_duration, VTLN
warping, non-default blackman_coeff) with NotImplementedError instead of
silently dropping them via **kwargs.
- Add a shared guard funasr/utils/torchaudio_compat.py and use it for
resampling, forced alignment and speed perturbation so a missing torchaudio
fails loudly instead of returning a silently wrong result (empty alignment).
- Add regression tests (tests/test_torchaudio_optional.py) that import the
affected modules with torchaudio absent.
2026-08-27 00:23:11 +08:00
wuhongsheng
22920822a2
feat(vad): add Silero VAD adapter
2026-08-14 11:13:32 +08:00
zhifu gao
1359151794
fix: include runtime package data ( #3445 )
...
Include SenseVoice English normalization data and RWKV-BAT CUDA kernel sources in PyPI artifacts, with a real-wheel release contract.\n\nSigned-off-by: zhifu gao <[email protected] >
2026-07-30 05:32:44 +08:00
zhifu gao and LauraGPT
459948691d
Update PyPI summary positioning ( #3375 )
...
Co-authored-by: LauraGPT <[email protected] >
2026-07-23 07:21:34 +08:00
zhifu gao
d41ca43b33
Release FunASR 1.3.16 ( #3246 )
...
* release v1.3.16
* Package realtime WebSocket server
2026-07-18 02:00:57 +08:00
zhifu gao
cd15a47cf5
Migrate editdistance metrics to rapidfuzz with empty-reference guard
...
Replace archived editdistance with rapidfuzz and return None when CER/WER references have zero total length.
Supersedes #3105 .
2026-07-07 15:00:51 +08:00
游雁
b8351fd361
feat: add agent-friendly CLI (funasr audio.wav --output-format json)
...
- New funasr CLI with argparse: positional audio, --model, --language, --output-format (text/json/srt/tsv), --spk, --timestamps
- Old Hydra CLI preserved as funasr-hydra
- Updated README.md and README_zh.md with CLI examples
2026-06-10 08:51:15 +00:00
游雁
36d653cea5
fix: remove torchaudio from install_requires
...
torch and torchaudio should be installed by users matching their CUDA version,
not forced via pip dependency (avoids version conflicts).
2026-05-27 20:53:06 +08:00
游雁
613418885c
fix: update install_requires — add torchaudio, transformers, tiktoken, huggingface_hub, safetensors
...
Verified in clean venv: all models (Paraformer, Fun-ASR-Nano, VAD, Punc, SPK) load and run correctly.
2026-05-27 20:39:25 +08:00
游雁
97ec3ae2ee
feat: add funasr-server CLI command for one-line API deployment
...
pip install funasr && funasr-server --device cuda
Starts OpenAI-compatible /v1/audio/transcriptions endpoint.
Verified: import, startup, transcription all work end-to-end.
2026-05-24 02:17:41 +08:00
游雁
9bc6de02a6
chore: improve PyPI classifiers (Python 3.8-3.12, AI/Speech topics, cross-platform)
2026-05-24 01:26:48 +08:00
游雁
55a37e22b3
chore: update PyPI metadata - URL, description, keywords, project_urls
2026-05-24 00:31:55 +08:00
彭震东
7b58bdccfe
Add console script entry for funasr-train-ds
2025-12-29 14:36:29 +08:00
游雁
6224003492
modelscope
2024-11-01 13:55:14 +08:00
北念
4fb7e918fe
add sensevoice scp2jsonl
2024-07-23 14:26:20 +08:00
+9
8c87a9d8a7
Dev gzf deepspeed ( #1858 )
...
* total_time/accum_grad
* fp16
* update with main (#1817 )
* add cmakelist
* add paraformer-torch
* add debug for funasr-onnx-offline
* fix redefinition of jieba StdExtension.hpp
* add loading torch models
* update funasr-onnx-offline
* add SwitchArg for wss-server
* add SwitchArg for funasr-onnx-offline
* update cmakelist
* update funasr-onnx-offline-rtf
* add define condition
* add gpu define for offlne-stream
* update com define
* update offline-stream
* update cmakelist
* update func CompileHotwordEmbedding
* add timestamp for paraformer-torch
* add C10_USE_GLOG for paraformer-torch
* update paraformer-torch
* fix func FunASRWfstDecoderInit
* update model.h
* fix func FunASRWfstDecoderInit
* fix tpass_stream
* update paraformer-torch
* add bladedisc for funasr-onnx-offline
* update comdefine
* update funasr-wss-server
* add log for torch
* fix GetValue BLADEDISC
* fix log
* update cmakelist
* update warmup to 10
* update funasrruntime
* add batch_size for wss-server
* add batch for bins
* add batch for offline-stream
* add batch for paraformer
* add batch for offline-stream
* fix func SetBatchSize
* add SetBatchSize for model
* add SetBatchSize for model
* fix func Forward
* fix padding
* update funasrruntime
* add dec reset for batch
* set batch default value
* add argv for CutSplit
* sort frame_queue
* sorted msgs
* fix FunOfflineInfer
* add dynamic batch for fetch
* fix FetchDynamic
* update run_server.sh
* update run_server.sh
* cpp http post server support (#1739 )
* add cpp http server
* add some comment
* remove some comments
* del debug infos
* restore run_server.sh
* adapt to new model struct
* 修复了onnxruntime在macos下编译失败的错误 (#1748 )
* Add files via upload
增加macos的编译支持
* Add files via upload
增加macos支持
* Add files via upload
target_link_directories(funasr PUBLIC ${ONNXRUNTIME_DIR}/lib)
target_link_directories(funasr PUBLIC ${FFMPEG_DIR}/lib)
添加 if(APPLE) 限制
---------
Co-authored-by: Yabin Li <[email protected] >
* Delete docs/images/wechat.png
* Add files via upload
* fixed the issues about seaco-onnx timestamp
* fix bug (#1764 )
当语音识别结果包含 `http` 时,标点符号预测会把它会被当成 url
* fix empty asr result (#1765 )
解码结果为空的语音片段,text 用空字符串
* update export
* update export
* docs
* docs
* update export name
* docs
* update
* docs
* docs
* keep empty speech result (#1772 )
* docs
* docs
* update wechat QRcode
* Add python funasr api support for websocket srv (#1777 )
* add python funasr_api supoort
* change little to README.md
* add core tools stream
* modified a little
* fix bug for timeout
* support for buffer decode
* add ffmpeg decode for buffer
* libtorch demo
* update libtorch infer
* update utils
* update demo
* update demo
* update libtorch inference
* update model class
* update seaco paraformer
* bug fix
* bug fix
* auto frontend
* auto frontend
* auto frontend
* auto frontend
* auto frontend
* auto frontend
* auto frontend
* auto frontend
* Dev gzf exp (#1785 )
* resume from step
* batch
* batch
* batch
* batch
* batch
* batch
* batch
* batch
* batch
* batch
* batch
* batch
* batch
* batch
* batch
* train_loss_avg train_acc_avg
* train_loss_avg train_acc_avg
* train_loss_avg train_acc_avg
* log step
* wav is not exist
* wav is not exist
* decoding
* decoding
* decoding
* wechat
* decoding key
* decoding key
* decoding key
* decoding key
* decoding key
* decoding key
* dynamic batch
* start_data_split_i=0
* total_time/accum_grad
* total_time/accum_grad
* total_time/accum_grad
* update avg slice
* update avg slice
* sensevoice sanm
* sensevoice sanm
* sensevoice sanm
---------
Co-authored-by: 北念 <[email protected] >
* auto frontend
* update paraformer timestamp
* [Optimization] support bladedisc fp16 optimization (#1790 )
* add cif_v1 and cif_export
* Update SDK_advanced_guide_offline_zh.md
* add cif_wo_hidden_v1
* [fix] fix empty asr result (#1794 )
* english timestamp for valilla paraformer
* wechat
* [fix] better solution for handling empty result (#1796 )
* update scripts
* modify the qformer adaptor (#1804 )
Co-authored-by: nichongjia-2007 <[email protected] >
* add ctc inference code (#1806 )
Co-authored-by: haoneng.lhn <[email protected] >
* Update auto_model.py
修复空字串进入speaker model时报raw_text变量不存在的bug
* Update auto_model.py
修复识别出空串后spk_model内变量未定义问题
* update model name
* fix paramter 'quantize' unused issue (#1813 )
Co-authored-by: ZihanLiao <[email protected] >
* wechat
* Update cif_predictor.py (#1811 )
* Update cif_predictor.py
* modify cif_v1_export
under extreme cases, max_label_len calculated by batch_len misaligns with token_num
* Update cif_predictor.py
torch.cumsum precision degradation, using float64 instead
* update code
---------
Co-authored-by: 雾聪 <[email protected] >
Co-authored-by: zhaomingwork <[email protected] >
Co-authored-by: szsteven008 <[email protected] >
Co-authored-by: Ephemeroptera <[email protected] >
Co-authored-by: 彭震东 <[email protected] >
Co-authored-by: Shi Xian <[email protected] >
Co-authored-by: 维石 <[email protected] >
Co-authored-by: 北念 <[email protected] >
Co-authored-by: xiaowan0322 <[email protected] >
Co-authored-by: zhuangzhong <[email protected] >
Co-authored-by: Xingchen Song(宋星辰) <[email protected] >
Co-authored-by: nichongjia-2007 <[email protected] >
Co-authored-by: haoneng.lhn <[email protected] >
Co-authored-by: liugz18 <[email protected] >
Co-authored-by: Marlowe <[email protected] >
Co-authored-by: ZihanLiao <[email protected] >
Co-authored-by: zhong zhuang <[email protected] >
* sensevoice
* sensevoice
* sensevoice
* sensevoice
* sensevoice
* sensevoice
* sensevoice
* sensevoice
* sensevoice
* sensevoice
* sensevoice
* sensevoice
* sensevoice
* v1.0.28 (#1836 )
* sensevoice
* sensevoice
* sensevoice
* sensevoice
* sensevoice
* update (#1841 )
* v1.0.28
* version checker
* version checker
* rollback cif_v1 for training bug
* fixbug
* fixbug for cif
* fixbug
---------
Co-authored-by: 维石 <[email protected] >
* update (#1842 )
* v1.0.28
* version checker
* version checker
* rollback cif_v1 for training bug
* fixbug
* fixbug for cif
* fixbug
---------
Co-authored-by: 维石 <[email protected] >
* inference
* inference
* inference
* requests
* finetune
* finetune
* finetune
* finetune
* finetune
* add inference prepare func (#1848 )
* docs
* docs
* docs
* docs
* docs
---------
Co-authored-by: 雾聪 <[email protected] >
Co-authored-by: zhaomingwork <[email protected] >
Co-authored-by: szsteven008 <[email protected] >
Co-authored-by: Ephemeroptera <[email protected] >
Co-authored-by: 彭震东 <[email protected] >
Co-authored-by: Shi Xian <[email protected] >
Co-authored-by: 维石 <[email protected] >
Co-authored-by: 北念 <[email protected] >
Co-authored-by: xiaowan0322 <[email protected] >
Co-authored-by: zhuangzhong <[email protected] >
Co-authored-by: Xingchen Song(宋星辰) <[email protected] >
Co-authored-by: nichongjia-2007 <[email protected] >
Co-authored-by: haoneng.lhn <[email protected] >
Co-authored-by: liugz18 <[email protected] >
Co-authored-by: Marlowe <[email protected] >
Co-authored-by: ZihanLiao <[email protected] >
Co-authored-by: zhong zhuang <[email protected] >
Co-authored-by: PerfeZ <[email protected] >
2024-06-28 17:28:09 +08:00
游雁
f577bb5e72
docs
2024-05-30 14:55:32 +08:00
zhifu gao and 维石
861147c730
Dev gzf exp ( #1654 )
...
* sensevoice finetune
* sensevoice finetune
* sensevoice finetune
* sensevoice finetune
* sensevoice finetune
* sensevoice finetune
* sensevoice finetune
* sensevoice finetune
* sensevoice finetune
* sensevoice finetune
* bugfix
* update with main (#1631 )
* update seaco finetune
* v1.0.24
---------
Co-authored-by: 维石 <[email protected] >
* sensevoice
* sensevoice
* sensevoice
* update with main (#1638 )
* update seaco finetune
* v1.0.24
* update rwkv template
---------
Co-authored-by: 维石 <[email protected] >
* sensevoice
* sensevoice
* sensevoice
* sensevoice
* sensevoice
* sensevoice
* sensevoice
* sensevoice
* sensevoice
* sensevoice
* sensevoice
* sensevoice
* sensevoice
* sensevoice
* sensevoice
* sense voice
* sense voice
* sense voice
* sense voice
* sense voice
* sense voice
* sense voice
* sense voice
* sense voice
* sense voice
* sense voice
* sense voice
* sense voice
* sense voice
* sense voice
* sense voice
* sense voice
* sense voice
* sense voice
* sense voice
* whisper
* whisper
* update style
* update style
---------
Co-authored-by: 维石 <[email protected] >
2024-04-24 16:03:38 +08:00
zhifu gao
702b9b540c
sense voice ( #1568 )
...
* train
* train
* train
* train
* train
* train
* train
* train
* train
* train
* train
* train
* train
* train
* train
* train
* train
* train
* train
* train
* whisper_lib for sense voice
* aishell recipe
* sense voice
2024-03-30 11:54:51 +08:00
游雁
9c0735b7df
update
2024-03-22 19:09:49 +08:00
游雁
24aea85b5b
trainer
2024-03-21 14:01:45 +08:00
zhifu gao and Shi Xian
675b4605e8
Dev gzf llm ( #1506 )
...
* update
* update
* update
* update onnx
* update with main (#1492 )
* contextual&seaco ONNX export (#1481 )
* contextual&seaco ONNX export
* update ContextualEmbedderExport2
* update ContextualEmbedderExport2
* update code
* onnx (#1482 )
* qwenaudio qwenaudiochat
* qwenaudio qwenaudiochat
* whisper
* whisper
* llm
* llm
* llm
* llm
* llm
* llm
* llm
* llm
* export onnx
* export onnx
* export onnx
* dingding
* dingding
* llm
* doc
* onnx
* onnx
* onnx
* onnx
* onnx
* onnx
* v1.0.15
* qwenaudio
* qwenaudio
* issue doc
* update
* update
* bugfix
* onnx
* update export calling
* update codes
* remove useless code
* update code
---------
Co-authored-by: zhifu gao <[email protected] >
* acknowledge
---------
Co-authored-by: Shi Xian <[email protected] >
* update onnx
* update onnx
* train update
* train update
* train update
* train update
* punc update
---------
Co-authored-by: Shi Xian <[email protected] >
2024-03-15 21:14:08 +08:00
zhifu gao
9d48230c4f
export onnx ( #1457 )
...
* qwenaudio qwenaudiochat
* qwenaudio qwenaudiochat
* whisper
* whisper
* llm
* llm
* llm
* llm
* llm
* llm
* llm
* llm
* export onnx
* export onnx
2024-03-11 10:48:50 +08:00
zhifu gao
753d579531
Dev gzf ( #1428 )
...
* bugfix v1.0.13
* qwenaudio qwenaudiochat
* v1.0.14
2024-03-05 17:58:35 +08:00
游雁
fa6f60fa76
update
2024-02-23 14:01:44 +08:00
游雁
6a9c21a408
aishell example
2024-02-19 17:05:49 +08:00
shixian.shi
ae4dceecf0
bug fix for punc and umap
2024-01-23 11:34:03 +08:00
游雁
8a28435485
fix setup
2024-01-17 10:20:52 +08:00
游雁
2ed3f46f40
funasr1.0 finetune
2024-01-16 18:42:37 +08:00
游雁
247c763286
funasr1.0 fsmn-vad streaming
2024-01-12 09:52:25 +08:00
游雁
c8bae0ec85
funasr2
2023-12-21 13:29:37 +08:00
游雁
7012ca2efc
funasr2 paraformer biciparaformer contextuaparaformer
2023-12-13 20:08:55 +08:00
81acb17544
update with main ( #1152 )
...
* v0.8.7
* update cmd version
* set openfst HAVE_BIN/HAVE_SCRIPT off for win32
* 修复为支持新版本的热词 (#1137 )
* update CMakeLists.txt
* Revert "update CMakeLists.txt"
This reverts commit 54bcd1f674 .
* rm log.h for wins-websocket
* fix bug of websocket lock blocking
* update funasr-wss-server
* update model-revision by model name
* update funasr-wss-server-2pass
* 增加分角色语音识别对ERes2Net模型的支持。
* Update README.md (#1140 )
minor fix
* automatically configure parameters such as decoder-thread-num
* update docs
* update docs
* update docs
* 分角色语音识别支持更多的模型
* update spk inference
* remove never use code (#1151 )
---------
Co-authored-by: 雾聪 <[email protected] >
Co-authored-by: 夜雨飘零 <[email protected] >
Co-authored-by: Ikko Eltociear Ashimine <[email protected] >
Co-authored-by: Shi Xian <[email protected] >
Co-authored-by: shixian.shi <[email protected] >
2023-12-06 19:54:37 +08:00
游雁
b5d3df75cf
setup jamo
2023-11-24 00:54:44 +08:00
游雁
c644ac8f58
funasr v2 setup
2023-11-21 14:09:01 +08:00
游雁
244c033fba
python cli
2023-11-17 15:19:53 +08:00
北念
d9c808a8df
update setup.py
2023-10-12 17:13:20 +08:00
北念
858063b55a
add whisper model inference pipeline
2023-10-12 14:59:06 +08:00
shixian.shi
7ffdd6c7d3
update setup.py
2023-10-12 11:41:04 +08:00
游雁
74aa12ee4b
docs
2023-09-18 10:43:27 +08:00
游雁
cc2ad14956
setup
2023-09-12 17:06:33 +08:00
游雁
51fdffc1a0
h5py
2023-08-11 17:39:54 +08:00
hnluo
4fd7f02b26
Merge pull request #835 from alibaba-damo-academy/dev_lhn
...
update setup.py for mossformer
2023-08-11 10:32:23 +08:00
haoneng.lhn
c3ef815c08
update setup.py for mossformer
2023-08-11 10:26:32 +08:00
yhliang
cf28451f55
Dev lyh ( #834 )
...
* add modular saasr
* update readme
* Delete train_paraformer.yaml
* update setup.py
* update setup.py
* update setup.py
* fix setup.py
2023-08-11 09:24:08 +08:00
yhliang
08ee9e6aac
Add modular SA-ASR recipe for M2MeT2.0 ( #831 )
...
* add modular saasr
* update readme
* Delete train_paraformer.yaml
* update setup.py
* update setup.py
* update setup.py
2023-08-10 20:46:21 +08:00
hnluo
4a2cb0c985
Update setup.py
2023-07-21 10:09:40 +08:00
mengzhe.cmz
b6b63936c7
add punc large model modelscope runtime; fix train bug
2023-07-18 17:32:38 +08:00
游雁
4cab391b0e
docs
2023-06-30 10:11:35 +08:00
jmwang66
98abc0e5ac
update setup ( #686 )
...
* update
* update setup
* update setup
* update setup
* update setup
* update setup
* update setup
* update
* update
* update setup
2023-06-29 16:30:39 +08:00