Metadata-Version: 2.4
Name: termux-tts
Version: 1.3.0
Summary: On-device 4-Tier Text-to-Speech framework utilizing device resources (DSP Formant Vocoder, C++ Sherpa-ONNX Neural, Android Native & Expressive)
Home-page: https://github.com/uno-km/termux-tts
Author: AMEVA Foundation
Author-email: AOSF / uno-km <zhfldk014745@naver.com>
License: Apache-2.0
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Multimedia :: Sound/Audio :: Speech
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.20.0
Requires-Dist: ameva-component-sdk<2.0,>=0.1.0
Provides-Extra: onnx
Requires-Dist: onnxruntime>=1.15.0; extra == "onnx"
Provides-Extra: neural
Requires-Dist: onnxruntime>=1.15.0; extra == "neural"
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: paramiko>=3.0; extra == "dev"
Dynamic: author
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-python

# Termux-TTS (Python)

[![PyPI](https://img.shields.io/pypi/v/termux-tts.svg?style=flat-square&color=0369a1)](https://pypi.org/project/termux-tts/)
[![Python](https://img.shields.io/pypi/pyversions/termux-tts.svg?style=flat-square)](https://pypi.org/project/termux-tts/)
[![License](https://img.shields.io/badge/License-Apache_2.0-004499.svg?style=flat-square)](https://github.com/uno-km/termux-tts)

> 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)

## Installation

```bash
pip install termux-tts
```

### 1-Click Automated Engine Provisioning
```bash
termux-tts install --tier high
```

## Quickstart

```python
import termux_tts as tts

# 1. Studio Vulkan GPU Neural Engine
with tts.load(engine="vulkan", model_tier="high") as engine:
    result = engine.synthesize("Neural speech synthesis on mobile GPU.", output="speech.wav")
    print(f"Elapsed: {result.elapsed_ms:.1f}ms (RTF: {result.rtf:.4f}x)")

# 2. Zero-Dependency DSP Formant Mode
with tts.load(engine="dsp", preset="balanced") as engine:
    result = engine.synthesize("Instant speech generation.", output="dsp.wav")
    print(f"DSP Latency: {result.elapsed_ms:.1f}ms")

# 3. Direct Android Native Speaker Output
with tts.load(engine="native", language="en") as engine:
    engine.speak("Direct hardware speaker output.")
```

## Benchmarks (Physical Devices)

| Target Device | Hardware Architecture | Synthesis Engine | Real-Time Factor (RTF) | Status |
| :--- | :--- | :--- | :---: | :---: |
| **Galaxy S25** | Snapdragon 8 Elite / Adreno 830 | Vulkan GPU (`lessac-high-fp16`) | **0.993x** | Validated |
| **Galaxy S25** | Snapdragon 8 Elite / Adreno 830 | Vulkan GPU (`lessac-medium`) | **0.264x** | Validated |
| **Galaxy A35** | Exynos 1380 / Mali-G68 MP5 | Vulkan GPU (`lessac-medium`) | **1.146x** | Validated |
| **ARM64 CPU** | All Core Profiles | Parametric DSP Formant | **0.0130x** | Validated |

## Documentation
- [Official Documentation & API Reference](https://uno-km.vercel.app/lib/tts/)
- [GitHub Repository](https://github.com/uno-km/termux-tts)

## License
Apache-2.0 License. Copyright (c) 2026 Eunho Kim (@uno-km).
