Skip to content

[iOS] Add preset X-ASR flow to Qwen3.5 chat - #4767

Open
ring-zl wants to merge 2 commits into
alibaba:feature/ios-app-devfrom
ring-zl:feature/ios-asr-preset
Open

[iOS] Add preset X-ASR flow to Qwen3.5 chat#4767
ring-zl wants to merge 2 commits into
alibaba:feature/ios-app-devfrom
ring-zl:feature/ios-asr-preset

Conversation

@ring-zl

@ring-zl ring-zl commented Aug 13, 2026

Copy link
Copy Markdown

Summary

  • add a preset audio chip beside the existing image presets in the Qwen3.5-2B demo
  • run the bundled sample through X-ASR (Zipformer2, MNN weight INT8 block64) on CPU before submitting the normalized transcript to the LLM
  • show the playable waveform first, then the transcript and ASR-only latency/RTF in compact text
  • keep model initialization time out of the user-visible metric while retaining it in diagnostics
  • add generation-based result invalidation, a permanent native worker thread, asset SHA-256 validation, and a silent signed-device probe

Asset delivery

Model weights, the sample recording, and the generated arm64 libsherpa-mnn.a are intentionally excluded from Git. The internal test package is:

mnn-ios-xasr-int8-test-assets-v1-final.zip

SHA-256:

a8eb55870620a5195b458aa9c316e1cbee0a1af600002239095eade64aeffdcf

Please confirm redistribution rights for X-ASR and the sample recording before publishing the archive. apps/iOS/MNNLLMChat/PRESET_ASR.md documents installation and exact per-file hashes.

Verification

  • clean signed-device Debug build: PASS
  • device: iPhone 13 Pro (iPhone14,2)
  • silent production-path probe: PASS; no microphone capture or speaker playback
  • sample duration: 2.136875 s
  • normalized transcript: 给我介绍一下杭州市的美食
  • X-ASR inference: approximately 0.294 s
  • RTF: approximately 0.138 (approximately 7.3x real time)
  • interactive audio/transcript/LLM flow: manually accepted on device
  • package extract + six-file SHA-256 verification: PASS

Not tested: corpus-level CER/WER, repeated-turn/cancellation stress matrix, memory peak/Jetsam headroom, simulator or iPad.

Notes

The first commit removes the unavailable cmark-gfm-bin target from the vendored SwiftPM manifest. The branch does not contain its declared bin directory, so a clean dependency resolution otherwise fails before the app target is built.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


周林(482152) seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@ring-zl

ring-zl commented Aug 13, 2026

Copy link
Copy Markdown
Author

@v0jiuqi 你好,这个 PR 基于你提交的 feature/ios-app-dev,补充了预设音频 → X-ASR → Qwen3.5-2B 的真机流程。

我已经在 iPhone 13 Pro 上完成无声 production-path probe 和交互测试。测试音频 2.136875 秒,X-ASR 推理约 0.294 秒,RTF 约 0.138,识别结果为“给我介绍一下杭州市的美食”。模型使用 X-ASR Zipformer2 的 MNN weight INT8 block64 版本。

模型、样例音频和 arm64 libsherpa-mnn.a 已整理成独立内部测试包,没有提交到 GitHub。包 SHA-256:

a8eb55870620a5195b458aa9c316e1cbee0a1af600002239095eade64aeffdcf

请告知适合的内部交付渠道,或确认应该上传到哪个 alinnprivate 模型位置;确认再分发权限前我不会公开上传该包。部署路径、逐文件 hash 和 silent probe 方法已写在 apps/iOS/MNNLLMChat/PRESET_ASR.md

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