r/androiddev • • 2d ago

Android developers: Native TTS vs. third-party speech engines for a commercial app?

I'm evaluating speech recognition and text-to-speech options for an Android project and would appreciate some real-world experience.

I'm particularly interested in:

  • The quality and consistency of Android's built-in TTS voices across different devices.
  • Whether Sherpa-ONNX, Piper, or other speech engines offer meaningful advantages.
  • Latency when combining cloud-based speech recognition with local TTS.
  • Reliability of interruptible speech playback.
  • Commercial licensing issues with open-source speech models.

For those who've worked with these technologies, which approaches have proven reliable, and which would you avoid?

I'm especially interested in solutions that minimize development complexity and recurring API costs.

Thanks for any practical advice or links to useful implementations.

1 Upvotes

12 comments sorted by

2

u/The_best_1234 2d ago

Try tts with Google Al Edge Gallery

2

u/HotelZealousideal554 2d ago

Thanks! This looks promising.

→ More replies (1)

2

u/simbolmina 2d ago

You can see some examples with StoryCodex app. Aside from Piper, other models require good hardware to work real time, while options are good remote is better but expensive. Languages other than English and Chinese don't really have good models to work on mobile.

2

u/clockentyne 1d ago edited 1d ago

You can try  https://github.com/lowkeytea/scyllasband, full example code and native engine for runnning on Android. Supports steaming, multilingual, and has litert support. It’s Apache-2, so no licensing issues, and time to audio on a fold 8 is about 100ms.  

3

u/amelech 1d ago

This might be useful for me thanks for the link. I'm building a local AI assistant: https://github.com/NickMonrad/kernel-ai-assistant

2

u/amelech 1d ago

For stt I've tried vosk, zipformer, whisper, android native+ Google speech services and now trying asr4all from the FUTO folks. I think asr4all is probably the best quality so far on a mobile. Regarding tts though it's much more difficult. There's a decent one called Inflect, otherwise piper Cori is prob the only one you can use commercially. I've tried Kokoro but the onnx version is crackly even though the voice is fairly natural otherwise - but it's also slow. I have a spike lined up to try Kokoro again with Litert-lm as it's finally supported.

2

u/abbasi20 1d ago

I went with Gemini’s TTS for an audio learning app, not native. Lessons are a dialog between two voices plus a narrator, and everyone hears the same lesson, so I render once on the server and cache it. Roughly $0.04 for a 2.5 min lesson.

Couple of things that bit me: multi-speaker mode drifted (one voice came back with a different accent mid-lesson), so now I render one line per call. And name your speakers. With “teacher”/”student” as labels it mixed up voices sometimes, with actual names it stopped.

If your text is short or needs to work offline I’d probably just use native tbh.

1

u/frpboy 1d ago

One thing worth knowing about the native TextToSpeech API: if you use the default engine, you get whatever the device has set - Google Speech Services on many Play devices, but OEMs differ - so the voice and quality your users hear can vary across devices. You can request a specific engine by package name, but even that isn't a guarantee: if it isn't installed or enabled, the system falls back to the default, and each engine ships its own voice set. On licensing, don't stop at the engine label: the original rhasspy/piper (now archived) was MIT, but the current lineage, OHF-Voice's piper1-gpl, is GPL-3.0-or-later, which comes with copyleft obligations for a closed-source app, while sherpa-onnx is Apache-2.0. Voice models are licensed separately from the engine: Piper's own licensing doc says each voice's MODEL_CARD names only its own dataset's license, and it recommends legal advice for commercial use. For interruptible playback, the native API covers it directly: stop() interrupts the current utterance and discards the queue, and UtteranceProgressListener gives you per-utterance callbacks.

1

u/Moist-Asparagus-801 1d ago

I went with the native TTS for reading text aloud in one of my apps, mainly because it's free, works offline and the user already picked a voice they like. Downside is quality varies a lot between devices, so it's worth testing on a few phones. If voice quality is the product, third-party is worth it. If it's a nice extra, native is fine.