Proposal: mobile ONNX Runtime examples for MOSS-TTS-Nano
Hi OpenMOSS team,
Thank you for releasing MOSS-TTS and the ONNX/mobile-friendly MOSS-TTS-Nano artifacts.
We have been integrating MOSS-TTS-Nano ONNX Runtime in a real Android/iOS app and would like to contribute a small upstream example if it would be useful.
Proposed contribution:
examples/android_onnx_runtime/: a minimal Kotlin/Android ONNX Runtime example for MOSS-TTS-Nano text-to-wav generation.examples/ios_onnx_runtime/or a follow-up PR: a minimal Swift/iOS ONNX Runtime example.docs/mobile_onnx_runtime.md: setup notes, model file layout, runtime options, common pitfalls, and device-side troubleshooting.
The goal would be a clean, standalone example rather than product code. We would avoid app-specific UI/business logic and keep the example focused on:
- loading the MOSS-TTS-Nano ONNX graphs
- using the tokenizer assets
- running prefill / decode-step / local decoder or fixed-frame sampling
- decoding audio tokens with the MOSS Audio Tokenizer ONNX decoder
- writing a WAV file
- documenting Android/iOS runtime settings such as thread count, memory behavior, and model file placement
Before preparing a PR, I wanted to ask:
- Would you be interested in accepting mobile ONNX Runtime examples in this repository?
- Do you prefer a docs-only PR first, or a minimal Android example PR?
- Is there a preferred examples directory structure or naming convention we should follow?
Happy to keep the first PR small and easy to review.
Updates are welcome; you can update directly to the MOSS-TTS-Nano repository.
Alternatively, you can open-source your own repository, which we will then reference in the readme.
An Android example would be even better.
Currently, we do not have strict coding standards.
Thanks! I opened a small Android ONNX Runtime example PR in the MOSS-TTS-Nano repository: https://github.com/OpenMOSS/MOSS-TTS-Nano/pull/70
The first pass keeps the Android example minimal: it loads the exported MOSS-TTS-Nano ONNX graphs and the MOSS-Audio-Tokenizer-Nano ONNX decoder on device, synthesizes two pre-tokenized demo prompts, and writes a WAV file. Tokenizer integration is documented as the next plug-in point so the first PR stays easy to review.
Happy to adjust the directory structure or scope if you prefer a different shape.