amv-tts 1.7.0__tar.gz
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.
- amv_tts-1.7.0/LICENSE +17 -0
- amv_tts-1.7.0/PKG-INFO +99 -0
- amv_tts-1.7.0/README.md +152 -0
- amv_tts-1.7.0/README.pypi.md +63 -0
- amv_tts-1.7.0/amv_tts.egg-info/PKG-INFO +99 -0
- amv_tts-1.7.0/amv_tts.egg-info/SOURCES.txt +67 -0
- amv_tts-1.7.0/amv_tts.egg-info/dependency_links.txt +1 -0
- amv_tts-1.7.0/amv_tts.egg-info/entry_points.txt +5 -0
- amv_tts-1.7.0/amv_tts.egg-info/requires.txt +14 -0
- amv_tts-1.7.0/amv_tts.egg-info/top_level.txt +1 -0
- amv_tts-1.7.0/pyproject.toml +86 -0
- amv_tts-1.7.0/setup.cfg +4 -0
- amv_tts-1.7.0/setup.py +39 -0
- amv_tts-1.7.0/termux_tts/__init__.py +103 -0
- amv_tts-1.7.0/termux_tts/__main__.py +7 -0
- amv_tts-1.7.0/termux_tts/acoustic_adaptor.py +202 -0
- amv_tts-1.7.0/termux_tts/adapter.py +204 -0
- amv_tts-1.7.0/termux_tts/audio.py +103 -0
- amv_tts-1.7.0/termux_tts/cli.py +315 -0
- amv_tts-1.7.0/termux_tts/cluster.py +219 -0
- amv_tts-1.7.0/termux_tts/control/__init__.py +6 -0
- amv_tts-1.7.0/termux_tts/control/component.py +400 -0
- amv_tts-1.7.0/termux_tts/control/errors.py +54 -0
- amv_tts-1.7.0/termux_tts/control/instances.py +139 -0
- amv_tts-1.7.0/termux_tts/control/models.py +153 -0
- amv_tts-1.7.0/termux_tts/control/status.py +15 -0
- amv_tts-1.7.0/termux_tts/downloader.py +32 -0
- amv_tts-1.7.0/termux_tts/engine.py +444 -0
- amv_tts-1.7.0/termux_tts/engine_expressive.py +218 -0
- amv_tts-1.7.0/termux_tts/engine_multilingual.py +411 -0
- amv_tts-1.7.0/termux_tts/engine_native.py +106 -0
- amv_tts-1.7.0/termux_tts/engine_onnx.py +10 -0
- amv_tts-1.7.0/termux_tts/engine_sherpa.py +468 -0
- amv_tts-1.7.0/termux_tts/engine_sherpa_capi.py +510 -0
- amv_tts-1.7.0/termux_tts/engine_sota.py +597 -0
- amv_tts-1.7.0/termux_tts/engine_vulkan.py +394 -0
- amv_tts-1.7.0/termux_tts/exceptions.py +131 -0
- amv_tts-1.7.0/termux_tts/g2p_korean.py +244 -0
- amv_tts-1.7.0/termux_tts/hardware.py +350 -0
- amv_tts-1.7.0/termux_tts/installer.py +446 -0
- amv_tts-1.7.0/termux_tts/script_classifier.py +255 -0
- amv_tts-1.7.0/termux_tts/speaker_profile.py +426 -0
- amv_tts-1.7.0/termux_tts/tokenizer.py +188 -0
- amv_tts-1.7.0/termux_tts/tokenizer_melo.py +161 -0
- amv_tts-1.7.0/termux_tts/transliteration.py +252 -0
- amv_tts-1.7.0/tests/test_acoustic_adaptor.py +93 -0
- amv_tts-1.7.0/tests/test_cli.py +105 -0
- amv_tts-1.7.0/tests/test_cli_profile.py +74 -0
- amv_tts-1.7.0/tests/test_cosyvoice2_ondevice.py +58 -0
- amv_tts-1.7.0/tests/test_expressive_presets.py +70 -0
- amv_tts-1.7.0/tests/test_f5_euler.py +78 -0
- amv_tts-1.7.0/tests/test_f5_standalone.py +90 -0
- amv_tts-1.7.0/tests/test_g2p_korean.py +75 -0
- amv_tts-1.7.0/tests/test_gpu_runtime_guard.py +77 -0
- amv_tts-1.7.0/tests/test_granular_tts.py +162 -0
- amv_tts-1.7.0/tests/test_multilingual_engine.py +149 -0
- amv_tts-1.7.0/tests/test_native_engine.py +40 -0
- amv_tts-1.7.0/tests/test_nextgen_models.py +103 -0
- amv_tts-1.7.0/tests/test_official_chattts.py +65 -0
- amv_tts-1.7.0/tests/test_official_f5_direct.py +91 -0
- amv_tts-1.7.0/tests/test_onnx_engine.py +41 -0
- amv_tts-1.7.0/tests/test_script_classifier.py +109 -0
- amv_tts-1.7.0/tests/test_sota_engines.py +143 -0
- amv_tts-1.7.0/tests/test_sota_ondevice.py +83 -0
- amv_tts-1.7.0/tests/test_speaker_profile.py +104 -0
- amv_tts-1.7.0/tests/test_tts_cluster.py +213 -0
- amv_tts-1.7.0/tests/test_tts_rpc.py +114 -0
- amv_tts-1.7.0/tests/test_vulkan_melo.py +120 -0
- amv_tts-1.7.0/tests/test_vulkan_routing.py +69 -0
amv_tts-1.7.0/LICENSE
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
Copyright 2026 UnoKim & AMEVA Open-Source Foundation
|
|
6
|
+
|
|
7
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
you may not use this file except in compliance with the License.
|
|
9
|
+
You may obtain a copy of the License at
|
|
10
|
+
|
|
11
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
|
|
13
|
+
Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
See the License for the specific language governing permissions and
|
|
17
|
+
limitations under the License.
|
amv_tts-1.7.0/PKG-INFO
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: amv-tts
|
|
3
|
+
Version: 1.7.0
|
|
4
|
+
Summary: On-device 4-Tier Text-to-Speech framework utilizing device resources (C++ Sherpa-ONNX Neural, Android Native & Expressive)
|
|
5
|
+
Home-page: https://github.com/uno-km/termux-tts
|
|
6
|
+
Author: AMEVA Foundation
|
|
7
|
+
Author-email: AOSF / uno-km <zhfldk014745@naver.com>
|
|
8
|
+
License: Apache-2.0
|
|
9
|
+
Keywords: tts,text-to-speech,vulkan,vulkan-compute,vits,piper-tts,sherpa-onnx,sherpa-ncnn,termux,android,on-device-ai,speech-synthesis,edge-ai,formant-synthesis,vocoder,mobile-ai,adreno,mali-gpu,dsp,rosenberg-glottal,biquad-filter,expressive-speech,voice-cloning,audio-generation,ncnn,arm64,snapdragon,exynos,real-time-factor,low-latency,zero-dependency,voice-assistant,headless-audio,embedded-systems
|
|
10
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Topic :: Multimedia :: Sound/Audio :: Speech
|
|
19
|
+
Requires-Python: >=3.8
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
License-File: LICENSE
|
|
22
|
+
Requires-Dist: numpy>=1.20.0
|
|
23
|
+
Provides-Extra: gpu
|
|
24
|
+
Requires-Dist: ameva-runtime>=2.0.0; extra == "gpu"
|
|
25
|
+
Provides-Extra: onnx
|
|
26
|
+
Requires-Dist: onnxruntime>=1.15.0; extra == "onnx"
|
|
27
|
+
Provides-Extra: neural
|
|
28
|
+
Requires-Dist: onnxruntime>=1.15.0; extra == "neural"
|
|
29
|
+
Provides-Extra: dev
|
|
30
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
31
|
+
Requires-Dist: paramiko>=3.0; extra == "dev"
|
|
32
|
+
Dynamic: author
|
|
33
|
+
Dynamic: home-page
|
|
34
|
+
Dynamic: license-file
|
|
35
|
+
Dynamic: requires-python
|
|
36
|
+
|
|
37
|
+
# Termux-TTS (Python)
|
|
38
|
+
|
|
39
|
+
[](https://pypi.org/project/termux-tts/)
|
|
40
|
+
[](https://pypi.org/project/termux-tts/)
|
|
41
|
+
[](https://github.com/uno-km/termux-tts)
|
|
42
|
+
|
|
43
|
+
> 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)
|
|
44
|
+
|
|
45
|
+
## Installation
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
pip install termux-tts
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### 1-Click Automated Engine Provisioning
|
|
52
|
+
```bash
|
|
53
|
+
termux-tts install --tier high
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Quickstart
|
|
57
|
+
|
|
58
|
+
```python
|
|
59
|
+
import termux_tts as tts
|
|
60
|
+
|
|
61
|
+
# 1. Studio Vulkan GPU Neural Engine
|
|
62
|
+
with tts.load(engine="vulkan", model_tier="high") as engine:
|
|
63
|
+
result = engine.synthesize("Neural speech synthesis on mobile GPU.", output="speech.wav")
|
|
64
|
+
print(f"Elapsed: {result.elapsed_ms:.1f}ms (RTF: {result.rtf:.4f}x)")
|
|
65
|
+
|
|
66
|
+
# 2. Zero-Dependency DSP Formant Mode
|
|
67
|
+
with tts.load(engine="dsp", preset="balanced") as engine:
|
|
68
|
+
result = engine.synthesize("Instant speech generation.", output="dsp.wav")
|
|
69
|
+
print(f"DSP Latency: {result.elapsed_ms:.1f}ms")
|
|
70
|
+
|
|
71
|
+
# 3. Direct Android Native Speaker Output
|
|
72
|
+
with tts.load(engine="native", language="en") as engine:
|
|
73
|
+
engine.speak("Direct hardware speaker output.")
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Benchmarks (Physical Devices)
|
|
77
|
+
|
|
78
|
+
| Target Device | Hardware Architecture | Synthesis Engine | Real-Time Factor (RTF) | Status |
|
|
79
|
+
| :--- | :--- | :--- | :---: | :---: |
|
|
80
|
+
| **Galaxy S25** | Snapdragon 8 Elite / Adreno 830 | Vulkan GPU (`lessac-high-fp16`) | **0.993x** | Validated |
|
|
81
|
+
| **Galaxy S25** | Snapdragon 8 Elite / Adreno 830 | Vulkan GPU (`lessac-medium`) | **0.264x** | Validated |
|
|
82
|
+
| **Galaxy A35** | Exynos 1380 / Mali-G68 MP5 | Vulkan GPU (`lessac-medium`) | **1.146x** | Validated |
|
|
83
|
+
| **ARM64 CPU** | All Core Profiles | Parametric DSP Formant | **0.0130x** | Validated |
|
|
84
|
+
|
|
85
|
+
## Documentation
|
|
86
|
+
- [Official Documentation & API Reference](https://uno-km.vercel.app/lib/tts/)
|
|
87
|
+
- [GitHub Repository](https://github.com/uno-km/termux-tts)
|
|
88
|
+
|
|
89
|
+
## License
|
|
90
|
+
Apache-2.0 License. Copyright (c) 2026 Eunho Kim (@uno-km).
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
## What's New in v1.7.0 — Tier 5 SOTA Neural Pipelines & Zero-Shot Voice Cloning
|
|
94
|
+
|
|
95
|
+
- Integrated Tier 5 SOTA ONNX neural synthesis pipelines: CosyVoice 2, F5-TTS, and ChatTTS INT8.
|
|
96
|
+
- Enabled on-device zero-shot voice cloning and conversational prosody control.
|
|
97
|
+
- Eliminated legacy sinusoidal fallback stubs in favor of strict fail-fast error reporting.
|
|
98
|
+
- Added speaker profile and acoustic adaptor CLI commands.
|
|
99
|
+
- Unified GPU neural vocoder dispatch through ameva-runtime HAL.
|
amv_tts-1.7.0/README.md
ADDED
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
# AMV-TTS
|
|
2
|
+
|
|
3
|
+
> **마이그레이션 안내**: 이 패키지는 `termux-tts`에서 `amv-tts`로 이름이 바뀌었습니다. 기존 `termux-tts` 배포본(PyPI/npm)은 호환을 위해 당분간 유지되나 deprecated 상태이며 더 이상 갱신되지 않습니다. `pip install amv-tts` / `npm install amv-tts`로 전환하십시오.
|
|
4
|
+
>
|
|
5
|
+
> Android **Termux 환경** 또는 **안드로이드 Linux 커널(루팅 없이 Linux 환경이 구동되는 모든 디바이스)** 에서 동작합니다 — Termux 전용이 아닙니다.
|
|
6
|
+
|
|
7
|
+
[](https://pypi.org/project/amv-tts/)
|
|
8
|
+
[](https://pypi.org/project/amv-tts/)
|
|
9
|
+
[](https://www.npmjs.com/package/amv-tts)
|
|
10
|
+
[](https://github.com/uno-km/amv-tts)
|
|
11
|
+
|
|
12
|
+
> Production-Grade 4-Tier On-Device Speech Synthesis Framework (Multilingual Neural Orchestrator, Zero-Dependency DSP Formant & C++ Acceleration)
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## What's New in v1.7.0 — Tier 5 SOTA Neural Pipelines & Zero-Shot Voice Cloning
|
|
17
|
+
|
|
18
|
+
- Integrated Tier 5 SOTA ONNX neural synthesis pipelines: CosyVoice 2, F5-TTS, and ChatTTS INT8.
|
|
19
|
+
- Enabled on-device zero-shot voice cloning and conversational prosody control.
|
|
20
|
+
- Eliminated legacy sinusoidal fallback stubs in favor of strict fail-fast error reporting.
|
|
21
|
+
- Added speaker profile and acoustic adaptor CLI commands.
|
|
22
|
+
- Unified GPU neural vocoder dispatch through ameva-runtime HAL.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Architecture & Overview
|
|
27
|
+
|
|
28
|
+
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:
|
|
29
|
+
|
|
30
|
+
- **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.
|
|
31
|
+
- **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.
|
|
32
|
+
- **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).
|
|
33
|
+
- **Tier 2: Android System Native Voice Bridge**: Direct IPC integration to physical Samsung and Google speech engines via the Termux-API service layer.
|
|
34
|
+
- **Tier 3: Subprocess-Isolated Sherpa C++ CPU Engine**: Subprocess-isolated VITS acoustic modeling on ARM64 NEON with memory leak protection.
|
|
35
|
+
- **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.
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Empirical Hardware Benchmarks (Physical Devices)
|
|
40
|
+
|
|
41
|
+
Measurements gathered on physical Android 16 hardware running Termux ARM64:
|
|
42
|
+
|
|
43
|
+
| Target Device | Hardware Architecture | Synthesis Engine | Model Profile | Audio Length | Synthesis Time | Real-Time Factor (RTF) | Status |
|
|
44
|
+
| :--- | :--- | :--- | :--- | :--- | :---: | :---: | :---: |
|
|
45
|
+
| **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) |
|
|
46
|
+
| **Galaxy S25** | Snapdragon 8 Elite / Adreno 830 | Vulkan GPU Neural | `lessac-high-fp16` | 6.70 s | **6.65 s** | **0.993x** | Validated |
|
|
47
|
+
| **Galaxy S25** | Snapdragon 8 Elite / Adreno 830 | Vulkan GPU Neural | `lessac-medium` | 4.59 s | **1.21 s** | **0.264x** | Validated (3.79x RT) |
|
|
48
|
+
| **Galaxy A35** | Exynos 1380 / Mali-G68 MP5 | Vulkan GPU Neural | `lessac-medium` | 4.52 s | **5.18 s** | **1.146x** | Validated |
|
|
49
|
+
| **ARM64 CPU** | Cortex-A78 / A55 | Parametric DSP | 5-Band Biquad | 4.15 s | **0.054 s** | **0.0130x** | Validated (76x RT) |
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## Installation & Automated Provisioning
|
|
54
|
+
|
|
55
|
+
### 1. Package Installation
|
|
56
|
+
```bash
|
|
57
|
+
# Python SDK & CLI
|
|
58
|
+
pip install amv-tts
|
|
59
|
+
|
|
60
|
+
# Node.js / TypeScript
|
|
61
|
+
npm install amv-tts
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### 2. Automated Model Provisioning
|
|
65
|
+
Automate downloading and linking precompiled models to the official immutable path (`/data/data/com.termux/files/home/models/tts/`):
|
|
66
|
+
```bash
|
|
67
|
+
# Default lightweight installation (Korean KSS + English Lessac)
|
|
68
|
+
amv-tts install
|
|
69
|
+
|
|
70
|
+
# On-demand provision specific language models:
|
|
71
|
+
amv-tts install --models hi # Hindi (Piper Swara)
|
|
72
|
+
amv-tts install --models ja # Japanese (Piper Hina)
|
|
73
|
+
amv-tts install --models ru # Russian (Piper Dmitri)
|
|
74
|
+
amv-tts install --models zh # Chinese (AISHELL3)
|
|
75
|
+
amv-tts install --models all # All 9 official languages
|
|
76
|
+
|
|
77
|
+
# Provision Studio Vulkan GPU engine:
|
|
78
|
+
amv-tts install --tier high
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## Quickstart
|
|
84
|
+
|
|
85
|
+
### Global Command-Line Interface (Zero-Config)
|
|
86
|
+
```bash
|
|
87
|
+
# 1. Zero-config synthesis with physical speaker playback
|
|
88
|
+
amv-tts "Hello 방가방가 나는 parrot 이라고 해." -o ~/out.wav --play
|
|
89
|
+
|
|
90
|
+
# 2. Flag-based syntax
|
|
91
|
+
amv-tts -t "Multilingual neural speech synthesis on device." --play
|
|
92
|
+
|
|
93
|
+
# 3. Force language pinning
|
|
94
|
+
amv-tts -l en -t "Pure English text output." --play
|
|
95
|
+
amv-tts -l ko -t "한국어 단독 신경망 음성 합성." --play
|
|
96
|
+
|
|
97
|
+
# 4. Instant DSP Formant synthesis (0MB footprint)
|
|
98
|
+
amv-tts synth -e dsp -t "Zero dependency DSP synthesis." -o dsp.wav
|
|
99
|
+
|
|
100
|
+
# 5. Direct Android system native speaker broadcast
|
|
101
|
+
amv-tts speak -t "Hardware speaker broadcast via Android service."
|
|
102
|
+
|
|
103
|
+
# 6. Hardware diagnostics
|
|
104
|
+
amv-tts doctor
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### Python SDK
|
|
108
|
+
```python
|
|
109
|
+
import termux_tts as tts
|
|
110
|
+
|
|
111
|
+
# 1. Zero-Config Multilingual Neural Synthesis (Korean + English Code-Switching)
|
|
112
|
+
with tts.load() as engine:
|
|
113
|
+
result = engine.synthesize(
|
|
114
|
+
"Hello 방가방가 키키키키 나는 parrot 이라고 해.",
|
|
115
|
+
output="multilingual.wav"
|
|
116
|
+
)
|
|
117
|
+
print(f"Generated {result.duration_sec:.2f}s in {result.elapsed_ms:.1f}ms (RTF: {result.rtf:.4f}x)")
|
|
118
|
+
|
|
119
|
+
# 2. Pure Vulkan GPU Neural Synthesis (Studio Tier)
|
|
120
|
+
with tts.load(engine="vulkan", model_tier="high") as engine:
|
|
121
|
+
result = engine.synthesize("Pure Vulkan neural execution on mobile.", output="speech.wav")
|
|
122
|
+
print(f"Synthesized in {result.elapsed_ms:.1f}ms (RTF: {result.rtf:.4f}x)")
|
|
123
|
+
|
|
124
|
+
# 3. Zero-Dependency DSP Formant Synthesis
|
|
125
|
+
with tts.load(engine="dsp", preset="balanced") as engine:
|
|
126
|
+
result = engine.synthesize("Instant speech without model downloads.", output="dsp.wav")
|
|
127
|
+
print(f"DSP Latency: {result.elapsed_ms:.1f}ms")
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### Node.js / TypeScript
|
|
131
|
+
```typescript
|
|
132
|
+
import * as tts from 'amv-tts';
|
|
133
|
+
|
|
134
|
+
async function main() {
|
|
135
|
+
const engine = tts.load({ engine: 'vulkan', tier: 'high' });
|
|
136
|
+
const res = await engine.synthesize("High performance speech synthesis.", { output: "speech.wav" });
|
|
137
|
+
console.log(`Synthesized in ${res.elapsedMs}ms`);
|
|
138
|
+
}
|
|
139
|
+
main();
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## Official Documentation & Benchmarks
|
|
145
|
+
- [Official Architecture & API Reference](https://uno-km.vercel.app/lib/tts/)
|
|
146
|
+
- [Ecosystem Metrics & Registry Stats](https://uno-km.vercel.app/foundation/metrics)
|
|
147
|
+
- [AMEVA Open-Source Foundation Portal](https://uno-km.vercel.app/foundation/index.html)
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## License
|
|
152
|
+
Licensed under the Apache-2.0 License. Copyright (c) 2026 Eunho Kim ([@uno-km](https://github.com/uno-km)).
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Termux-TTS (Python)
|
|
2
|
+
|
|
3
|
+
[](https://pypi.org/project/termux-tts/)
|
|
4
|
+
[](https://pypi.org/project/termux-tts/)
|
|
5
|
+
[](https://github.com/uno-km/termux-tts)
|
|
6
|
+
|
|
7
|
+
> 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)
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
pip install termux-tts
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
### 1-Click Automated Engine Provisioning
|
|
16
|
+
```bash
|
|
17
|
+
termux-tts install --tier high
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Quickstart
|
|
21
|
+
|
|
22
|
+
```python
|
|
23
|
+
import termux_tts as tts
|
|
24
|
+
|
|
25
|
+
# 1. Studio Vulkan GPU Neural Engine
|
|
26
|
+
with tts.load(engine="vulkan", model_tier="high") as engine:
|
|
27
|
+
result = engine.synthesize("Neural speech synthesis on mobile GPU.", output="speech.wav")
|
|
28
|
+
print(f"Elapsed: {result.elapsed_ms:.1f}ms (RTF: {result.rtf:.4f}x)")
|
|
29
|
+
|
|
30
|
+
# 2. Zero-Dependency DSP Formant Mode
|
|
31
|
+
with tts.load(engine="dsp", preset="balanced") as engine:
|
|
32
|
+
result = engine.synthesize("Instant speech generation.", output="dsp.wav")
|
|
33
|
+
print(f"DSP Latency: {result.elapsed_ms:.1f}ms")
|
|
34
|
+
|
|
35
|
+
# 3. Direct Android Native Speaker Output
|
|
36
|
+
with tts.load(engine="native", language="en") as engine:
|
|
37
|
+
engine.speak("Direct hardware speaker output.")
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Benchmarks (Physical Devices)
|
|
41
|
+
|
|
42
|
+
| Target Device | Hardware Architecture | Synthesis Engine | Real-Time Factor (RTF) | Status |
|
|
43
|
+
| :--- | :--- | :--- | :---: | :---: |
|
|
44
|
+
| **Galaxy S25** | Snapdragon 8 Elite / Adreno 830 | Vulkan GPU (`lessac-high-fp16`) | **0.993x** | Validated |
|
|
45
|
+
| **Galaxy S25** | Snapdragon 8 Elite / Adreno 830 | Vulkan GPU (`lessac-medium`) | **0.264x** | Validated |
|
|
46
|
+
| **Galaxy A35** | Exynos 1380 / Mali-G68 MP5 | Vulkan GPU (`lessac-medium`) | **1.146x** | Validated |
|
|
47
|
+
| **ARM64 CPU** | All Core Profiles | Parametric DSP Formant | **0.0130x** | Validated |
|
|
48
|
+
|
|
49
|
+
## Documentation
|
|
50
|
+
- [Official Documentation & API Reference](https://uno-km.vercel.app/lib/tts/)
|
|
51
|
+
- [GitHub Repository](https://github.com/uno-km/termux-tts)
|
|
52
|
+
|
|
53
|
+
## License
|
|
54
|
+
Apache-2.0 License. Copyright (c) 2026 Eunho Kim (@uno-km).
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
## What's New in v1.7.0 — Tier 5 SOTA Neural Pipelines & Zero-Shot Voice Cloning
|
|
58
|
+
|
|
59
|
+
- Integrated Tier 5 SOTA ONNX neural synthesis pipelines: CosyVoice 2, F5-TTS, and ChatTTS INT8.
|
|
60
|
+
- Enabled on-device zero-shot voice cloning and conversational prosody control.
|
|
61
|
+
- Eliminated legacy sinusoidal fallback stubs in favor of strict fail-fast error reporting.
|
|
62
|
+
- Added speaker profile and acoustic adaptor CLI commands.
|
|
63
|
+
- Unified GPU neural vocoder dispatch through ameva-runtime HAL.
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: amv-tts
|
|
3
|
+
Version: 1.7.0
|
|
4
|
+
Summary: On-device 4-Tier Text-to-Speech framework utilizing device resources (C++ Sherpa-ONNX Neural, Android Native & Expressive)
|
|
5
|
+
Home-page: https://github.com/uno-km/termux-tts
|
|
6
|
+
Author: AMEVA Foundation
|
|
7
|
+
Author-email: AOSF / uno-km <zhfldk014745@naver.com>
|
|
8
|
+
License: Apache-2.0
|
|
9
|
+
Keywords: tts,text-to-speech,vulkan,vulkan-compute,vits,piper-tts,sherpa-onnx,sherpa-ncnn,termux,android,on-device-ai,speech-synthesis,edge-ai,formant-synthesis,vocoder,mobile-ai,adreno,mali-gpu,dsp,rosenberg-glottal,biquad-filter,expressive-speech,voice-cloning,audio-generation,ncnn,arm64,snapdragon,exynos,real-time-factor,low-latency,zero-dependency,voice-assistant,headless-audio,embedded-systems
|
|
10
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Topic :: Multimedia :: Sound/Audio :: Speech
|
|
19
|
+
Requires-Python: >=3.8
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
License-File: LICENSE
|
|
22
|
+
Requires-Dist: numpy>=1.20.0
|
|
23
|
+
Provides-Extra: gpu
|
|
24
|
+
Requires-Dist: ameva-runtime>=2.0.0; extra == "gpu"
|
|
25
|
+
Provides-Extra: onnx
|
|
26
|
+
Requires-Dist: onnxruntime>=1.15.0; extra == "onnx"
|
|
27
|
+
Provides-Extra: neural
|
|
28
|
+
Requires-Dist: onnxruntime>=1.15.0; extra == "neural"
|
|
29
|
+
Provides-Extra: dev
|
|
30
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
31
|
+
Requires-Dist: paramiko>=3.0; extra == "dev"
|
|
32
|
+
Dynamic: author
|
|
33
|
+
Dynamic: home-page
|
|
34
|
+
Dynamic: license-file
|
|
35
|
+
Dynamic: requires-python
|
|
36
|
+
|
|
37
|
+
# Termux-TTS (Python)
|
|
38
|
+
|
|
39
|
+
[](https://pypi.org/project/termux-tts/)
|
|
40
|
+
[](https://pypi.org/project/termux-tts/)
|
|
41
|
+
[](https://github.com/uno-km/termux-tts)
|
|
42
|
+
|
|
43
|
+
> 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)
|
|
44
|
+
|
|
45
|
+
## Installation
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
pip install termux-tts
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### 1-Click Automated Engine Provisioning
|
|
52
|
+
```bash
|
|
53
|
+
termux-tts install --tier high
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Quickstart
|
|
57
|
+
|
|
58
|
+
```python
|
|
59
|
+
import termux_tts as tts
|
|
60
|
+
|
|
61
|
+
# 1. Studio Vulkan GPU Neural Engine
|
|
62
|
+
with tts.load(engine="vulkan", model_tier="high") as engine:
|
|
63
|
+
result = engine.synthesize("Neural speech synthesis on mobile GPU.", output="speech.wav")
|
|
64
|
+
print(f"Elapsed: {result.elapsed_ms:.1f}ms (RTF: {result.rtf:.4f}x)")
|
|
65
|
+
|
|
66
|
+
# 2. Zero-Dependency DSP Formant Mode
|
|
67
|
+
with tts.load(engine="dsp", preset="balanced") as engine:
|
|
68
|
+
result = engine.synthesize("Instant speech generation.", output="dsp.wav")
|
|
69
|
+
print(f"DSP Latency: {result.elapsed_ms:.1f}ms")
|
|
70
|
+
|
|
71
|
+
# 3. Direct Android Native Speaker Output
|
|
72
|
+
with tts.load(engine="native", language="en") as engine:
|
|
73
|
+
engine.speak("Direct hardware speaker output.")
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Benchmarks (Physical Devices)
|
|
77
|
+
|
|
78
|
+
| Target Device | Hardware Architecture | Synthesis Engine | Real-Time Factor (RTF) | Status |
|
|
79
|
+
| :--- | :--- | :--- | :---: | :---: |
|
|
80
|
+
| **Galaxy S25** | Snapdragon 8 Elite / Adreno 830 | Vulkan GPU (`lessac-high-fp16`) | **0.993x** | Validated |
|
|
81
|
+
| **Galaxy S25** | Snapdragon 8 Elite / Adreno 830 | Vulkan GPU (`lessac-medium`) | **0.264x** | Validated |
|
|
82
|
+
| **Galaxy A35** | Exynos 1380 / Mali-G68 MP5 | Vulkan GPU (`lessac-medium`) | **1.146x** | Validated |
|
|
83
|
+
| **ARM64 CPU** | All Core Profiles | Parametric DSP Formant | **0.0130x** | Validated |
|
|
84
|
+
|
|
85
|
+
## Documentation
|
|
86
|
+
- [Official Documentation & API Reference](https://uno-km.vercel.app/lib/tts/)
|
|
87
|
+
- [GitHub Repository](https://github.com/uno-km/termux-tts)
|
|
88
|
+
|
|
89
|
+
## License
|
|
90
|
+
Apache-2.0 License. Copyright (c) 2026 Eunho Kim (@uno-km).
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
## What's New in v1.7.0 — Tier 5 SOTA Neural Pipelines & Zero-Shot Voice Cloning
|
|
94
|
+
|
|
95
|
+
- Integrated Tier 5 SOTA ONNX neural synthesis pipelines: CosyVoice 2, F5-TTS, and ChatTTS INT8.
|
|
96
|
+
- Enabled on-device zero-shot voice cloning and conversational prosody control.
|
|
97
|
+
- Eliminated legacy sinusoidal fallback stubs in favor of strict fail-fast error reporting.
|
|
98
|
+
- Added speaker profile and acoustic adaptor CLI commands.
|
|
99
|
+
- Unified GPU neural vocoder dispatch through ameva-runtime HAL.
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
README.md
|
|
3
|
+
README.pypi.md
|
|
4
|
+
pyproject.toml
|
|
5
|
+
setup.py
|
|
6
|
+
amv_tts.egg-info/PKG-INFO
|
|
7
|
+
amv_tts.egg-info/SOURCES.txt
|
|
8
|
+
amv_tts.egg-info/dependency_links.txt
|
|
9
|
+
amv_tts.egg-info/entry_points.txt
|
|
10
|
+
amv_tts.egg-info/requires.txt
|
|
11
|
+
amv_tts.egg-info/top_level.txt
|
|
12
|
+
termux_tts/__init__.py
|
|
13
|
+
termux_tts/__main__.py
|
|
14
|
+
termux_tts/acoustic_adaptor.py
|
|
15
|
+
termux_tts/adapter.py
|
|
16
|
+
termux_tts/audio.py
|
|
17
|
+
termux_tts/cli.py
|
|
18
|
+
termux_tts/cluster.py
|
|
19
|
+
termux_tts/downloader.py
|
|
20
|
+
termux_tts/engine.py
|
|
21
|
+
termux_tts/engine_expressive.py
|
|
22
|
+
termux_tts/engine_multilingual.py
|
|
23
|
+
termux_tts/engine_native.py
|
|
24
|
+
termux_tts/engine_onnx.py
|
|
25
|
+
termux_tts/engine_sherpa.py
|
|
26
|
+
termux_tts/engine_sherpa_capi.py
|
|
27
|
+
termux_tts/engine_sota.py
|
|
28
|
+
termux_tts/engine_vulkan.py
|
|
29
|
+
termux_tts/exceptions.py
|
|
30
|
+
termux_tts/g2p_korean.py
|
|
31
|
+
termux_tts/hardware.py
|
|
32
|
+
termux_tts/installer.py
|
|
33
|
+
termux_tts/script_classifier.py
|
|
34
|
+
termux_tts/speaker_profile.py
|
|
35
|
+
termux_tts/tokenizer.py
|
|
36
|
+
termux_tts/tokenizer_melo.py
|
|
37
|
+
termux_tts/transliteration.py
|
|
38
|
+
termux_tts/control/__init__.py
|
|
39
|
+
termux_tts/control/component.py
|
|
40
|
+
termux_tts/control/errors.py
|
|
41
|
+
termux_tts/control/instances.py
|
|
42
|
+
termux_tts/control/models.py
|
|
43
|
+
termux_tts/control/status.py
|
|
44
|
+
tests/test_acoustic_adaptor.py
|
|
45
|
+
tests/test_cli.py
|
|
46
|
+
tests/test_cli_profile.py
|
|
47
|
+
tests/test_cosyvoice2_ondevice.py
|
|
48
|
+
tests/test_expressive_presets.py
|
|
49
|
+
tests/test_f5_euler.py
|
|
50
|
+
tests/test_f5_standalone.py
|
|
51
|
+
tests/test_g2p_korean.py
|
|
52
|
+
tests/test_gpu_runtime_guard.py
|
|
53
|
+
tests/test_granular_tts.py
|
|
54
|
+
tests/test_multilingual_engine.py
|
|
55
|
+
tests/test_native_engine.py
|
|
56
|
+
tests/test_nextgen_models.py
|
|
57
|
+
tests/test_official_chattts.py
|
|
58
|
+
tests/test_official_f5_direct.py
|
|
59
|
+
tests/test_onnx_engine.py
|
|
60
|
+
tests/test_script_classifier.py
|
|
61
|
+
tests/test_sota_engines.py
|
|
62
|
+
tests/test_sota_ondevice.py
|
|
63
|
+
tests/test_speaker_profile.py
|
|
64
|
+
tests/test_tts_cluster.py
|
|
65
|
+
tests/test_tts_rpc.py
|
|
66
|
+
tests/test_vulkan_melo.py
|
|
67
|
+
tests/test_vulkan_routing.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
termux_tts
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61.0"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "amv-tts"
|
|
7
|
+
version = "1.7.0"
|
|
8
|
+
description = "On-device 4-Tier Text-to-Speech framework utilizing device resources (C++ Sherpa-ONNX Neural, Android Native & Expressive)"
|
|
9
|
+
readme = "README.pypi.md"
|
|
10
|
+
requires-python = ">=3.10"
|
|
11
|
+
license = { text = "Apache-2.0" }
|
|
12
|
+
authors = [
|
|
13
|
+
{ name = "AOSF / uno-km", email = "zhfldk014745@naver.com" }
|
|
14
|
+
]
|
|
15
|
+
classifiers = [
|
|
16
|
+
"Development Status :: 5 - Production/Stable",
|
|
17
|
+
"Intended Audience :: Developers",
|
|
18
|
+
"License :: OSI Approved :: Apache Software License",
|
|
19
|
+
"Programming Language :: Python :: 3",
|
|
20
|
+
"Programming Language :: Python :: 3.10",
|
|
21
|
+
"Programming Language :: Python :: 3.11",
|
|
22
|
+
"Programming Language :: Python :: 3.12",
|
|
23
|
+
"Programming Language :: Python :: 3.13",
|
|
24
|
+
"Topic :: Multimedia :: Sound/Audio :: Speech",
|
|
25
|
+
]
|
|
26
|
+
keywords = [
|
|
27
|
+
"tts",
|
|
28
|
+
"text-to-speech",
|
|
29
|
+
"vulkan",
|
|
30
|
+
"vulkan-compute",
|
|
31
|
+
"vits",
|
|
32
|
+
"piper-tts",
|
|
33
|
+
"sherpa-onnx",
|
|
34
|
+
"sherpa-ncnn",
|
|
35
|
+
"termux",
|
|
36
|
+
"android",
|
|
37
|
+
"on-device-ai",
|
|
38
|
+
"speech-synthesis",
|
|
39
|
+
"edge-ai",
|
|
40
|
+
"formant-synthesis",
|
|
41
|
+
"vocoder",
|
|
42
|
+
"mobile-ai",
|
|
43
|
+
"adreno",
|
|
44
|
+
"mali-gpu",
|
|
45
|
+
"dsp",
|
|
46
|
+
"rosenberg-glottal",
|
|
47
|
+
"biquad-filter",
|
|
48
|
+
"expressive-speech",
|
|
49
|
+
"voice-cloning",
|
|
50
|
+
"audio-generation",
|
|
51
|
+
"ncnn",
|
|
52
|
+
"arm64",
|
|
53
|
+
"snapdragon",
|
|
54
|
+
"exynos",
|
|
55
|
+
"real-time-factor",
|
|
56
|
+
"low-latency",
|
|
57
|
+
"zero-dependency",
|
|
58
|
+
"voice-assistant",
|
|
59
|
+
"headless-audio",
|
|
60
|
+
"embedded-systems"
|
|
61
|
+
]
|
|
62
|
+
dependencies = ["numpy>=1.20.0"]
|
|
63
|
+
|
|
64
|
+
# GPU acceleration (ameva-runtime / AMUDA) is optional and not a PyPI dependency:
|
|
65
|
+
# PyPI rejects direct URL references in package metadata, and these SDKs are not
|
|
66
|
+
# yet republished on PyPI (see https://github.com/uno-km/ameva-device-sdk). The code
|
|
67
|
+
# already lazy-imports ameva_device/ameva_component and fails loud with
|
|
68
|
+
# AMU_ERR_RUNTIME_REQUIRED (exit 69) if GPU execution is requested without them.
|
|
69
|
+
# To enable GPU: pip install https://github.com/uno-km/ameva-device-sdk/releases/download/v0.2.0/ameva_device_sdk-0.2.0-py3-none-any.whl
|
|
70
|
+
|
|
71
|
+
[project.optional-dependencies]
|
|
72
|
+
gpu = ["ameva-runtime>=2.0.0"]
|
|
73
|
+
onnx = ["onnxruntime>=1.15.0"]
|
|
74
|
+
neural = ["onnxruntime>=1.15.0"]
|
|
75
|
+
dev = ["pytest>=7.0", "paramiko>=3.0"]
|
|
76
|
+
|
|
77
|
+
[project.scripts]
|
|
78
|
+
amv-tts = "termux_tts.cli:main"
|
|
79
|
+
|
|
80
|
+
[project.entry-points."ameva.components"]
|
|
81
|
+
amv-tts = "termux_tts.adapter:create_adapter"
|
|
82
|
+
|
|
83
|
+
[tool.setuptools.packages.find]
|
|
84
|
+
where = ["."]
|
|
85
|
+
include = ["termux_tts*"]
|
|
86
|
+
|
amv_tts-1.7.0/setup.cfg
ADDED
amv_tts-1.7.0/setup.py
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Copyright (c) 2026 Uno Kim / AMEVA Foundation. All rights reserved.
|
|
2
|
+
# SPDX-License-Identifier: Apache-2.0 OR Commercial-License
|
|
3
|
+
import os
|
|
4
|
+
from setuptools import setup, find_packages
|
|
5
|
+
|
|
6
|
+
setup(
|
|
7
|
+
name="termux-tts",
|
|
8
|
+
version="1.5.4",
|
|
9
|
+
description="Ultra-Fast On-Device 4-Tier Text-to-Speech Framework (DSP Synth, Android Native, C++ Sherpa-ONNX Neural & Expressive)",
|
|
10
|
+
long_description=open("README.pypi.md", encoding="utf-8").read() if os.path.exists("README.pypi.md") else open("README.md", encoding="utf-8").read(),
|
|
11
|
+
long_description_content_type="text/markdown",
|
|
12
|
+
author="AMEVA Foundation",
|
|
13
|
+
license="Apache-2.0",
|
|
14
|
+
url="https://github.com/uno-km/termux-tts",
|
|
15
|
+
packages=find_packages(include=["termux_tts", "termux_tts.*"]),
|
|
16
|
+
python_requires=">=3.8",
|
|
17
|
+
install_requires=[
|
|
18
|
+
"numpy>=1.20.0",
|
|
19
|
+
],
|
|
20
|
+
extras_require={
|
|
21
|
+
"onnx": ["onnxruntime>=1.15.0"],
|
|
22
|
+
"neural": ["onnxruntime>=1.15.0"],
|
|
23
|
+
"dev": ["pytest>=7.0.0", "pytest-asyncio"],
|
|
24
|
+
},
|
|
25
|
+
entry_points={
|
|
26
|
+
"console_scripts": [
|
|
27
|
+
"termux-tts=termux_tts.cli:main",
|
|
28
|
+
],
|
|
29
|
+
},
|
|
30
|
+
classifiers=[
|
|
31
|
+
"Development Status :: 5 - Production/Stable",
|
|
32
|
+
"Intended Audience :: Developers",
|
|
33
|
+
"License :: OSI Approved :: Apache Software License",
|
|
34
|
+
"Operating System :: Android",
|
|
35
|
+
"Operating System :: POSIX :: Linux",
|
|
36
|
+
"Programming Language :: Python :: 3",
|
|
37
|
+
"Topic :: Multimedia :: Sound/Audio :: Speech",
|
|
38
|
+
],
|
|
39
|
+
)
|