The complete solution for native TTS on NPU: 1. Python: tokenize + text_projection only (30ms, no model generation) 2. File: golden prefill[0:9] + text_proj + eos padding (ratio 3.5×) 3. C++ shared Module: codec_sum(our codes) + trailing text/eos/pad 4. RMS-based auto-trim of trailing noise after speech ends Key insights: - Shared Module C++ uses SAME QNN compiled graph as Java → self-consistent - codec_sum from our NPU codes is coherent (same model instance) - Text tokens consumed 1:1, then eos padding for remaining steps - RMS trim detects 15% energy drop from peak → cuts garbage Validated "impeccable" by user on "Bonjour, je m'appelle Kazeia..." prepare_tts_native.py works for ANY text. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| src/main | ||
| build.gradle.kts | ||
| proguard-rules.pro | ||