termux-stt 1.1.2 → 1.1.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/README.md +10 -7
- package/README.pypi.md +34 -0
- package/index.js +14 -0
- package/package.json +4 -1
package/README.md
CHANGED
|
@@ -118,18 +118,21 @@ chmod 755 ~/.local/bin/whisper-cli
|
|
|
118
118
|
|
|
119
119
|
### 🎙️ Try with the Included Sample Audio! (JFK 1-Minute Speech)
|
|
120
120
|
|
|
121
|
-
`termux-stt`
|
|
121
|
+
`termux-stt` provides John F. Kennedy's 1961 Inaugural Address (60.00s 16kHz Mono PCM) for instant out-of-the-box testing.
|
|
122
122
|
|
|
123
123
|
#### Option A: CLI One-Liner (Python / npm)
|
|
124
124
|
```bash
|
|
125
|
-
# 1.
|
|
126
|
-
termux-stt
|
|
125
|
+
# 1. Download official 60s sample speech
|
|
126
|
+
curl -sLO https://raw.githubusercontent.com/uno-km/termux-stt/main/samples/jfk_1min.wav
|
|
127
127
|
|
|
128
|
-
# 2. Transcribe
|
|
129
|
-
termux-stt
|
|
128
|
+
# 2. Transcribe the 60s sample speech with Whisper (auto-generates SRT subtitles)
|
|
129
|
+
termux-stt transcribe jfk_1min.wav --engine whisper --model tiny --format srt
|
|
130
130
|
|
|
131
|
-
# 3.
|
|
132
|
-
termux-stt
|
|
131
|
+
# 3. Transcribe and separate speakers (128d X-Vector Diarization)
|
|
132
|
+
termux-stt diarize jfk_1min.wav --speakers 2 --format text
|
|
133
|
+
|
|
134
|
+
# 4. Benchmark on-device latency & RTF
|
|
135
|
+
termux-stt benchmark --audio jfk_1min.wav --model tiny
|
|
133
136
|
```
|
|
134
137
|
|
|
135
138
|
#### Option B: Python SDK
|
package/README.pypi.md
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# termux-stt
|
|
2
|
+
|
|
3
|
+
> **On-Device Hybrid Speech-to-Text & Speaker Diarization Engine for Android Termux**
|
|
4
|
+
> *Whisper.cpp · Vosk · Sherpa-ONNX · Non-Root ARM64 Execution · 128d Vector Diarization*
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## ⚡ 5-Minute Quickstart
|
|
9
|
+
|
|
10
|
+
### Python Installation
|
|
11
|
+
|
|
12
|
+
`ash
|
|
13
|
+
# In Android Termux:
|
|
14
|
+
pkg update && pkg install -y python ffmpeg git
|
|
15
|
+
pip install termux-stt
|
|
16
|
+
`
|
|
17
|
+
|
|
18
|
+
### Python SDK Usage
|
|
19
|
+
|
|
20
|
+
`python
|
|
21
|
+
from termux_stt import STTEngine
|
|
22
|
+
|
|
23
|
+
engine = STTEngine(backend="whisper")
|
|
24
|
+
result = engine.transcribe("sample.wav")
|
|
25
|
+
print("Transcription:", result.text)
|
|
26
|
+
`
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## 📚 Official Documentation
|
|
31
|
+
|
|
32
|
+
- **Official Web Documentation**: [https://uno-km.vercel.app/lib/stt/](https://uno-km.vercel.app/lib/stt/)
|
|
33
|
+
- **GitHub Repository**: [https://github.com/uno-km/termux-stt](https://github.com/uno-km/termux-stt)
|
|
34
|
+
- **License**: Apache-2.0
|
package/index.js
CHANGED
|
@@ -21,7 +21,21 @@ function createEngine(engineName = 'whisper', options = {}) {
|
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
+
class TermuxSTT {
|
|
25
|
+
constructor(options = {}) {
|
|
26
|
+
const engineName = options.engine || 'whisper';
|
|
27
|
+
this.engine = createEngine(engineName, options);
|
|
28
|
+
}
|
|
29
|
+
transcribe(filePath, options = {}) {
|
|
30
|
+
return this.engine.transcribe(filePath, options);
|
|
31
|
+
}
|
|
32
|
+
diarize(filePath, options = {}) {
|
|
33
|
+
return this.engine.diarize(filePath, options);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
24
37
|
module.exports = {
|
|
38
|
+
TermuxSTT,
|
|
25
39
|
createEngine,
|
|
26
40
|
Engine,
|
|
27
41
|
TranscriptResult,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "termux-stt",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.4",
|
|
4
4
|
"description": "Production-Grade On-Device Speech-to-Text & Speaker Diarization Framework for Android Termux & Samsung Galaxy",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -46,6 +46,9 @@
|
|
|
46
46
|
"url": "https://github.com/uno-km/termux-stt/issues"
|
|
47
47
|
},
|
|
48
48
|
"homepage": "https://uno-km.github.io/termux-stt/",
|
|
49
|
+
"dependencies": {
|
|
50
|
+
"ameva-vulkan-runtime": ">=1.0.0"
|
|
51
|
+
},
|
|
49
52
|
"engines": {
|
|
50
53
|
"node": ">=16.0.0"
|
|
51
54
|
}
|