termux-tts 1.4.3 → 1.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/doc.config.yaml CHANGED
@@ -1,532 +1,596 @@
1
- # ==============================================================================
2
- # AMEVA Documentation Configuration: Termux-TTS
3
- # Strict Compliance with AOSF-ENG-STD-2026-V1 & OpenSSF Standards
4
- # Single Source of Truth (SSOT)
5
- # ==============================================================================
6
-
7
- name: "termux-tts"
8
- display_name: "Termux-TTS"
9
- package_name_pypi: "termux-tts"
10
- package_name_npm: "termux-tts"
11
- version: "v1.3.0"
12
- release_name: "4-Tier Architecture & Studio Vulkan GPU Acceleration"
13
- license: "Apache-2.0"
14
- platform: "Android ARM64 / Qualcomm Adreno & ARM Mali Vulkan 1.3 / Linux"
15
- github_repo_url: "https://github.com/uno-km/termux-tts"
16
-
17
- custom_pages:
18
- - slug: "vulkan-engineering-paper"
19
- title_en: "Vulkan C++ Engineering Paper"
20
- title_ko: "Vulkan C++ 네이티브 가속 논문"
21
- file: "lib/tts/vulkan-engineering-paper.html"
22
-
23
- tagline_en: "Production-Grade 4-Tier On-Device Speech Synthesis Framework (Zero-Dependency DSP Formant, C++ Vulkan GPU Neural Engine & Android Native Voice Bridge)"
24
- tagline_ko: "모바일 및 엣지 환경을 위한 프로덕션급 4-Tier 온디바이스 음성 합성 프레임워크 (무의존성 DSP 포먼트, C++ Vulkan GPU 신경망 엔진, 안드로이드 네이티브 브릿지)"
25
-
26
- why_challenge_en: "Constrained mobile edge environments frequently suffer from execution instability, excessive thermal throttling, and unpredictable runtime memory spikes when running conventional deep learning text-to-speech stacks. Heavyweight dependencies like full PyTorch or unoptimized runtime graph compilers exhaust mobile DRAM, while vendor-specific Vulkan driver quirks (such as ARM Mali subgroup index truncation or Qualcomm Adreno JIT pipeline compilation crashes) historically prevented reliable on-device GPU speech synthesis."
27
- why_challenge_ko: "제약된 모바일 엣지 환경에서는 과도한 메모리 점유, 발열 스로틀링, 드라이버 파편화로 인해 생성형 음성 합성 모델 구동이 불안정합니다. 기존 무거운 프레임워크는 수 기가바이트의 런타임 의존성으로 모바일 OOM을 유발하며, ARM Mali 및 Qualcomm Adreno의 셰이더 컴파일러 결함으로 인해 안정적인 GPU 음성 가속이 어려웠습니다."
28
-
29
- description_en: "Termux-TTS delivers a resilient 4-Tier on-device text-to-speech architecture designed for deterministic latency and hardware acceleration. It bridges lightweight parametric DSP synthesis (<50ms compute, 0MB model download) with high-fidelity C++ Vulkan neural acceleration (lessac-high-fp16 at 22.05kHz), alongside Android system native speech service routing. With automated 1-click provisioning and subprocess IPC isolation, Termux-TTS achieves high acoustic fidelity while mitigating audio thread jitter and driver locks."
30
- description_ko: "Termux-TTS는 결정론적 지연 시간과 하드웨어 가속을 실현하는 프로덕션급 4-Tier 온디바이스 음성 합성 프레임워크입니다. 0MB 무의존성 파라메트릭 DSP 보코더부터 고해상도 C++ Vulkan GPU 가속 신경망 모델(22.05kHz FP16), 그리고 안드로이드 네이티브 음성 브릿지까지 통합 제공합니다."
31
-
32
- quick_install_cmd: |
33
- pip install termux-tts
34
- # or: npm install termux-tts
35
- # 1-Click Provision Studio Vulkan Engine:
36
- termux-tts install --tier high
37
-
38
- features:
39
- - title_en: "4-Tier Resilient Architecture"
40
- desc_en: "Tier 1: Zero-Dependency Parametric DSP Formant (0MB footprint). Tier 2: Android Native System Voice Bridge. Tier 3: Subprocess-Isolated Sherpa C++ CPU Engine. Tier 4: Pure Vulkan GPU Hardware Neural Acceleration."
41
- title_ko: "4-Tier 복원형 합성 아키텍처"
42
- desc_ko: "Tier 1 무의존성 DSP 포먼트, Tier 2 안드로이드 네이티브 음성 브릿지, Tier 3 격리형 Sherpa CPU 엔진, Tier 4 순수 Vulkan GPU 하드웨어 신경망 가속."
43
- - title_en: "1-Click Automated Provisioning"
44
- desc_en: "Command-line provisioning (termux-tts install --tier high/medium) automatically resolves precompiled ARM64 native binaries and HuggingFace weights with self-test verification."
45
- title_ko: "1-클릭 자동 프로비저닝"
46
- desc_ko: "명령어 1회로 ARM64 네이티브 바이너리와 허깅페이스 가중치를 자동 감지 및 설치하고 자체 진단 테스트를 완결합니다."
47
- - title_en: "Studio-Grade FP16 Neural Fidelity"
48
- desc_en: "Native support for high-resolution 22.05kHz 16-bit PCM studio models (vits-piper-en_US-lessac-high-fp16), delivering natural prosody on mobile hardware."
49
- title_ko: "스튜디오급 FP16 고음질 신경망"
50
- desc_ko: "22.05kHz 16비트 PCM 고해상도 레퍼런스 모델을 지원하여 극도로 자연스러운 억양과 음향 충실도를 모바일 단말기에서 제공합니다."
51
- - title_en: "Pure Vulkan GPU Acceleration (Zero CPU Fallback)"
52
- desc_en: "Direct GPU tensor compute via Vulkan 1.3 pipeline caching, fully resolving Qualcomm Adreno 830 and ARM Mali-G68 shader driver anomalies without silent CPU fallback."
53
- title_ko: "순수 Vulkan GPU 가속 (Zero CPU 침묵 폴백)"
54
- desc_ko: "침묵 폴백 없이 Qualcomm Adreno 830 및 ARM Mali-G68의 셰이더 드라이버 결함을 완전 해소하고 순수 GPU 텐서 연산을 수행합니다."
55
- - title_en: "Subprocess IPC Memory Isolation"
56
- desc_en: "Architectural separation of audio synthesis and OpenSL ES playback threads via subprocess IPC prevents Python GIL contention and memory corruption."
57
- title_ko: "프로세스 격리형 메모리 보호"
58
- desc_ko: "음성 합성 파이프라인과 오디오 재생 스레드를 서브프로세스 IPC로 분리하여 GIL 병목 및 메모리 오염을 원천 차단합니다."
59
- - title_en: "Unified Cross-Language Toolchain"
60
- desc_en: "Identical functional parity and strict typing across Global CLI, Python 3.10+ SDK, and Node.js / TypeScript runtime bindings."
61
- title_ko: "통합 크로스 랭귀지 툴체인"
62
- desc_ko: "Global CLI, Python 3.10+ SDK, Node.js / TypeScript 런타임 간 완전한 기능 동등성과 타입 안전성을 보장합니다."
63
-
64
- matrix_table:
65
- - category: "Tier 1: DSP Formant"
66
- operations: "Rosenberg Glottal Pulse, 5-Band Biquad Filter, Sino-Korean Numeral Normalizer"
67
- status: "Production (<50ms)"
68
- - category: "Tier 2: Native Bridge"
69
- operations: "Termux-API / Android TTS Service IPC (Samsung/Google Engine)"
70
- status: "Production (Immediate)"
71
- - category: "Tier 3: CPU Neural"
72
- operations: "Sherpa C++ Subprocess-Isolated VITS Engine (ARM64 NEON)"
73
- status: "Production (RTF 0.4~1.2x)"
74
- - category: "Tier 4: Vulkan GPU"
75
- operations: "C++ Vulkan Pipeline Caching, Mali Quirk Handling, Adreno Subgroup 64"
76
- status: "Production (RTF 0.26x)"
77
-
78
- code_example_py: |
79
- import termux_tts as tts
80
-
81
- # 1. Pure Vulkan GPU Neural Synthesis (Studio Tier)
82
- with tts.load(engine="vulkan", model_tier="high") as engine:
83
- result = engine.synthesize(
84
- "The neural speech synthesis engine is operating with pure Vulkan hardware acceleration.",
85
- output="studio_vulkan.wav"
86
- )
87
- print(f"Synthesized {result.audio_duration:.2f}s in {result.elapsed_ms:.1f}ms (RTF: {result.rtf:.4f}x)")
88
-
89
- # 2. Instant Zero-Dependency DSP Formant Synthesis
90
- with tts.load(engine="dsp", preset="balanced") as engine:
91
- result = engine.synthesize("Instant speech generation with zero external weights.", output="dsp.wav")
92
- print(f"DSP Synthesis Latency: {result.elapsed_ms:.1f}ms")
93
-
94
- # 3. Direct Android Hardware Speaker Playback
95
- with tts.load(engine="native", language="en") as engine:
96
- engine.speak("Direct hardware speaker output via Android native service.")
97
-
98
- code_example_js: |
99
- const tts = require('termux-tts');
100
-
101
- async function main() {
102
- // 1. Initialize Vulkan GPU Neural Engine
103
- const engine = tts.load({ engine: 'vulkan', tier: 'high' });
104
- const res = await engine.synthesize(
105
- "High-performance speech synthesis on mobile hardware.",
106
- { output: "vulkan_output.wav" }
107
- );
108
- console.log(`Generated: ${res.durationSec}s in ${res.elapsedMs}ms (RTF: ${res.rtf}x)`);
109
-
110
- // 2. Hardware Diagnostics
111
- const diag = await tts.doctor();
112
- console.log(`Vulkan GPU Device: ${diag.device_name} (API: ${diag.api_version})`);
113
- }
114
- main();
115
-
116
- benchmarks:
117
- headers: ["Hardware Target", "SoC / GPU Architecture", "Synthesis Engine", "Audio Duration", "Compute Latency", "Real-Time Factor (RTF)", "Execution Status"]
118
- rows:
119
- - ["Galaxy S25", "Snapdragon 8 Elite / Adreno 830", "Vulkan GPU (high-fp16)", "6.70 s", "6.65 s", "0.993x", "Validated (Real-time)"]
120
- - ["Galaxy S25", "Snapdragon 8 Elite / Adreno 830", "Vulkan GPU (medium)", "4.59 s", "1.21 s", "0.264x", "Validated (3.79x faster)"]
121
- - ["Galaxy A35", "Exynos 1380 / ARM Mali-G68 MP5", "Vulkan GPU (medium)", "4.52 s", "5.18 s", "1.146x", "Validated (Stable)"]
122
- - ["Galaxy A35", "Exynos 1380 / ARM Mali-G68 MP5", "Vulkan GPU (high-fp16)", "6.73 s", "34.33 s", "5.098x", "Validated (High Fidelity)"]
123
- - ["Heterogeneous ARM64", "Cortex-A78 / A55 CPU Core", "Zero-Dep DSP Formant", "4.15 s", "0.054 s", "0.0130x", "Validated (Instant)"]
124
- - ["Android Physical Speaker", "AudioTrack / OpenSL ES Bridge", "Android Native Service", "N/A", "0.012 s", "0.0020x", "Validated (Hardware Out)"]
125
-
126
- api_reference:
127
- - symbol: "termux_tts.load(engine='auto'|'vulkan'|'sherpa'|'dsp'|'native', model_tier='high'|'medium', preset='balanced')"
128
- description: "Factory initializer returning the configured synthesis engine context with resource finalization."
129
- - symbol: "engine.synthesize(text: str, output: str = None, speed: float = 1.0, preset: str = None) -> SynthesisResult"
130
- description: "Executes phonetic tokenization, neural/DSP acoustic modeling, and writes 16-bit PCM WAV audio."
131
- - symbol: "engine.speak(text: str, stream: str = 'MUSIC') -> NativeResult"
132
- description: "Routes speech synthesis directly to the physical device speakers via Android system native services."
133
- - symbol: "termux_tts.run_installation(tier='high'|'medium', force=False) -> bool"
134
- description: "Automated provisioning toolchain downloading native C++ binaries from GitHub Releases and HuggingFace weights."
135
- - symbol: "termux_tts.doctor() -> DiagnosticReport"
136
- description: "Runs rigorous 12-stage hardware diagnostics verifying Vulkan instance, GPU compute queues, and memory buffers."
137
-
138
- installation_body: |
139
- <h3>Standard Package Installation</h3>
140
- <p>Install the core Python or Node.js package directly from standard package repositories:</p>
141
- <pre><code># Python (PyPI)
142
- pip install termux-tts
143
-
144
- # Node.js / TypeScript (NPM)
145
- npm install termux-tts</code></pre>
146
-
147
- <h3>Prerequisites on Android Termux</h3>
148
- <p>Ensure that the required system packages are installed in your Termux environment:</p>
149
- <pre><code>pkg update && pkg install -y termux-api pulseaudio sox clang</code></pre>
150
-
151
- <h3>1-Click Automated Engine Provisioning</h3>
152
- <p>To enable Tier 4 Vulkan GPU neural speech synthesis without manual compilation or model downloading, run the built-in installer:</p>
153
- <pre><code># Install High-Resolution Studio Tier (vits-piper-en_US-lessac-high-fp16, 22.05kHz)
154
- termux-tts install --tier high
155
-
156
- # Or install Medium Compact Tier (vits-piper-en_US-lessac-medium)
157
- termux-tts install --tier medium</code></pre>
158
- <p>The provisioning script downloads the precompiled native ARM64 C++ binary (<code>sherpa-ncnn-offline-tts-vulkan</code>) from the official GitHub Release and verifies execution via an immediate self-test.</p>
159
-
160
- quickstart_body: |
161
- <h3>Command-Line Interface (CLI) Recipes</h3>
162
- <pre><code># 1. High-Resolution Studio Neural Synthesis with Speaker Playback
163
- termux-tts synth -e vulkan --tier high -t "Operating at full hardware capacity." -o speech.wav --play
164
-
165
- # 2. Instant Zero-Dependency DSP Formant Synthesis
166
- termux-tts synth -e dsp -p ultra -t "Zero dependency parametric speech synthesis." -o dsp.wav
167
-
168
- # 3. Direct Android Hardware Speaker Broadcast
169
- termux-tts speak -t "System notification broadcast." -l en
170
-
171
- # 4. Hardware and Environment Diagnostics
172
- termux-tts doctor</code></pre>
173
-
174
- <h3>Python SDK Canon</h3>
175
- <pre><code>import termux_tts as tts
176
-
177
- # Initialize pure Vulkan GPU neural synthesis engine
178
- with tts.load(engine="vulkan", model_tier="high") as engine:
179
- res = engine.synthesize("Validating deterministic tensor execution.", output="out.wav")
180
- print(f"Elapsed: {res.elapsed_ms:.1f}ms | RTF: {res.rtf:.4f}x")</code></pre>
181
-
182
- api_body: |
183
- <h3>Factory Gateway</h3>
184
- <table class="data-table">
185
- <thead>
186
- <tr><th>Symbol</th><th>Signature</th><th>Description</th></tr>
187
- </thead>
188
- <tbody>
189
- <tr>
190
- <td><code>termux_tts.load</code></td>
191
- <td><code>(engine: str = 'auto', model_tier: str = 'high', preset: str = 'balanced', language: str = 'en')</code></td>
192
- <td>Initializes and returns the unified TTS engine instance. Supports context manager pattern.</td>
193
- </tr>
194
- <tr>
195
- <td><code>termux_tts.run_installation</code></td>
196
- <td><code>(tier: str = 'high', force: bool = False) -> bool</code></td>
197
- <td>1-click provisioning tool downloading native ARM64 C++ binaries and model weights.</td>
198
- </tr>
199
- <tr>
200
- <td><code>termux_tts.doctor</code></td>
201
- <td><code>() -> DiagnosticReport</code></td>
202
- <td>Executes comprehensive 12-stage Vulkan and system diagnostics.</td>
203
- </tr>
204
- </tbody>
205
- </table>
206
-
207
- <h3>Engine Methods</h3>
208
- <table class="data-table">
209
- <thead>
210
- <tr><th>Method</th><th>Parameters</th><th>Return Type</th><th>Description</th></tr>
211
- </thead>
212
- <tbody>
213
- <tr>
214
- <td><code>synthesize</code></td>
215
- <td><code>(text: str, output: str = None, speed: float = 1.0, preset: str = None)</code></td>
216
- <td><code>SynthesisResult</code></td>
217
- <td>Synthesizes text into 16-bit linear PCM WAV audio.</td>
218
- </tr>
219
- <tr>
220
- <td><code>speak</code></td>
221
- <td><code>(text: str, stream: str = 'MUSIC')</code></td>
222
- <td><code>NativeResult</code></td>
223
- <td>Transmits speech to the device speaker via Android native TTS bridge.</td>
224
- </tr>
225
- </tbody>
226
- </table>
227
-
228
- benchmarks_body: |
229
- <h3>Empirical Dual-Device Hardware Benchmark Suite</h3>
230
- <p>The following performance benchmarks were gathered directly on physical test devices running Android 16 under Termux ARM64 environment. Every test was conducted over repeated synthesis iterations with zero silent fallback.</p>
231
-
232
- <table class="data-table">
233
- <thead>
234
- <tr>
235
- <th>Device &amp; Hardware Profile</th>
236
- <th>Synthesis Engine</th>
237
- <th>Model Architecture</th>
238
- <th>Audio Duration</th>
239
- <th>Compute Latency</th>
240
- <th>Real-Time Factor</th>
241
- <th>Hardware Utilization</th>
242
- </tr>
243
- </thead>
244
- <tbody>
245
- <tr>
246
- <td><strong>Samsung Galaxy S25</strong><br>Snapdragon 8 Elite / Adreno 830</td>
247
- <td>Vulkan GPU Neural</td>
248
- <td>lessac-high-fp16 (22.05kHz)</td>
249
- <td>6.70 s</td>
250
- <td><strong>6.65 s</strong></td>
251
- <td><strong>0.993x</strong></td>
252
- <td>GPU Subgroup 64 / Pure Tensor</td>
253
- </tr>
254
- <tr>
255
- <td><strong>Samsung Galaxy S25</strong><br>Snapdragon 8 Elite / Adreno 830</td>
256
- <td>Vulkan GPU Neural</td>
257
- <td>lessac-medium (22.05kHz)</td>
258
- <td>4.59 s</td>
259
- <td><strong>1.21 s</strong></td>
260
- <td><strong>0.264x</strong></td>
261
- <td>GPU Compute / 3.79x Faster Than RT</td>
262
- </tr>
263
- <tr>
264
- <td><strong>Samsung Galaxy A35</strong><br>Exynos 1380 / ARM Mali-G68 MP5</td>
265
- <td>Vulkan GPU Neural</td>
266
- <td>lessac-medium (22.05kHz)</td>
267
- <td>4.52 s</td>
268
- <td><strong>5.18 s</strong></td>
269
- <td><strong>1.146x</strong></td>
270
- <td>Mali Subgroup 16 / Medium Kernel</td>
271
- </tr>
272
- <tr>
273
- <td><strong>Samsung Galaxy A35</strong><br>Exynos 1380 / ARM Mali-G68 MP5</td>
274
- <td>Vulkan GPU Neural</td>
275
- <td>lessac-high-fp16 (22.05kHz)</td>
276
- <td>6.73 s</td>
277
- <td><strong>34.33 s</strong></td>
278
- <td><strong>5.098x</strong></td>
279
- <td>Full VRAM Resident / High Fidelity</td>
280
- </tr>
281
- <tr>
282
- <td><strong>Heterogeneous ARM64</strong><br>All Core Profiles</td>
283
- <td>Parametric DSP Formant</td>
284
- <td>5-Band Biquad Formant</td>
285
- <td>4.15 s</td>
286
- <td><strong>0.054 s</strong></td>
287
- <td><strong>0.0130x</strong></td>
288
- <td>0MB External RAM / Instant CPU</td>
289
- </tr>
290
- </tbody>
291
- </table>
292
-
293
- advanced_parameters_body: |
294
- <h3>Architecture &amp; Hardware Driver Postmortem</h3>
295
- <p>Operating deep learning inference models on mobile Vulkan runtimes involves navigating severe GPU driver irregularities. Below is the technical breakdown of bugs identified and permanently resolved in Termux-TTS v1.3.0:</p>
296
-
297
- <h4>1. ARM Mali-G68 Valhall Subgroup Truncation Resolution</h4>
298
- <p>On ARM Mali-G68 GPUs (subgroup size 16), unaligned matrix multiplication workgroups caused an integer division truncation: <code>loadstride_b = gl_WorkGroupSize.x * LOAD_VEC_B / BK = 16 * 1 / 32 = 0</code>. This resulted in an infinite loop (<code>for (uint l = 0; l &lt; BN; l += 0)</code>) leading to GPU command timeout and device loss (<code>VK_ERROR_DEVICE_LOST</code>). Termux-TTS enforces medium tile alignment and subgroup-aware shader dispatch, eliminating the loop and ensuring full 100% layer execution.</p>
299
-
300
- <h4>2. Qualcomm Adreno 830 SPIR-V Pipeline Caching</h4>
301
- <p>On Snapdragon 8 Elite Adreno 830 hardware, repeated runtime pipeline generation triggered JIT compiler crashes (<code>VK_ERROR_UNKNOWN -13</code>). Termux-TTS isolates model pipelines with immutable descriptor pooling and shader pipeline caching, stabilizing execution across long synthesis streams.</p>
302
-
303
- <h4>3. Subprocess IPC Architecture for Audio Playback</h4>
304
- <p>In-process audio playback via native libraries frequently triggered memory corruption and GIL deadlocks on Android Bionic. Termux-TTS orchestrates playback using isolated subprocess worker pools, safeguarding the primary application runtime.</p>
305
-
306
- changelog:
307
- - version: "v1.3.0"
308
- date: "2026-09-05"
309
- title: "Production 4-Tier Synthesizer & Studio Vulkan GPU Acceleration"
310
- type: "Production Release (Latest)"
311
- changes:
312
- - "Implemented Tier 4 Pure Vulkan GPU Neural Engine (sherpa-ncnn-offline-tts-vulkan) with zero CPU fallback."
313
- - "Integrated studio-grade reference model (vits-piper-en_US-lessac-high-fp16, 22.05kHz 16-bit PCM)."
314
- - "Implemented 1-click automated provisioning toolchain (termux-tts install --tier high/medium) downloading ARM64 native binaries from GitHub Release."
315
- - "Resolved ARM Mali-G68 subgroup size 16 shader integer truncation and Adreno 830 pipeline cache crashes."
316
- - "Achieved empirical RTF 0.264x on Galaxy S25 Adreno 830 and RTF 1.146x on Galaxy A35 Mali-G68."
317
- - "Unified cross-platform CLI, Python SDK, and Node.js / TypeScript runtime bindings."
318
-
319
- - version: "v1.1.5"
320
- date: "2026-09-04"
321
- title: "Subprocess Isolation & Conversational Tag Expansion"
322
- type: "Stable Release"
323
- changes:
324
- - "Implemented subprocess IPC audio playback isolation."
325
- - "Added expressive conversational token handling."
326
- - "Stabilized Termux-API native bridge integration."
327
-
328
- readme_content: |
329
- # Termux-TTS
330
-
331
- [![PyPI](https://img.shields.io/pypi/v/termux-tts.svg?style=flat-square&color=0369a1)](https://pypi.org/project/termux-tts/)
332
- [![Python](https://img.shields.io/pypi/pyversions/termux-tts.svg?style=flat-square)](https://pypi.org/project/termux-tts/)
333
- [![npm](https://img.shields.io/npm/v/termux-tts.svg?style=flat-square&color=b91c1c)](https://www.npmjs.com/package/termux-tts)
334
- [![License](https://img.shields.io/badge/License-Apache_2.0-004499.svg?style=flat-square)](https://github.com/uno-km/termux-tts)
335
-
336
- > Production-Grade 4-Tier On-Device Speech Synthesis Framework (Zero-Dependency DSP Formant, C++ Vulkan GPU Neural Engine & Android Native Voice Bridge)
337
-
338
- ---
339
-
340
- ## Architecture & Overview
341
-
342
- Termux-TTS is an enterprise-grade, on-device text-to-speech framework optimized for mobile edge hardware and Android Termux environments. Built to eliminate heavy dependency stacks and fragile driver behaviors, it features a resilient 4-Tier architecture:
343
-
344
- - **Tier 1: Zero-Dependency Parametric DSP Formant Vocoder**: 0MB disk footprint, Rosenberg glottal pulse formulation, and 5-band biquad formant filters providing deterministic speech synthesis in under 50 milliseconds (RTF 0.013x).
345
- - **Tier 2: Android System Native Voice Bridge**: Direct IPC integration to physical Samsung and Google speech engines via the Termux-API service layer.
346
- - **Tier 3: Subprocess-Isolated Sherpa C++ CPU Engine**: Subprocess-isolated VITS acoustic modeling on ARM64 NEON with memory leak protection.
347
- - **Tier 4: Pure Vulkan GPU Hardware Neural Engine**: High-performance GPU tensor synthesis via precompiled native C++ binaries (`sherpa-ncnn-offline-tts-vulkan`) running high-resolution studio models (`vits-piper-en_US-lessac-high-fp16`) with zero silent CPU fallback.
348
-
349
- ---
350
-
351
- ## Empirical Hardware Benchmarks (Physical Devices)
352
-
353
- Measurements gathered on physical Android 16 hardware running Termux ARM64:
354
-
355
- | Target Device | Hardware Architecture | Synthesis Engine | Model Profile | Audio Length | Synthesis Time | Real-Time Factor (RTF) | Status |
356
- | :--- | :--- | :--- | :--- | :---: | :---: | :---: | :---: |
357
- | **Galaxy S25** | Snapdragon 8 Elite / Adreno 830 | Vulkan GPU Neural | `lessac-high-fp16` | 6.70 s | **6.65 s** | **0.993x** | Validated |
358
- | **Galaxy S25** | Snapdragon 8 Elite / Adreno 830 | Vulkan GPU Neural | `lessac-medium` | 4.59 s | **1.21 s** | **0.264x** | Validated |
359
- | **Galaxy A35** | Exynos 1380 / Mali-G68 MP5 | Vulkan GPU Neural | `lessac-medium` | 4.52 s | **5.18 s** | **1.146x** | Validated |
360
- | **Galaxy A35** | Exynos 1380 / Mali-G68 MP5 | Vulkan GPU Neural | `lessac-high-fp16` | 6.73 s | **34.33 s** | **5.098x** | Validated |
361
- | **ARM64 CPU** | Cortex-A78 / A55 | Parametric DSP | 5-Band Biquad | 4.15 s | **0.054 s** | **0.0130x** | Validated |
362
-
363
- ---
364
-
365
- ## Installation & 1-Click Provisioning
366
-
367
- ### 1. Package Installation
368
- ```bash
369
- # Python SDK & CLI
370
- pip install termux-tts
371
-
372
- # Node.js / TypeScript
373
- npm install termux-tts
374
- ```
375
-
376
- ### 2. Automated Engine & Weights Provisioning
377
- Automate the installation of precompiled ARM64 Vulkan C++ binaries and HuggingFace weights with self-test verification:
378
- ```bash
379
- # Install Studio Tier (22.05kHz High-Fidelity)
380
- termux-tts install --tier high
381
-
382
- # Or install Medium Tier (Balanced Performance)
383
- termux-tts install --tier medium
384
- ```
385
-
386
- ---
387
-
388
- ## Quickstart
389
-
390
- ### Global Command-Line Interface (CLI)
391
- ```bash
392
- # Synthesize using Vulkan GPU with speaker playback
393
- termux-tts synth -e vulkan --tier high -t "Speech synthesis via Vulkan GPU." -o out.wav --play
394
-
395
- # Instant DSP Formant synthesis
396
- termux-tts synth -e dsp -t "Zero dependency DSP synthesis." -o dsp.wav
397
-
398
- # Direct hardware speaker broadcast
399
- termux-tts speak -t "Hardware speaker broadcast." -l en
400
-
401
- # Hardware diagnostics
402
- termux-tts doctor
403
- ```
404
-
405
- ### Python SDK
406
- ```python
407
- import termux_tts as tts
408
-
409
- # High-Resolution Vulkan GPU Neural Synthesis
410
- with tts.load(engine="vulkan", model_tier="high") as engine:
411
- result = engine.synthesize("Pure Vulkan neural execution on mobile.", output="speech.wav")
412
- print(f"Synthesized in {result.elapsed_ms:.1f}ms (RTF: {result.rtf:.4f}x)")
413
-
414
- # Zero-Dependency DSP Formant Synthesis
415
- with tts.load(engine="dsp", preset="balanced") as engine:
416
- result = engine.synthesize("Instant speech without model downloads.", output="dsp.wav")
417
- print(f"DSP Latency: {result.elapsed_ms:.1f}ms")
418
- ```
419
-
420
- ### Node.js / TypeScript
421
- ```typescript
422
- import * as tts from 'termux-tts';
423
-
424
- async function main() {
425
- const engine = tts.load({ engine: 'vulkan', tier: 'high' });
426
- const res = await engine.synthesize("High performance speech synthesis.", { output: "speech.wav" });
427
- console.log(`Synthesized in ${res.elapsedMs}ms`);
428
- }
429
- main();
430
- ```
431
-
432
- ---
433
-
434
- ## Official Documentation & Benchmarks
435
- - [Official Architecture & API Reference](https://uno-km.vercel.app/lib/tts/)
436
- - [Ecosystem Metrics & Registry Stats](https://uno-km.vercel.app/foundation/metrics)
437
- - [AMEVA Open-Source Foundation Portal](https://uno-km.vercel.app/foundation/index.html)
438
-
439
- ---
440
-
441
- ## License
442
- Licensed under the Apache-2.0 License. Copyright (c) 2026 Eunho Kim ([@uno-km](https://github.com/uno-km)).
443
-
444
- readme_pypi_content: |
445
- # Termux-TTS (Python)
446
-
447
- [![PyPI](https://img.shields.io/pypi/v/termux-tts.svg?style=flat-square&color=0369a1)](https://pypi.org/project/termux-tts/)
448
- [![Python](https://img.shields.io/pypi/pyversions/termux-tts.svg?style=flat-square)](https://pypi.org/project/termux-tts/)
449
- [![License](https://img.shields.io/badge/License-Apache_2.0-004499.svg?style=flat-square)](https://github.com/uno-km/termux-tts)
450
-
451
- > Production-Grade 4-Tier On-Device Speech Synthesis Framework for Mobile & Edge (Zero-Dependency DSP Formant, C++ Vulkan GPU Neural Engine & Android Native Voice Bridge)
452
-
453
- ## Installation
454
-
455
- ```bash
456
- pip install termux-tts
457
- ```
458
-
459
- ### 1-Click Automated Engine Provisioning
460
- ```bash
461
- termux-tts install --tier high
462
- ```
463
-
464
- ## Quickstart
465
-
466
- ```python
467
- import termux_tts as tts
468
-
469
- # 1. Studio Vulkan GPU Neural Engine
470
- with tts.load(engine="vulkan", model_tier="high") as engine:
471
- result = engine.synthesize("Neural speech synthesis on mobile GPU.", output="speech.wav")
472
- print(f"Elapsed: {result.elapsed_ms:.1f}ms (RTF: {result.rtf:.4f}x)")
473
-
474
- # 2. Zero-Dependency DSP Formant Mode
475
- with tts.load(engine="dsp", preset="balanced") as engine:
476
- result = engine.synthesize("Instant speech generation.", output="dsp.wav")
477
- print(f"DSP Latency: {result.elapsed_ms:.1f}ms")
478
-
479
- # 3. Direct Android Native Speaker Output
480
- with tts.load(engine="native", language="en") as engine:
481
- engine.speak("Direct hardware speaker output.")
482
- ```
483
-
484
- ## Benchmarks (Physical Devices)
485
-
486
- | Target Device | Hardware Architecture | Synthesis Engine | Real-Time Factor (RTF) | Status |
487
- | :--- | :--- | :--- | :---: | :---: |
488
- | **Galaxy S25** | Snapdragon 8 Elite / Adreno 830 | Vulkan GPU (`lessac-high-fp16`) | **0.993x** | Validated |
489
- | **Galaxy S25** | Snapdragon 8 Elite / Adreno 830 | Vulkan GPU (`lessac-medium`) | **0.264x** | Validated |
490
- | **Galaxy A35** | Exynos 1380 / Mali-G68 MP5 | Vulkan GPU (`lessac-medium`) | **1.146x** | Validated |
491
- | **ARM64 CPU** | All Core Profiles | Parametric DSP Formant | **0.0130x** | Validated |
492
-
493
- ## Documentation
494
- - [Official Documentation & API Reference](https://uno-km.vercel.app/lib/tts/)
495
- - [GitHub Repository](https://github.com/uno-km/termux-tts)
496
-
497
- ## License
498
- Apache-2.0 License. Copyright (c) 2026 Eunho Kim (@uno-km).
499
-
500
- readme_npm_content: |
501
- # Termux-TTS (Node.js & TypeScript)
502
-
503
- [![npm](https://img.shields.io/npm/v/termux-tts.svg?style=flat-square&color=b91c1c)](https://www.npmjs.com/package/termux-tts)
504
- [![License](https://img.shields.io/badge/License-Apache_2.0-004499.svg?style=flat-square)](https://github.com/uno-km/termux-tts)
505
-
506
- > Production-Grade 4-Tier On-Device Speech Synthesis Framework for Mobile & Edge (Zero-Dependency DSP Formant, C++ Vulkan GPU Neural Engine & Android Native Voice Bridge)
507
-
508
- ## Installation
509
-
510
- ```bash
511
- npm install termux-tts
512
- ```
513
-
514
- ## Quickstart
515
-
516
- ```typescript
517
- import * as tts from 'termux-tts';
518
-
519
- async function main() {
520
- const engine = tts.load({ engine: 'vulkan', tier: 'high' });
521
- const res = await engine.synthesize("High performance speech synthesis on mobile.", { output: "output.wav" });
522
- console.log(`Synthesized: ${res.durationSec}s in ${res.elapsedMs}ms (RTF: ${res.rtf}x)`);
523
- }
524
- main();
525
- ```
526
-
527
- ## Documentation
528
- - [Official Documentation & API Reference](https://uno-km.vercel.app/lib/tts/)
529
- - [GitHub Repository](https://github.com/uno-km/termux-tts)
530
-
531
- ## License
532
- Apache-2.0 License. Copyright (c) 2026 Eunho Kim (@uno-km).
1
+ # ==============================================================================
2
+ # AMEVA Documentation Configuration: Termux-TTS
3
+ # Strict Compliance with AOSF-ENG-STD-2026-V1 & OpenSSF Standards
4
+ # Single Source of Truth (SSOT)
5
+ # ==============================================================================
6
+
7
+ name: "termux-tts"
8
+ display_name: "Termux-TTS"
9
+ package_name_pypi: "termux-tts"
10
+ package_name_npm: "termux-tts"
11
+ version: "v1.4.4"
12
+ release_name: "Multilingual Neural Orchestrator & Zero-Config Ergonomics"
13
+ license: "Apache-2.0"
14
+ platform: "Android ARM64 / Qualcomm Adreno & ARM Mali Vulkan 1.3 / Linux"
15
+ github_repo_url: "https://github.com/uno-km/termux-tts"
16
+
17
+ custom_pages:
18
+ - slug: "vulkan-engineering-paper"
19
+ title_en: "Vulkan C++ Engineering Paper"
20
+ title_ko: "Vulkan C++ 네이티브 가속 논문"
21
+ file: "lib/tts/vulkan-engineering-paper.html"
22
+
23
+ tagline_en: "Production-Grade 4-Tier On-Device Speech Synthesis Framework (Multilingual Neural Orchestrator, Zero-Dependency DSP Formant & C++ Acceleration)"
24
+ tagline_ko: "모바일 및 엣지 환경을 위한 프로덕션급 4-Tier 온디바이스 음성 합성 프레임워크 (다국어 신경망 오케스트레이터, 무의존성 DSP 포먼트, C++ 가속 엔진)"
25
+
26
+ why_challenge_en: "Constrained mobile edge environments frequently suffer from execution instability, excessive thermal throttling, and unpredictable runtime memory spikes when running conventional deep learning text-to-speech stacks. Heavyweight dependencies like full PyTorch or unoptimized runtime graph compilers exhaust mobile DRAM, while cross-language code-switching historically required multiple disconnected runtimes or heavy cloud APIs."
27
+ why_challenge_ko: "제약된 모바일 엣지 환경에서는 과도한 메모리 점유, 발열 스로틀링, 드라이버 파편화로 인해 생성형 음성 합성 모델 구동이 불안정합니다. 기존 무거운 프레임워크는 수 기가바이트의 런타임 의존성으로 모바일 OOM을 유발하며, 다국어 교차 발화(한/영/일 등)는 단일 기기 로컬에서 매끄럽게 처리하기 어려웠습니다."
28
+
29
+ description_en: "Termux-TTS delivers a resilient 4-Tier on-device text-to-speech architecture designed for deterministic latency, zero-config ergonomics, and multi-language acoustic fidelity. It bridges lightweight parametric DSP synthesis (<50ms compute, 0MB model download) with high-fidelity resident C-API multilingual neural models (9 languages including Korean, English, Japanese, Hindi, and Russian at 22.05kHz), alongside Android system native speech service routing. With automated 1-click provisioning, Unicode script classification, and resident in-memory model caching, Termux-TTS achieves high acoustic fidelity with sub-0.18x real-time factor."
30
+ description_ko: "Termux-TTS는 결정론적 지연 시간, Zero-Config 사용성, 다국어 고품질 음향을 실현하는 프로덕션급 4-Tier 온디바이스 음성 합성 프레임워크입니다. 0MB 무의존성 파라메트릭 DSP 보코더부터 9개 공식 언어(한국어, 영어, 일본어, 힌디어, 러시아어 등)를 지원하는 레지던트 C-API 다국어 신경망 오케스트레이터, 그리고 안드로이드 네이티브 음성 브릿지까지 통합 제공합니다."
31
+
32
+ quick_install_cmd: |
33
+ pip install termux-tts
34
+ # or: npm install termux-tts
35
+ # 1-Click Provision Default Models (Korean KSS + English Lessac):
36
+ termux-tts install
37
+ # On-demand provision specific languages (e.g. Hindi, Japanese, Russian, or all):
38
+ termux-tts install --models hi
39
+ # Instant speech synthesis:
40
+ termux-tts "Hello 방가방가 나는 parrot 이라고 해." -o out.wav --play
41
+
42
+ features:
43
+ - title_en: "Multilingual Neural Orchestrator"
44
+ desc_en: "Dynamic cross-language code-switching and single-language synthesis supporting 9 official languages (Korean, English, Japanese, Chinese, Hindi, Russian, Spanish, French, German) with 50ms context-aware pause padding."
45
+ title_ko: "다국어 신경망 오케스트레이터"
46
+ desc_ko: "한국어, 영어, 일본어, 중국어, 힌디어, 러시아어, 스페인어, 프랑스어, 독일어 9대 언어의 다국어 교차 발화 및 단독 발화를 50ms 문맥 묵음 패딩과 함께 실시간 합성합니다."
47
+ - title_en: "Resident C-API In-Memory Acceleration"
48
+ desc_en: "Native C-API residency with SherpaResidentManager eliminates subprocess startup latency and achieves sub-0.18x real-time factor with ARM NEON SIMD acceleration."
49
+ title_ko: "레지던트 C-API 인메모리 가속"
50
+ desc_ko: "SherpaResidentManager를 통한 C-API 모델 인메모리 상주로 프로세스 기동 지연을 전면 배제하고 ARM NEON SIMD 가속으로 0.18x 이하의 RTF를 달성합니다."
51
+ - title_en: "Zero-Config CLI Ergonomics"
52
+ desc_en: "Top-level speech synthesis by default (termux-tts 'Hello' --play) without requiring subcommands or explicit engine flags. Explicit 'speak' command routes to Android native system voice."
53
+ title_ko: "Zero-Config CLI 사용성"
54
+ desc_ko: "서브 커맨드나 엔진 플래그 없이 문장을 직접 입력(termux-tts '문장' --play)하면 즉시 신경망 합성이 수행되며, 안드로이드 시스템 음성은 'speak'로 명시 분기합니다."
55
+ - title_en: "On-Demand Self-Healing Provisioner"
56
+ desc_en: "1-Click automated provisioning (termux-tts install --models default/hi/ja/ru/zh/all) with actionable English guidance and absolute paths for uninstalled models."
57
+ title_ko: "온디맨드 자가 치유 프로비저너"
58
+ desc_ko: "최초 설치 시 기본 모델(한/영)만 경량 배포하고, 미설치 언어 호출 시 절대 경로와 함께 즉시 복구 가능한 영문 안내문 및 온디맨드 설치 명령을 제공합니다."
59
+ - title_en: "4-Tier Resilient Architecture"
60
+ desc_en: "Tier 1: Zero-Dependency Parametric DSP Formant (0MB footprint). Tier 2: Android Native System Voice Bridge. Tier 3: Subprocess-Isolated Sherpa C++ CPU Engine. Tier 4: Pure Vulkan GPU Hardware Neural Acceleration."
61
+ title_ko: "4-Tier 복원형 합성 아키텍처"
62
+ desc_ko: "Tier 1 무의존성 DSP 포먼트, Tier 2 안드로이드 네이티브 음성 브릿지, Tier 3 격리형 Sherpa CPU 엔진, Tier 4 순수 Vulkan GPU 하드웨어 신경망 가속."
63
+ - title_en: "1-Click Automated Provisioning"
64
+ desc_en: "Command-line provisioning (termux-tts install --tier high/medium) automatically resolves precompiled ARM64 native binaries and HuggingFace weights with self-test verification."
65
+ title_ko: "1-클릭 자동 프로비저닝"
66
+ desc_ko: "명령어 1회로 ARM64 네이티브 바이너리와 허깅페이스 가중치를 자동 감지 및 설치하고 자체 진단 테스트를 완결합니다."
67
+ - title_en: "Studio-Grade FP16 Neural Fidelity"
68
+ desc_en: "Native support for high-resolution 22.05kHz 16-bit PCM studio models (vits-piper-en_US-lessac-high-fp16), delivering natural prosody on mobile hardware."
69
+ title_ko: "스튜디오급 FP16 고음질 신경망"
70
+ desc_ko: "22.05kHz 16비트 PCM 고해상도 레퍼런스 모델을 지원하여 극도로 자연스러운 억양과 음향 충실도를 모바일 단말기에서 제공합니다."
71
+ - title_en: "Pure Vulkan GPU Acceleration (Zero CPU Fallback)"
72
+ desc_en: "Direct GPU tensor compute via Vulkan 1.3 pipeline caching, fully resolving Qualcomm Adreno 830 and ARM Mali-G68 shader driver anomalies without silent CPU fallback."
73
+ title_ko: "순수 Vulkan GPU 가속 (Zero CPU 침묵 폴백)"
74
+ desc_ko: "침묵 폴백 없이 Qualcomm Adreno 830 및 ARM Mali-G68의 셰이더 드라이버 결함을 완전 해소하고 순수 GPU 텐서 연산을 수행합니다."
75
+ - title_en: "Subprocess IPC Memory Isolation"
76
+ desc_en: "Architectural separation of audio synthesis and OpenSL ES playback threads via subprocess IPC prevents Python GIL contention and memory corruption."
77
+ title_ko: "프로세스 격리형 메모리 보호"
78
+ desc_ko: "음성 합성 파이프라인과 오디오 재생 스레드를 서브프로세스 IPC로 분리하여 GIL 병목 및 메모리 오염을 원천 차단합니다."
79
+ - title_en: "Unified Cross-Language Toolchain"
80
+ desc_en: "Identical functional parity and strict typing across Global CLI, Python 3.10+ SDK, and Node.js / TypeScript runtime bindings."
81
+ title_ko: "통합 크로스 랭귀지 툴체인"
82
+ desc_ko: "Global CLI, Python 3.10+ SDK, Node.js / TypeScript 런타임 간 완전한 기능 동등성과 타입 안전성을 보장합니다."
83
+
84
+ matrix_table:
85
+ - category: "Tier 1: DSP Formant"
86
+ operations: "Rosenberg Glottal Pulse, 5-Band Biquad Filter, Sino-Korean Numeral Normalizer"
87
+ status: "Production (<50ms)"
88
+ - category: "Tier 2: Native Bridge"
89
+ operations: "Termux-API / Android TTS Service IPC (Samsung/Google Engine)"
90
+ status: "Production (Immediate)"
91
+ - category: "Tier 3: CPU Neural"
92
+ operations: "Sherpa C++ Subprocess-Isolated VITS Engine (ARM64 NEON)"
93
+ status: "Production (RTF 0.4~1.2x)"
94
+ - category: "Tier 4: Vulkan GPU"
95
+ operations: "C++ Vulkan Pipeline Caching, Mali Quirk Handling, Adreno Subgroup 64"
96
+ status: "Production (RTF 0.26x)"
97
+
98
+ code_example_py: |
99
+ import termux_tts as tts
100
+
101
+ # 1. Zero-Config Multilingual Neural Synthesis (Korean + English Code-Switching)
102
+ with tts.load() as engine:
103
+ result = engine.synthesize(
104
+ "Hello 방가방가 키키키키 나는 parrot 이라고 해. Natural cross-language neural voice.",
105
+ output="multilingual.wav"
106
+ )
107
+ print(f"Synthesized {result.duration_sec:.2f}s in {result.elapsed_ms:.1f}ms (RTF: {result.rtf:.4f}x)")
108
+
109
+ # 2. Pure Vulkan GPU Neural Synthesis (Studio Tier)
110
+ with tts.load(engine="vulkan", model_tier="high") as engine:
111
+ result = engine.synthesize(
112
+ "The neural speech synthesis engine is operating with pure Vulkan hardware acceleration.",
113
+ output="studio_vulkan.wav"
114
+ )
115
+ print(f"Synthesized {result.duration_sec:.2f}s in {result.elapsed_ms:.1f}ms (RTF: {result.rtf:.4f}x)")
116
+
117
+ # 3. Instant Zero-Dependency DSP Formant Synthesis
118
+ with tts.load(engine="dsp", preset="balanced") as engine:
119
+ result = engine.synthesize("Instant speech generation with zero external weights.", output="dsp.wav")
120
+ print(f"DSP Synthesis Latency: {result.elapsed_ms:.1f}ms")
121
+
122
+ # 4. Direct Android Hardware Speaker Playback
123
+ with tts.load(engine="native", language="en") as engine:
124
+ engine.speak("Direct hardware speaker output via Android native service.")
125
+
126
+ code_example_js: |
127
+ const tts = require('termux-tts');
128
+
129
+ async function main() {
130
+ // 1. Initialize Vulkan GPU Neural Engine
131
+ const engine = tts.load({ engine: 'vulkan', tier: 'high' });
132
+ const res = await engine.synthesize(
133
+ "High-performance speech synthesis on mobile hardware.",
134
+ { output: "vulkan_output.wav" }
135
+ );
136
+ console.log(`Generated: ${res.durationSec}s in ${res.elapsedMs}ms (RTF: ${res.rtf}x)`);
137
+
138
+ // 2. Hardware Diagnostics
139
+ const diag = await tts.doctor();
140
+ console.log(`Vulkan GPU Device: ${diag.device_name} (API: ${diag.api_version})`);
141
+ }
142
+ main();
143
+
144
+ benchmarks:
145
+ headers: ["Hardware Target", "SoC / GPU Architecture", "Synthesis Engine", "Audio Duration", "Compute Latency", "Real-Time Factor (RTF)", "Execution Status"]
146
+ rows:
147
+ - ["Galaxy S25", "Snapdragon 8 Elite / Adreno 830", "Vulkan GPU (high-fp16)", "6.70 s", "6.65 s", "0.993x", "Validated (Real-time)"]
148
+ - ["Galaxy S25", "Snapdragon 8 Elite / Adreno 830", "Vulkan GPU (medium)", "4.59 s", "1.21 s", "0.264x", "Validated (3.79x faster)"]
149
+ - ["Galaxy A35", "Exynos 1380 / ARM Mali-G68 MP5", "Vulkan GPU (medium)", "4.52 s", "5.18 s", "1.146x", "Validated (Stable)"]
150
+ - ["Galaxy A35", "Exynos 1380 / ARM Mali-G68 MP5", "Vulkan GPU (high-fp16)", "6.73 s", "34.33 s", "5.098x", "Validated (High Fidelity)"]
151
+ - ["Heterogeneous ARM64", "Cortex-A78 / A55 CPU Core", "Zero-Dep DSP Formant", "4.15 s", "0.054 s", "0.0130x", "Validated (Instant)"]
152
+ - ["Android Physical Speaker", "AudioTrack / OpenSL ES Bridge", "Android Native Service", "N/A", "0.012 s", "0.0020x", "Validated (Hardware Out)"]
153
+
154
+ api_reference:
155
+ - symbol: "termux_tts.load(engine='auto'|'vulkan'|'sherpa'|'dsp'|'native', model_tier='high'|'medium', preset='balanced')"
156
+ description: "Factory initializer returning the configured synthesis engine context with resource finalization."
157
+ - symbol: "engine.synthesize(text: str, output: str = None, speed: float = 1.0, preset: str = None) -> SynthesisResult"
158
+ description: "Executes phonetic tokenization, neural/DSP acoustic modeling, and writes 16-bit PCM WAV audio."
159
+ - symbol: "engine.speak(text: str, stream: str = 'MUSIC') -> NativeResult"
160
+ description: "Routes speech synthesis directly to the physical device speakers via Android system native services."
161
+ - symbol: "termux_tts.run_installation(tier='high'|'medium', force=False) -> bool"
162
+ description: "Automated provisioning toolchain downloading native C++ binaries from GitHub Releases and HuggingFace weights."
163
+ - symbol: "termux_tts.doctor() -> DiagnosticReport"
164
+ description: "Runs rigorous 12-stage hardware diagnostics verifying Vulkan instance, GPU compute queues, and memory buffers."
165
+
166
+ installation_body: |
167
+ <h3>Standard Package Installation</h3>
168
+ <p>Install the core Python or Node.js package directly from standard package repositories:</p>
169
+ <pre><code># Python (PyPI)
170
+ pip install termux-tts
171
+
172
+ # Node.js / TypeScript (NPM)
173
+ npm install termux-tts</code></pre>
174
+
175
+ <h3>Prerequisites on Android Termux</h3>
176
+ <p>Ensure that the required system packages are installed in your Termux environment:</p>
177
+ <pre><code>pkg update && pkg install -y termux-api pulseaudio sox clang</code></pre>
178
+
179
+ <h3>1-Click Automated Engine Provisioning</h3>
180
+ <p>To enable Tier 4 Vulkan GPU neural speech synthesis without manual compilation or model downloading, run the built-in installer:</p>
181
+ <pre><code># Install High-Resolution Studio Tier (vits-piper-en_US-lessac-high-fp16, 22.05kHz)
182
+ termux-tts install --tier high
183
+
184
+ # Or install Medium Compact Tier (vits-piper-en_US-lessac-medium)
185
+ termux-tts install --tier medium</code></pre>
186
+ <p>The provisioning script downloads the precompiled native ARM64 C++ binary (<code>sherpa-ncnn-offline-tts-vulkan</code>) from the official GitHub Release and verifies execution via an immediate self-test.</p>
187
+
188
+ quickstart_body: |
189
+ <h3>Command-Line Interface (CLI) Recipes</h3>
190
+ <pre><code># 1. High-Resolution Studio Neural Synthesis with Speaker Playback
191
+ termux-tts synth -e vulkan --tier high -t "Operating at full hardware capacity." -o speech.wav --play
192
+
193
+ # 2. Instant Zero-Dependency DSP Formant Synthesis
194
+ termux-tts synth -e dsp -p ultra -t "Zero dependency parametric speech synthesis." -o dsp.wav
195
+
196
+ # 3. Direct Android Hardware Speaker Broadcast
197
+ termux-tts speak -t "System notification broadcast." -l en
198
+
199
+ # 4. Hardware and Environment Diagnostics
200
+ termux-tts doctor</code></pre>
201
+
202
+ <h3>Python SDK Canon</h3>
203
+ <pre><code>import termux_tts as tts
204
+
205
+ # Initialize pure Vulkan GPU neural synthesis engine
206
+ with tts.load(engine="vulkan", model_tier="high") as engine:
207
+ res = engine.synthesize("Validating deterministic tensor execution.", output="out.wav")
208
+ print(f"Elapsed: {res.elapsed_ms:.1f}ms | RTF: {res.rtf:.4f}x")</code></pre>
209
+
210
+ api_body: |
211
+ <h3>Factory Gateway</h3>
212
+ <table class="data-table">
213
+ <thead>
214
+ <tr><th>Symbol</th><th>Signature</th><th>Description</th></tr>
215
+ </thead>
216
+ <tbody>
217
+ <tr>
218
+ <td><code>termux_tts.load</code></td>
219
+ <td><code>(engine: str = 'auto', model_tier: str = 'high', preset: str = 'balanced', language: str = 'en')</code></td>
220
+ <td>Initializes and returns the unified TTS engine instance. Supports context manager pattern.</td>
221
+ </tr>
222
+ <tr>
223
+ <td><code>termux_tts.run_installation</code></td>
224
+ <td><code>(tier: str = 'high', force: bool = False) -> bool</code></td>
225
+ <td>1-click provisioning tool downloading native ARM64 C++ binaries and model weights.</td>
226
+ </tr>
227
+ <tr>
228
+ <td><code>termux_tts.doctor</code></td>
229
+ <td><code>() -> DiagnosticReport</code></td>
230
+ <td>Executes comprehensive 12-stage Vulkan and system diagnostics.</td>
231
+ </tr>
232
+ </tbody>
233
+ </table>
234
+
235
+ <h3>Engine Methods</h3>
236
+ <table class="data-table">
237
+ <thead>
238
+ <tr><th>Method</th><th>Parameters</th><th>Return Type</th><th>Description</th></tr>
239
+ </thead>
240
+ <tbody>
241
+ <tr>
242
+ <td><code>synthesize</code></td>
243
+ <td><code>(text: str, output: str = None, speed: float = 1.0, preset: str = None)</code></td>
244
+ <td><code>SynthesisResult</code></td>
245
+ <td>Synthesizes text into 16-bit linear PCM WAV audio.</td>
246
+ </tr>
247
+ <tr>
248
+ <td><code>speak</code></td>
249
+ <td><code>(text: str, stream: str = 'MUSIC')</code></td>
250
+ <td><code>NativeResult</code></td>
251
+ <td>Transmits speech to the device speaker via Android native TTS bridge.</td>
252
+ </tr>
253
+ </tbody>
254
+ </table>
255
+
256
+ benchmarks_body: |
257
+ <h3>Empirical Dual-Device Hardware Benchmark Suite</h3>
258
+ <p>The following performance benchmarks were gathered directly on physical test devices running Android 16 under Termux ARM64 environment. Every test was conducted over repeated synthesis iterations with zero silent fallback.</p>
259
+
260
+ <table class="data-table">
261
+ <thead>
262
+ <tr>
263
+ <th>Device &amp; Hardware Profile</th>
264
+ <th>Synthesis Engine</th>
265
+ <th>Model Architecture</th>
266
+ <th>Audio Duration</th>
267
+ <th>Compute Latency</th>
268
+ <th>Real-Time Factor</th>
269
+ <th>Hardware Utilization</th>
270
+ </tr>
271
+ </thead>
272
+ <tbody>
273
+ <tr>
274
+ <td><strong>Samsung Galaxy S25</strong><br>Snapdragon 8 Elite / Adreno 830</td>
275
+ <td>Vulkan GPU Neural</td>
276
+ <td>lessac-high-fp16 (22.05kHz)</td>
277
+ <td>6.70 s</td>
278
+ <td><strong>6.65 s</strong></td>
279
+ <td><strong>0.993x</strong></td>
280
+ <td>GPU Subgroup 64 / Pure Tensor</td>
281
+ </tr>
282
+ <tr>
283
+ <td><strong>Samsung Galaxy S25</strong><br>Snapdragon 8 Elite / Adreno 830</td>
284
+ <td>Vulkan GPU Neural</td>
285
+ <td>lessac-medium (22.05kHz)</td>
286
+ <td>4.59 s</td>
287
+ <td><strong>1.21 s</strong></td>
288
+ <td><strong>0.264x</strong></td>
289
+ <td>GPU Compute / 3.79x Faster Than RT</td>
290
+ </tr>
291
+ <tr>
292
+ <td><strong>Samsung Galaxy A35</strong><br>Exynos 1380 / ARM Mali-G68 MP5</td>
293
+ <td>Vulkan GPU Neural</td>
294
+ <td>lessac-medium (22.05kHz)</td>
295
+ <td>4.52 s</td>
296
+ <td><strong>5.18 s</strong></td>
297
+ <td><strong>1.146x</strong></td>
298
+ <td>Mali Subgroup 16 / Medium Kernel</td>
299
+ </tr>
300
+ <tr>
301
+ <td><strong>Samsung Galaxy A35</strong><br>Exynos 1380 / ARM Mali-G68 MP5</td>
302
+ <td>Vulkan GPU Neural</td>
303
+ <td>lessac-high-fp16 (22.05kHz)</td>
304
+ <td>6.73 s</td>
305
+ <td><strong>34.33 s</strong></td>
306
+ <td><strong>5.098x</strong></td>
307
+ <td>Full VRAM Resident / High Fidelity</td>
308
+ </tr>
309
+ <tr>
310
+ <td><strong>Heterogeneous ARM64</strong><br>All Core Profiles</td>
311
+ <td>Parametric DSP Formant</td>
312
+ <td>5-Band Biquad Formant</td>
313
+ <td>4.15 s</td>
314
+ <td><strong>0.054 s</strong></td>
315
+ <td><strong>0.0130x</strong></td>
316
+ <td>0MB External RAM / Instant CPU</td>
317
+ </tr>
318
+ </tbody>
319
+ </table>
320
+
321
+ advanced_parameters_body: |
322
+ <h3>Architecture &amp; Hardware Driver Postmortem</h3>
323
+ <p>Operating deep learning inference models on mobile Vulkan runtimes involves navigating severe GPU driver irregularities. Below is the technical breakdown of bugs identified and permanently resolved in Termux-TTS v1.3.0:</p>
324
+
325
+ <h4>1. ARM Mali-G68 Valhall Subgroup Truncation Resolution</h4>
326
+ <p>On ARM Mali-G68 GPUs (subgroup size 16), unaligned matrix multiplication workgroups caused an integer division truncation: <code>loadstride_b = gl_WorkGroupSize.x * LOAD_VEC_B / BK = 16 * 1 / 32 = 0</code>. This resulted in an infinite loop (<code>for (uint l = 0; l &lt; BN; l += 0)</code>) leading to GPU command timeout and device loss (<code>VK_ERROR_DEVICE_LOST</code>). Termux-TTS enforces medium tile alignment and subgroup-aware shader dispatch, eliminating the loop and ensuring full 100% layer execution.</p>
327
+
328
+ <h4>2. Qualcomm Adreno 830 SPIR-V Pipeline Caching</h4>
329
+ <p>On Snapdragon 8 Elite Adreno 830 hardware, repeated runtime pipeline generation triggered JIT compiler crashes (<code>VK_ERROR_UNKNOWN -13</code>). Termux-TTS isolates model pipelines with immutable descriptor pooling and shader pipeline caching, stabilizing execution across long synthesis streams.</p>
330
+
331
+ <h4>3. Subprocess IPC Architecture for Audio Playback</h4>
332
+ <p>In-process audio playback via native libraries frequently triggered memory corruption and GIL deadlocks on Android Bionic. Termux-TTS orchestrates playback using isolated subprocess worker pools, safeguarding the primary application runtime.</p>
333
+
334
+ changelog:
335
+ - version: "v1.4.4"
336
+ date: "2026-09-14"
337
+ title: "Multilingual Neural Orchestrator & Zero-Config Ergonomics"
338
+ type: "Production Release (Latest)"
339
+ changes:
340
+ - "Implemented MultilingualNeuralEngine supporting dynamic cross-language code-switching across 9 languages (ko, en, ja, zh, hi, ru, es, fr, de)."
341
+ - "Built SherpaResidentManager for native in-memory C-API residency with sub-0.18x RTF and zero subprocess startup lag."
342
+ - "Promoted speech synthesis to default top-level subcommand, accepting positional text without '-t' or '-e multilingual'."
343
+ - "Integrated universal Unicode script classifier covering Hangul, Latin, Devanagari, Cyrillic, CJK, and Arabic scripts."
344
+ - "Enhanced 1-click installer with lightweight default models (ko+en) and on-demand provisioning (--models <lang> / all)."
345
+ - "Hardened defensive path handling with Path.expanduser() across audio exports and CLI arguments."
346
+
347
+ - version: "v1.3.0"
348
+ date: "2026-09-05"
349
+ title: "Production 4-Tier Synthesizer & Studio Vulkan GPU Acceleration"
350
+ type: "Stable Release"
351
+ changes:
352
+ - "Implemented Tier 4 Pure Vulkan GPU Neural Engine (sherpa-ncnn-offline-tts-vulkan) with zero CPU fallback."
353
+ - "Integrated studio-grade reference model (vits-piper-en_US-lessac-high-fp16, 22.05kHz 16-bit PCM)."
354
+ - "Implemented 1-click automated provisioning toolchain (termux-tts install --tier high/medium) downloading ARM64 native binaries from GitHub Release."
355
+ - "Resolved ARM Mali-G68 subgroup size 16 shader integer truncation and Adreno 830 pipeline cache crashes."
356
+ - "Achieved empirical RTF 0.264x on Galaxy S25 Adreno 830 and RTF 1.146x on Galaxy A35 Mali-G68."
357
+ - "Unified cross-platform CLI, Python SDK, and Node.js / TypeScript runtime bindings."
358
+
359
+ - version: "v1.1.5"
360
+ date: "2026-09-04"
361
+ title: "Subprocess Isolation & Conversational Tag Expansion"
362
+ type: "Archive Release"
363
+ changes:
364
+ - "Implemented subprocess IPC audio playback isolation."
365
+ - "Added expressive conversational token handling."
366
+ - "Stabilized Termux-API native bridge integration."
367
+
368
+ readme_content: |
369
+ # Termux-TTS
370
+
371
+ [![PyPI](https://img.shields.io/pypi/v/termux-tts.svg?style=flat-square&color=0369a1)](https://pypi.org/project/termux-tts/)
372
+ [![Python](https://img.shields.io/pypi/pyversions/termux-tts.svg?style=flat-square)](https://pypi.org/project/termux-tts/)
373
+ [![npm](https://img.shields.io/npm/v/termux-tts.svg?style=flat-square&color=b91c1c)](https://www.npmjs.com/package/termux-tts)
374
+ [![License](https://img.shields.io/badge/License-Apache_2.0-004499.svg?style=flat-square)](https://github.com/uno-km/termux-tts)
375
+
376
+ > Production-Grade 4-Tier On-Device Speech Synthesis Framework (Multilingual Neural Orchestrator, Zero-Dependency DSP Formant & C++ Acceleration)
377
+
378
+ ---
379
+
380
+ ## Architecture & Overview
381
+
382
+ Termux-TTS is an enterprise-grade, on-device text-to-speech framework optimized for mobile edge hardware and Android Termux environments. Built to eliminate heavy dependency stacks and fragile driver behaviors, it features a resilient 4-Tier architecture:
383
+
384
+ - **Multilingual Neural Orchestrator**: Dynamic cross-language code-switching mesh covering 9 official languages (Korean, English, Japanese, Chinese, Hindi, Russian, Spanish, French, German) with Unicode script tokenization and 50ms context-aware silence padding.
385
+ - **Resident C-API In-Memory Engine**: Direct C-API memory residency with `SherpaResidentManager` achieving sub-0.18x real-time factor with ARM NEON SIMD acceleration and zero subprocess lag.
386
+ - **Tier 1: Zero-Dependency Parametric DSP Formant Vocoder**: 0MB disk footprint, Rosenberg glottal pulse formulation, and 5-band biquad formant filters providing deterministic speech synthesis in under 50 milliseconds (RTF 0.013x).
387
+ - **Tier 2: Android System Native Voice Bridge**: Direct IPC integration to physical Samsung and Google speech engines via the Termux-API service layer.
388
+ - **Tier 3: Subprocess-Isolated Sherpa C++ CPU Engine**: Subprocess-isolated VITS acoustic modeling on ARM64 NEON with memory leak protection.
389
+ - **Tier 4: Pure Vulkan GPU Hardware Neural Engine**: High-performance GPU tensor synthesis via precompiled native C++ binaries (`sherpa-ncnn-offline-tts-vulkan`) running high-resolution studio models (`vits-piper-en_US-lessac-high-fp16`) with zero silent CPU fallback.
390
+
391
+ ---
392
+
393
+ ## Empirical Hardware Benchmarks (Physical Devices)
394
+
395
+ Measurements gathered on physical Android 16 hardware running Termux ARM64:
396
+
397
+ | Target Device | Hardware Architecture | Synthesis Engine | Model Profile | Audio Length | Synthesis Time | Real-Time Factor (RTF) | Status |
398
+ | :--- | :--- | :--- | :--- | :--- | :---: | :---: | :---: |
399
+ | **Galaxy A53** | Exynos 1280 / ARM64 NEON | Multilingual Neural C-API | `KSS + Lessac` (Bilingual) | 10.50 s | **1.82 s** | **0.173x** | Validated (5.78x RT) |
400
+ | **Galaxy S25** | Snapdragon 8 Elite / Adreno 830 | Vulkan GPU Neural | `lessac-high-fp16` | 6.70 s | **6.65 s** | **0.993x** | Validated |
401
+ | **Galaxy S25** | Snapdragon 8 Elite / Adreno 830 | Vulkan GPU Neural | `lessac-medium` | 4.59 s | **1.21 s** | **0.264x** | Validated (3.79x RT) |
402
+ | **Galaxy A35** | Exynos 1380 / Mali-G68 MP5 | Vulkan GPU Neural | `lessac-medium` | 4.52 s | **5.18 s** | **1.146x** | Validated |
403
+ | **ARM64 CPU** | Cortex-A78 / A55 | Parametric DSP | 5-Band Biquad | 4.15 s | **0.054 s** | **0.0130x** | Validated (76x RT) |
404
+
405
+ ---
406
+
407
+ ## Installation & Automated Provisioning
408
+
409
+ ### 1. Package Installation
410
+ ```bash
411
+ # Python SDK & CLI
412
+ pip install termux-tts
413
+
414
+ # Node.js / TypeScript
415
+ npm install termux-tts
416
+ ```
417
+
418
+ ### 2. Automated Model Provisioning
419
+ Automate downloading and linking precompiled models to the official immutable path (`/data/data/com.termux/files/home/models/tts/`):
420
+ ```bash
421
+ # Default lightweight installation (Korean KSS + English Lessac)
422
+ termux-tts install
423
+
424
+ # On-demand provision specific language models:
425
+ termux-tts install --models hi # Hindi (Piper Swara)
426
+ termux-tts install --models ja # Japanese (Piper Hina)
427
+ termux-tts install --models ru # Russian (Piper Dmitri)
428
+ termux-tts install --models zh # Chinese (AISHELL3)
429
+ termux-tts install --models all # All 9 official languages
430
+
431
+ # Provision Studio Vulkan GPU engine:
432
+ termux-tts install --tier high
433
+ ```
434
+
435
+ ---
436
+
437
+ ## Quickstart
438
+
439
+ ### Global Command-Line Interface (Zero-Config)
440
+ ```bash
441
+ # 1. Zero-config synthesis with physical speaker playback
442
+ termux-tts "Hello 방가방가 나는 parrot 이라고 해." -o ~/out.wav --play
443
+
444
+ # 2. Flag-based syntax
445
+ termux-tts -t "Multilingual neural speech synthesis on device." --play
446
+
447
+ # 3. Force language pinning
448
+ termux-tts -l en -t "Pure English text output." --play
449
+ termux-tts -l ko -t "한국어 단독 신경망 음성 합성." --play
450
+
451
+ # 4. Instant DSP Formant synthesis (0MB footprint)
452
+ termux-tts synth -e dsp -t "Zero dependency DSP synthesis." -o dsp.wav
453
+
454
+ # 5. Direct Android system native speaker broadcast
455
+ termux-tts speak -t "Hardware speaker broadcast via Android service."
456
+
457
+ # 6. Hardware diagnostics
458
+ termux-tts doctor
459
+ ```
460
+
461
+ ### Python SDK
462
+ ```python
463
+ import termux_tts as tts
464
+
465
+ # 1. Zero-Config Multilingual Neural Synthesis (Korean + English Code-Switching)
466
+ with tts.load() as engine:
467
+ result = engine.synthesize(
468
+ "Hello 방가방가 키키키키 나는 parrot 이라고 해.",
469
+ output="multilingual.wav"
470
+ )
471
+ print(f"Generated {result.duration_sec:.2f}s in {result.elapsed_ms:.1f}ms (RTF: {result.rtf:.4f}x)")
472
+
473
+ # 2. Pure Vulkan GPU Neural Synthesis (Studio Tier)
474
+ with tts.load(engine="vulkan", model_tier="high") as engine:
475
+ result = engine.synthesize("Pure Vulkan neural execution on mobile.", output="speech.wav")
476
+ print(f"Synthesized in {result.elapsed_ms:.1f}ms (RTF: {result.rtf:.4f}x)")
477
+
478
+ # 3. Zero-Dependency DSP Formant Synthesis
479
+ with tts.load(engine="dsp", preset="balanced") as engine:
480
+ result = engine.synthesize("Instant speech without model downloads.", output="dsp.wav")
481
+ print(f"DSP Latency: {result.elapsed_ms:.1f}ms")
482
+ ```
483
+
484
+ ### Node.js / TypeScript
485
+ ```typescript
486
+ import * as tts from 'termux-tts';
487
+
488
+ async function main() {
489
+ const engine = tts.load({ engine: 'vulkan', tier: 'high' });
490
+ const res = await engine.synthesize("High performance speech synthesis.", { output: "speech.wav" });
491
+ console.log(`Synthesized in ${res.elapsedMs}ms`);
492
+ }
493
+ main();
494
+ ```
495
+
496
+ ---
497
+
498
+ ## Official Documentation & Benchmarks
499
+ - [Official Architecture & API Reference](https://uno-km.vercel.app/lib/tts/)
500
+ - [Ecosystem Metrics & Registry Stats](https://uno-km.vercel.app/foundation/metrics)
501
+ - [AMEVA Open-Source Foundation Portal](https://uno-km.vercel.app/foundation/index.html)
502
+
503
+ ---
504
+
505
+ ## License
506
+ Licensed under the Apache-2.0 License. Copyright (c) 2026 Eunho Kim ([@uno-km](https://github.com/uno-km)).
507
+
508
+ readme_pypi_content: |
509
+ # Termux-TTS (Python)
510
+
511
+ [![PyPI](https://img.shields.io/pypi/v/termux-tts.svg?style=flat-square&color=0369a1)](https://pypi.org/project/termux-tts/)
512
+ [![Python](https://img.shields.io/pypi/pyversions/termux-tts.svg?style=flat-square)](https://pypi.org/project/termux-tts/)
513
+ [![License](https://img.shields.io/badge/License-Apache_2.0-004499.svg?style=flat-square)](https://github.com/uno-km/termux-tts)
514
+
515
+ > Production-Grade 4-Tier On-Device Speech Synthesis Framework for Mobile & Edge (Zero-Dependency DSP Formant, C++ Vulkan GPU Neural Engine & Android Native Voice Bridge)
516
+
517
+ ## Installation
518
+
519
+ ```bash
520
+ pip install termux-tts
521
+ ```
522
+
523
+ ### 1-Click Automated Engine Provisioning
524
+ ```bash
525
+ termux-tts install --tier high
526
+ ```
527
+
528
+ ## Quickstart
529
+
530
+ ```python
531
+ import termux_tts as tts
532
+
533
+ # 1. Studio Vulkan GPU Neural Engine
534
+ with tts.load(engine="vulkan", model_tier="high") as engine:
535
+ result = engine.synthesize("Neural speech synthesis on mobile GPU.", output="speech.wav")
536
+ print(f"Elapsed: {result.elapsed_ms:.1f}ms (RTF: {result.rtf:.4f}x)")
537
+
538
+ # 2. Zero-Dependency DSP Formant Mode
539
+ with tts.load(engine="dsp", preset="balanced") as engine:
540
+ result = engine.synthesize("Instant speech generation.", output="dsp.wav")
541
+ print(f"DSP Latency: {result.elapsed_ms:.1f}ms")
542
+
543
+ # 3. Direct Android Native Speaker Output
544
+ with tts.load(engine="native", language="en") as engine:
545
+ engine.speak("Direct hardware speaker output.")
546
+ ```
547
+
548
+ ## Benchmarks (Physical Devices)
549
+
550
+ | Target Device | Hardware Architecture | Synthesis Engine | Real-Time Factor (RTF) | Status |
551
+ | :--- | :--- | :--- | :---: | :---: |
552
+ | **Galaxy S25** | Snapdragon 8 Elite / Adreno 830 | Vulkan GPU (`lessac-high-fp16`) | **0.993x** | Validated |
553
+ | **Galaxy S25** | Snapdragon 8 Elite / Adreno 830 | Vulkan GPU (`lessac-medium`) | **0.264x** | Validated |
554
+ | **Galaxy A35** | Exynos 1380 / Mali-G68 MP5 | Vulkan GPU (`lessac-medium`) | **1.146x** | Validated |
555
+ | **ARM64 CPU** | All Core Profiles | Parametric DSP Formant | **0.0130x** | Validated |
556
+
557
+ ## Documentation
558
+ - [Official Documentation & API Reference](https://uno-km.vercel.app/lib/tts/)
559
+ - [GitHub Repository](https://github.com/uno-km/termux-tts)
560
+
561
+ ## License
562
+ Apache-2.0 License. Copyright (c) 2026 Eunho Kim (@uno-km).
563
+
564
+ readme_npm_content: |
565
+ # Termux-TTS (Node.js & TypeScript)
566
+
567
+ [![npm](https://img.shields.io/npm/v/termux-tts.svg?style=flat-square&color=b91c1c)](https://www.npmjs.com/package/termux-tts)
568
+ [![License](https://img.shields.io/badge/License-Apache_2.0-004499.svg?style=flat-square)](https://github.com/uno-km/termux-tts)
569
+
570
+ > Production-Grade 4-Tier On-Device Speech Synthesis Framework for Mobile & Edge (Zero-Dependency DSP Formant, C++ Vulkan GPU Neural Engine & Android Native Voice Bridge)
571
+
572
+ ## Installation
573
+
574
+ ```bash
575
+ npm install termux-tts
576
+ ```
577
+
578
+ ## Quickstart
579
+
580
+ ```typescript
581
+ import * as tts from 'termux-tts';
582
+
583
+ async function main() {
584
+ const engine = tts.load({ engine: 'vulkan', tier: 'high' });
585
+ const res = await engine.synthesize("High performance speech synthesis on mobile.", { output: "output.wav" });
586
+ console.log(`Synthesized: ${res.durationSec}s in ${res.elapsedMs}ms (RTF: ${res.rtf}x)`);
587
+ }
588
+ main();
589
+ ```
590
+
591
+ ## Documentation
592
+ - [Official Documentation & API Reference](https://uno-km.vercel.app/lib/tts/)
593
+ - [GitHub Repository](https://github.com/uno-km/termux-tts)
594
+
595
+ ## License
596
+ Apache-2.0 License. Copyright (c) 2026 Eunho Kim (@uno-km).