Summary
Investigate QNN EP on Sherpa-ONNX TTS (Kokoro INT8, Piper INT8) targeting Hexagon HTP on Snapdragon 8 Gen 2+.
Why not NNAPI
Issue #852 investigated NNAPI first. The prebuilt sherpa-onnx-1.13.x AAR uses compile-time __ANDROID_API__=21 which blocks NNAPI, and upstream crash reports (#958, #3611) indicate TTS+NNAPI has stability issues even with a custom build. Closed as not planned.
QNN is the remaining HW acceleration path for Sherpa TTS.
Requirements
- Custom Sherpa-ONNX AAR built with
SHERPA_ONNX_ENABLE_QNN=ON and target SDK 27+
- QNN binary model conversion — Kokoro INT8 .onnx must be converted to SoC-specific QNN binary format (SM8550/S23 Ultra) using QNN SDK tools
- QNN SDK native libs —
libQnnHtp.so, libQnnHtpPrepare.so, libQnnHtpV81Skel.so, libQnnSystem.so (~85MB) extracted from Qualcomm AI Engine Direct SDK and bundled in jniLibs/arm64-v8a/
- QNN runtime AAR —
com.qualcomm.qti:qnn-runtime:2.42.0 (Qualcomm AI Hub Model License — needs legal review)
- Application integration — Sherpa-ONNX has a first-class
QnnConfig Kotlin class for Android integration; use provider = "qnn" + QnnConfig to pass the context binary path
Supported chipsets
| Chipset |
HTP version |
Status |
| SM8550 (S23 Ultra) |
V81 |
Target |
| SM8650, SM8750 |
V81+ |
Should work |
| SM8850 |
TBD |
Should work |
Risks
- License: QNN SDK libs are Qualcomm AI Hub Model License — not MIT. Legal review required before shipping
- APK size: ~85MB additional native libs
- Model conversion effort: No pre-built TTS QNN binaries exist (only ASR). Must convert Kokoro ONNX → QNN binary using QNN SDK toolchain
- Sherpa build complexity: Cross-compiling Sherpa with QNN for Android is non-trivial; requires QNN SDK installed in the build environment
- Per-SoC binaries: QNN context binaries are SoC-specific — SM8550 binary won't work on SM8650
Deferred
Parked until post-launch. Not a blocker for v1.0.
Summary
Investigate QNN EP on Sherpa-ONNX TTS (Kokoro INT8, Piper INT8) targeting Hexagon HTP on Snapdragon 8 Gen 2+.
Why not NNAPI
Issue #852 investigated NNAPI first. The prebuilt
sherpa-onnx-1.13.xAAR uses compile-time__ANDROID_API__=21which blocks NNAPI, and upstream crash reports (#958, #3611) indicate TTS+NNAPI has stability issues even with a custom build. Closed as not planned.QNN is the remaining HW acceleration path for Sherpa TTS.
Requirements
SHERPA_ONNX_ENABLE_QNN=ONand target SDK 27+libQnnHtp.so,libQnnHtpPrepare.so,libQnnHtpV81Skel.so,libQnnSystem.so(~85MB) extracted from Qualcomm AI Engine Direct SDK and bundled injniLibs/arm64-v8a/com.qualcomm.qti:qnn-runtime:2.42.0(Qualcomm AI Hub Model License — needs legal review)QnnConfigKotlin class for Android integration; useprovider = "qnn"+QnnConfigto pass the context binary pathSupported chipsets
Risks
Deferred
Parked until post-launch. Not a blocker for v1.0.