Skip to content

fix: support Fun-ASR MLT Nano inference - #65

Merged
harry0703 merged 1 commit into
harry0703:mainfrom
LauraGPT:codex/support-fun-asr-mlt-nano
Jul 18, 2026
Merged

fix: support Fun-ASR MLT Nano inference#65
harry0703 merged 1 commit into
harry0703:mainfrom
LauraGPT:codex/support-fun-asr-mlt-nano

Conversation

@LauraGPT

Copy link
Copy Markdown
Contributor

Summary

  • recognize FunAudioLLM/Fun-ASR-MLT-Nano-2512 as a Fun-ASR Nano model
  • reuse the Nano inference profile (cache, batch_size, and list-based hotwords)
  • avoid loading the separate ct-punc model for MLT Nano

Why

The current model-name check only matches the contiguous fun-asr-nano string. The
official multilingual model ID contains fun-asr-mlt-nano, so it falls back to the
classic FunASR profile.

That profile adds ct-punc, passes batch_size_s, and uses the singular hotword
argument. Fun-ASR Nano reads the list-based hotwords argument instead, so configured
hotwords are silently lost for MLT Nano.

The official MLT model configuration declares model: FunASRNano, and the official
inference example uses cache={}, batch_size=1, and hotwords=[...]:

Verification

  • python -m unittest discover -s tests -p "test_*.py" -v (15 passed)
  • ruff check . with the repository-pinned ruff==0.15.21
  • python -m compileall -q app tests
  • git diff --check

@LauraGPT
LauraGPT marked this pull request as ready for review July 18, 2026 15:32
@LauraGPT

Copy link
Copy Markdown
Contributor Author

Marked ready for review after refreshing validation on head 2ddd329724bfd306a434d0352582839724a16f50.

Validation:

  • python -m unittest tests/test_core.py -q -> 15 tests passed
  • python -m compileall -q app main.py tests/test_core.py
  • git diff --check

The added coverage verifies that both FunAudioLLM/Fun-ASR-Nano-2512 and FunAudioLLM/Fun-ASR-MLT-Nano-2512 use the Nano inference options, while traditional FunASR/SenseVoice models keep the legacy hotword string path.

@LauraGPT

Copy link
Copy Markdown
Contributor Author

Validated the current head 2ddd329724bfd306a434d0352582839724a16f50 against current upstream main@5da86bcb.

Checks run:

  • python3 -m unittest tests.test_core -v -> 15/15 passing
  • python3 -m py_compile app/services/asr_funasr.py tests/test_core.py main.py
  • git diff --check

The new test coverage includes the MLT checkpoint path (FunAudioLLM/Fun-ASR-MLT-Nano-2512) and verifies it uses the Nano-style inference options (batch_size=1, per-call cache, list-form hotwords, no batch_size_s / classic hotword). GitHub currently reports the PR as mergeable; the UNSTABLE label is from the absence of status checks, not a failing check.

@harry0703
harry0703 merged commit 68c66b2 into harry0703:main Jul 18, 2026
@harry0703

Copy link
Copy Markdown
Owner

Thank you for contributing Fun-ASR MLT Nano support and for adding focused regression coverage. I have merged this after verifying the change locally with the real MLT checkpoint and an end-to-end audio transcription. The model now initializes and transcribes successfully through AudioNotes. I will handle a couple of follow-up refinements separately, including deterministic decoding and clearer handling for timestamp-based output, so this contribution can remain focused. Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants