Commit Graph
423 Commits
Author SHA1 Message Date
zhifu gao aefddc1088 fix: disable timestamps when CTC weights are missing (#3211)
Fail closed for native, remote-code, and vLLM Fun-ASR-Nano timestamp inference when checkpoint CTC weights are missing, partial, shape-mismatched, DDP-prefixed, or wrapped.

Fixes #3208.
2026-07-13 23:57:17 +08:00
zhifu gao 505455eb64 fix: accept float32 dtype in realtime websocket server (#3204)
Normalize the float32 CLI alias to fp32 before constructing AutoModelVLLM, and cover the resolved value with a parser regression test.\n\nFixes #3202.
2026-07-13 15:35:59 +08:00
游雁 8cfc4f7a98 docs: add Glama maintainer metadata 2026-07-10 04:34:41 +00:00
zhifu gao bb84bd8ab3 Promote live mcp.so FunASR MCP listing (#3197)
Link the live mcp.so listing from the MCP README and archive the directory submission as an external win.
2026-07-08 16:11:14 +08:00
zhifu gao 98a47e5211 Prepare MCP server for Registry OCI verification (#3147)
Add the official MCP Registry OCI ownership label and document the matching registry name for future publication.
2026-07-08 08:59:06 +08:00
zhifu gao 58047e7462 Fix Glama MCP manifest schema (#3146)
Point the FunASR MCP server manifest at the current Glama schema and declare the maintainer for ingestion.
2026-07-08 08:54:07 +08:00
zhifu gao 5e76cd1d4b Fix realtime benchmark final lag metric (#3124)
Exclude final websocket messages from realtime response lag metrics and document the non-final preview lag semantics.

Refs #3038
2026-07-08 02:01:02 +08:00
zhifu gao 92aca6b259 docs: update FunASR repository links
Update user-facing documentation links from alibaba-damo-academy/FunASR to modelscope/FunASR.
2026-07-07 18:11:41 +08:00
zhifu gao f87e86abde Fix Fun-ASR-Nano NPU autocast device selection (#3113)
Preserve supported accelerator device types, including npu, when choosing Fun-ASR-Nano autocast device type. This prevents npu devices from falling back to CPU autocast before real torch_npu execution can be validated.
2026-07-07 17:45:00 +08:00
zhifu gao ac84c4bf67 feat: expose realtime websocket keepalive options (#3121)
Expose ping interval, ping timeout, close timeout, and max message size options for long-lived realtime WebSocket deployments.
2026-07-07 17:21:32 +08:00
zhifu gao d8df61a17a docs: add realtime websocket benchmark (#3119)
Add a reusable benchmark client and documentation for measuring serve_realtime_ws.py under realtime WebSocket workloads.
2026-07-07 17:11:31 +08:00
zhifu gao cb7adc0184 Fix Fun-ASR-Nano stereo audio preprocessing (#3102)
Fixes #3102.
2026-07-07 14:43:47 +08:00
zhifu gao bc1087c39e Preserve speaker in OpenAI transcription segments (#3086)
* Preserve speaker in OpenAI transcription segments

* Tidy OpenAI speaker response test stub
2026-06-30 17:54:28 +08:00
zhifu gao 9715e22f24 Document Glama MCP submission checklist (#3084) 2026-06-30 17:25:45 +08:00
zhifu gao 0430ec2c2f Add Glama metadata for MCP server (#3076) 2026-06-30 15:20:45 +08:00
zhifu gao 40539a5bfe Add Docker entrypoint for MCP server listing (#3075) 2026-06-30 15:13:11 +08:00
zhifu gao 150e69dee2 Fix subtitle SRT timestamp generation
Request subtitle timestamps and avoid invalid zero-length SRT fallback cues.
2026-06-30 11:00:14 +08:00
zhifu gao e483164677 Improve realtime websocket multi-client defaults
Disable streaming SPK by default, keep bounded partial previews testable, and document multi-client tuning for the realtime WebSocket service.
2026-06-29 22:53:12 +08:00
zhifu gao 9b4f700426 Add Qwen3-ASR dependency guard
Add a runtime dependency guard for qwen-asr/transformers mismatches and update Qwen3-ASR install docs.
2026-06-29 22:52:44 +08:00
qiulang 8f8ce5f48b feat: add Qwen3-ASR streaming WebSocket server with notes (#3035)
Add a Qwen3-ASR streaming WebSocket server example, bilingual notes about VAD/STOP behavior, vLLM version constraints, model download guidance, and smoke tests for the example docs and exception logging.
2026-06-28 20:29:47 +08:00
zhifu gaoandLauraGPT f17ed679b0 feat(fun_asr_nano streaming): bound the partial re-decode window (--partial-window-sec) (#3032)
The realtime WS server's interim (partial) path re-encodes the entire growing
speech segment from its start on every chunk, so a length-L segment costs O(L^2)
total re-encoding. Under high concurrency this saturates the GPU and long-segment
requests time out (e.g. a 17-29s utterance failing at 48 concurrent streams).

Cap the interim re-decode to the most recent `--partial-window-sec` seconds
(default 15; lower to 8-10 for high concurrency). Final transcripts are unchanged
- completed VAD segments are still decoded in full by _decode_segment / the
is_final path; only the interim hypothesis is bounded.

Root cause and validation by @qiulang on issue #3006: he reproduced the failure
on an L20 (long audio, 48 concurrent streams), confirmed bounding the window
restores most of the concurrency, and pinpointed that the growing window (not
partial frequency) is the dominant load for this LLM-ASR. Thanks!

Co-authored-by: LauraGPT <[email protected]>
2026-06-25 18:17:53 +08:00
游雁 5a37a31462 docs: avoid unbounded vLLM install guidance 2026-06-11 15:54:58 +00:00
游雁 1065d2e5ab revert: remove incorrect VAD finetune docs and script
FsmnVADStreaming.forward() is inference-only (no loss computation),
so standard train_ds.py training does not work. Removing the
finetune.sh and docs that were incorrectly added.

The parameter tuning guide (vad_kwargs) remains valid and is
documented in the issue thread (#2961).
2026-06-10 03:46:57 +00:00
游雁 0ccdce52a2 feat: add --vad-model and --spk-model CLI args to serve_vllm.py
Allow custom local paths or alternative model names for VAD and
speaker models. Set --spk-model to empty string to disable speaker
model loading. Fixes #2964.
2026-06-09 15:03:51 +00:00
游雁 b710ffda91 fix: handle None scheduler_conf in trainer, add scheduler to VAD finetune
- Fix TypeError when scheduler_conf is not provided (NoneType unpacking)
- Add explicit scheduler and scheduler_conf to VAD finetune.sh
- Fixes user report in #2961
2026-06-09 14:22:12 +00:00
游雁 ef0e46f1c3 docs: add VAD fine-tuning guide and finetune script
- Add finetune.sh for FSMN-VAD model fine-tuning
- Add English and Chinese documentation for VAD fine-tuning
- Include parameter tuning guide for quick adjustments without fine-tuning
- Addresses user requests in #2961
2026-06-08 11:14:47 +00:00
游雁 b8d736ef84 fix: remove repetition_penalty from vLLM services (fixes #2950 CUDA assert)
- repetition_penalty is incompatible with enable_prompt_embeds=True in vLLM
- Removed from both serve_realtime_ws.py and serve_vllm.py
- Added truncate_repetition() post-processing to serve_vllm.py as alternative
- serve_realtime_ws.py already has detect_and_fix_hallucination() for this

Root cause: vLLM's repetition penalty implementation does scatter on prompt
token IDs, but prompt_embeds mode has no token IDs, causing index OOB.
2026-05-29 00:18:27 +08:00
游雁 679f40c1a7 examples: add Dify integration guide (connect via OpenAI-compatible API) 2026-05-28 23:08:26 +08:00
游雁 a8d23eecbb feat: implement Whisper forward() for fine-tuning support (fixes #2678)
- Implemented cross-entropy loss computation in WhisperWarp.forward()
- Added fine-tuning example script and documentation
- Users can now fine-tune any Whisper model on custom data via FunASR training framework
2026-05-28 03:39:07 +08:00
游雁 b1012183d4 examples: add LangChain integration guide (FunASR as agent tool) 2026-05-28 00:12:39 +08:00
游雁 91905fd549 fix: add repetition_penalty=1.3 to streaming service (fixes #2930 streaming repetition)
Verified: 120.wav test shows no repetition in both offline and streaming modes.
Bump version to 1.3.7.
2026-05-27 20:02:41 +08:00
游雁 787c282560 fix: funasr-server uses vLLM engine for Fun-ASR-Nano (fixes #2930 text repetition)
- Merged serve_vllm.py logic into funasr-server (_server_app.py)
- Fun-ASR-Nano now uses FunASRNanoVLLM with repetition_penalty=1.3
- Falls back to AutoModel if vLLM unavailable (e.g. CPU or driver mismatch)
- Added /asr endpoint with VAD + timestamps + SPK support
- Non-LLM models (sensevoice, paraformer) still use AutoModel
- Verified: 120.wav repetition bug completely fixed
- Bump version to 1.3.6
2026-05-27 19:42:46 +08:00
zhifu gao 5953ad5543 docs: add Colab quickstart troubleshooting notes 2026-05-26 16:16:47 +08:00
游雁 7d3c2161db feat: WebSocket SPK as client-controlled param (SPK:true/false, default off) 2026-05-26 02:12:31 +08:00
游雁 a67e7d7356 feat: add SPK support to all protocols (OpenAI API + WebSocket)
- OpenAI API: added spk param (FunASR extension)
- WebSocket: SPK clustering on STOP (full re-cluster all sentences)
- All 3 protocols tested: HTTP REST ✓, OpenAI API ✓, WebSocket ✓
- docs: merge VAD tables into one, remove "no SPK" notes
2026-05-26 02:07:40 +08:00
游雁 005e9d8458 merge vllm: new dynamic VAD + unified server + updated benchmark 2026-05-25 23:22:45 +08:00
xiaoyunchong.xyc 7e2c3f44f2 feat: update non-streaming dynamic VAD schedule + unified vLLM server
Non-streaming VAD (DEFAULT_SILENCE_SCHEDULE):
  (10000, 2000), (20000, 1000), (30000, 800), (40000, 600),
  (50000, 400), (60000, 200), (inf, 100)
  - Preserves long segments (max 60s), reduces cuts by 42%
  - CER improved: 8.14% (vs fixed 8.93%, PyTorch 8.94%)

Streaming VAD (STREAMING_SILENCE_SCHEDULE): unchanged.

serve_vllm.py: unified server with HTTP REST + OpenAI API + WebSocket.
  - Non-streaming endpoints use new dynamic VAD
  - WebSocket uses DynamicStreamingVAD (streaming schedule)

benchmark_vllm.py: unified benchmark for all models.
2026-05-25 23:22:06 +08:00
游雁 3bc9018854 feat: add unified vLLM inference server (serve_vllm.py)
Three interfaces:
- HTTP REST: POST /asr (file upload, VAD + ASR + SPK + timestamps)
- OpenAI API: POST /v1/audio/transcriptions (Whisper-compatible)
- WebSocket: ws://host:port/ws (streaming with dynamic VAD)

All share: vLLM engine + dynamic VAD + speaker diarization + CTC timestamps.
Performance: 227s audio processed in 3.4s (RTF=0.015), CER=9.30%.
2026-05-25 22:20:14 +08:00
zhifu gao 2731c8c4b0 docs: localize Colab quickstart for Japanese and Korean 2026-05-25 21:08:56 +08:00
zhifu gao daaa1d4ca4 docs: localize OpenAI API guide for Japanese and Korean 2026-05-25 20:48:18 +08:00
zhifu gao fc76d9945b docs: localize Colab quickstart guide 2026-05-25 20:27:52 +08:00
游雁 653d787c21 refactor: unify benchmark_vllm.py at project root
- Single script supports all models (Fun-ASR-Nano, GLM-ASR, AutoModelVLLM)
- Remove old model-specific benchmark from examples/
- Update docs with unified benchmark commands
2026-05-25 20:22:12 +08:00
zhifu gao f31c1c4f8a docs: add Colab quickstart notebook
Add a browser-run FunASR Colab quickstart and link it from README, tutorial, use-case, and deployment docs.
2026-05-25 19:40:27 +08:00
zhifu gao eef89baec8 docs: add OpenAI API security gateway guide
Add English and Chinese gateway hardening docs for the OpenAI-compatible API and link them from deployment and recipe docs.
2026-05-25 19:13:36 +08:00
zhifu gao 6165c19990 demo: add Gradio OpenAI API browser demo
Add an optional Gradio browser UI and docs for the FunASR OpenAI-compatible API.
2026-05-25 18:37:40 +08:00
zhifu gao 8ade9bdb5e docs: add Kubernetes OpenAI API deployment template
Add CPU-first Kubernetes manifests and deployment docs for the FunASR OpenAI-compatible API.
2026-05-25 17:52:43 +08:00
游雁 2576a5159c merge vllm: fix use_low_frame_rate (CER 8.91% matches PyTorch), add benchmark 2026-05-25 17:22:57 +08:00
xiaoyunchong.xyc 536377951c fix: vLLM inference quality - apply use_low_frame_rate token truncation
Root cause: Fun-ASR-Nano uses use_low_frame_rate=True which computes
effective audio token count from fbank length (3x stride-2 conv formula).
The vLLM implementation was missing this step, sending 86 tokens where
PyTorch only uses 11 - causing CER to degrade from 8.94% to 19.68%.

Fix: Apply the same formula in both _encode_audio() and batch encode path.
Also removed <think> tokens from prompt suffix (not needed, model generates
directly without thinking for this task).

Results (184 files, 11541s, 1947 VAD segments):
  PyTorch:  RTFx=19.0, CER=8.94%
  vLLM:    RTFx=393.9, CER=8.91% (20.7x faster, CER consistent)

Also added benchmark_vllm.py for reproducible evaluation.
2026-05-25 17:21:08 +08:00
zhifu gao 31119ec0e5 docs: add JavaScript OpenAI API recipes
Document OpenAI JS SDK, Node fetch, TypeScript helper, and Next.js proxy patterns for FunASR OpenAI-compatible API users.
2026-05-25 17:09:38 +08:00
zhifu gao 0386bff0a4 test: add Python OpenAI API smoke test
Add a cross-platform Python smoke test and document it alongside the existing bash smoke test.
2026-05-25 16:35:26 +08:00