stttype 1.0.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.
stttype-1.0.0/PKG-INFO ADDED
@@ -0,0 +1,220 @@
1
+ Metadata-Version: 2.4
2
+ Name: stttype
3
+ Version: 1.0.0
4
+ Summary: Python based STT module running on GPU
5
+ Author: LucasApps
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/LucasApps/stttype
8
+ Project-URL: Issues, https://github.com/LucasApps/stttype/issues
9
+ Keywords: stt,speech-to-text,whisper,voice,typing,keyboard
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: Intended Audience :: End Users/Desktop
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Operating System :: OS Independent
14
+ Classifier: Operating System :: Microsoft :: Windows
15
+ Classifier: Operating System :: POSIX :: Linux
16
+ Classifier: Operating System :: MacOS
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.9
19
+ Classifier: Programming Language :: Python :: 3.10
20
+ Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Topic :: Multimedia :: Sound/Audio :: Speech
23
+ Classifier: Topic :: Utilities
24
+ Requires-Python: >=3.9
25
+ Description-Content-Type: text/markdown
26
+ Requires-Dist: faster-whisper>=1.0.0
27
+ Requires-Dist: sounddevice>=0.4.6
28
+ Requires-Dist: soundfile>=0.12.1
29
+ Requires-Dist: numpy>=1.24.0
30
+ Requires-Dist: pynput>=1.7.0
31
+ Requires-Dist: pyautogui>=0.9.54
32
+ Requires-Dist: pyperclip>=1.8.2
33
+ Requires-Dist: pystray>=0.19.4
34
+ Requires-Dist: pillow>=10.0.0
35
+ Provides-Extra: gpu
36
+ Requires-Dist: torch>=2.0.0; extra == "gpu"
37
+ Requires-Dist: torchaudio>=2.0.0; extra == "gpu"
38
+
39
+ # STT Type v1.0.0
40
+
41
+ **Python based STT module running on GPU.**
42
+
43
+ Hold **F2** to record your voice, release to transcribe and type the text automatically at your cursor position.
44
+
45
+ ## Features
46
+
47
+ - **Cross-platform** - Works on Windows, Linux, and macOS
48
+ - **Hold F2 to record** - Audio captures while key is held
49
+ - **Visual indicator** - Semi-transparent red dot with "F2" label appears in top-right corner while recording
50
+ - **Bell sounds** - Audio feedback when recording starts/stops
51
+ - **GPU-accelerated STT** - Uses faster-whisper on your NVIDIA GPU
52
+ - **Auto-typing** - Transcribed text is typed at cursor position
53
+ - **System tray mode** - Runs silently in background
54
+ - **Auto-startup** - Starts automatically on login
55
+
56
+ ## Requirements
57
+
58
+ - Python 3.9+
59
+ - NVIDIA GPU with CUDA support (for GPU mode)
60
+ - Microphone
61
+
62
+ ## Installation
63
+
64
+ ### Prerequisites
65
+
66
+ Install PyTorch with CUDA support:
67
+
68
+ ```bash
69
+ # Windows/Linux
70
+ pip install torch torchaudio --index-url https://download.pytorch.org/whl/cu118
71
+
72
+ # macOS (CPU only, no CUDA)
73
+ pip install torch torchaudio
74
+ ```
75
+
76
+ ### Windows
77
+
78
+ ```powershell
79
+ cd "E:\Lucas\STT Type"
80
+ .\install.ps1
81
+ ```
82
+
83
+ Then restart PowerShell.
84
+
85
+ ### Linux
86
+
87
+ ```bash
88
+ cd /path/to/stttype
89
+ chmod +x install.sh
90
+ ./install.sh
91
+ ```
92
+
93
+ If `sounddevice` fails, install PortAudio:
94
+ ```bash
95
+ # Debian/Ubuntu
96
+ sudo apt-get install portaudio19-dev
97
+
98
+ # Fedora
99
+ sudo dnf install portaudio-devel
100
+
101
+ # Arch
102
+ sudo pacman -S portaudio
103
+ ```
104
+
105
+ ### macOS
106
+
107
+ ```bash
108
+ cd /path/to/stttype
109
+ chmod +x install.sh
110
+ ./install.sh
111
+ ```
112
+
113
+ If `sounddevice` fails, install PortAudio:
114
+ ```bash
115
+ brew install portaudio
116
+ ```
117
+
118
+ **Note:** On macOS, you need to grant Accessibility permissions for `pynput` to capture global hotkeys. Go to **System Settings > Privacy & Security > Accessibility** and add your terminal application.
119
+
120
+ ## Commands
121
+
122
+ Once installed, `stttype` works from any terminal.
123
+
124
+ | Command | Description |
125
+ |---------|-------------|
126
+ | `stttype --start` | Start STT Type in background |
127
+ | `stttype --shutdown` | Stop all STT Type processes |
128
+ | `stttype --status` | Check if STT Type is running |
129
+ | `stttype --restart` | Restart STT Type |
130
+ | `stttype --addtostartup` | Add to startup |
131
+ | `stttype --rmtostartup` | Remove from startup |
132
+ | `stttype --model <size>` | Set Whisper model (tiny/base/small/medium/large-v3) |
133
+ | `stttype --lang <code>` | Set language (en/zh/auto/etc) |
134
+ | `stttype --help` | Show help |
135
+
136
+ ### Examples
137
+
138
+ ```bash
139
+ # Start with default settings
140
+ stttype --start
141
+
142
+ # Start with a larger model for better accuracy
143
+ stttype --start --model small
144
+
145
+ # Start with Chinese language
146
+ stttype --start --lang zh
147
+
148
+ # Start with small model and auto-detect language
149
+ stttype --start --model small --lang auto
150
+ ```
151
+
152
+ ## How It Works
153
+
154
+ 1. **Hold F2** - A semi-transparent red dot with "F2" appears in the top-right corner, microphone starts recording
155
+ 2. **Release F2** - Red dot disappears, recording stops
156
+ 3. **GPU transcribes** - Whisper processes audio on your NVIDIA GPU
157
+ 4. **Text is typed** - Result appears at your cursor position
158
+
159
+ ## Models
160
+
161
+ | Model | Size | VRAM | Speed | Accuracy |
162
+ |-------|------|------|-------|----------|
163
+ | `tiny` | 39 MB | ~1 GB | Fastest | Basic |
164
+ | `base` | 74 MB | ~1 GB | Fast | Good |
165
+ | `small` | 244 MB | ~2 GB | Medium | Better |
166
+ | `medium` | 769 MB | ~5 GB | Slower | Best |
167
+ | `large-v3` | 1550 MB | ~10 GB | Slowest | Excellent |
168
+
169
+ Default is `base` - a good balance of speed and accuracy.
170
+
171
+ ## Uninstall
172
+
173
+ ### Windows
174
+ ```powershell
175
+ cd "E:\Lucas\STT Type"
176
+ .\uninstall.ps1
177
+ ```
178
+
179
+ ### Linux/macOS
180
+ ```bash
181
+ cd /path/to/stttype
182
+ chmod +x uninstall.sh
183
+ ./uninstall.sh
184
+ ```
185
+
186
+ ## Troubleshooting
187
+
188
+ | Issue | Solution |
189
+ |-------|----------|
190
+ | `stttype` not found | Restart terminal after installation |
191
+ | "CUDA not available" | Install NVIDIA drivers and CUDA toolkit |
192
+ | No sound on start/stop | Check system volume |
193
+ | Text not typing | Make sure the target window is focused |
194
+ | Model download fails | Check internet connection |
195
+ | Hotkeys don't work (macOS) | Grant Accessibility permissions to your terminal |
196
+ | Hotkeys don't work (Linux) | Make sure you're running under X11 (not Wayland) |
197
+
198
+ ## Publish to PyPI
199
+
200
+ ```bash
201
+ # Install build tools
202
+ pip install build twine
203
+
204
+ # Build
205
+ cd /path/to/stttype
206
+ python -m build
207
+
208
+ # Upload
209
+ python -m twine upload dist/*
210
+ ```
211
+
212
+ When prompted:
213
+ - **Username**: `__token__`
214
+ - **Password**: Your PyPI API token
215
+
216
+ ---
217
+
218
+ **Author**: LucasApps
219
+ **Version**: 1.0.0
220
+ **License**: MIT
@@ -0,0 +1,182 @@
1
+ # STT Type v1.0.0
2
+
3
+ **Python based STT module running on GPU.**
4
+
5
+ Hold **F2** to record your voice, release to transcribe and type the text automatically at your cursor position.
6
+
7
+ ## Features
8
+
9
+ - **Cross-platform** - Works on Windows, Linux, and macOS
10
+ - **Hold F2 to record** - Audio captures while key is held
11
+ - **Visual indicator** - Semi-transparent red dot with "F2" label appears in top-right corner while recording
12
+ - **Bell sounds** - Audio feedback when recording starts/stops
13
+ - **GPU-accelerated STT** - Uses faster-whisper on your NVIDIA GPU
14
+ - **Auto-typing** - Transcribed text is typed at cursor position
15
+ - **System tray mode** - Runs silently in background
16
+ - **Auto-startup** - Starts automatically on login
17
+
18
+ ## Requirements
19
+
20
+ - Python 3.9+
21
+ - NVIDIA GPU with CUDA support (for GPU mode)
22
+ - Microphone
23
+
24
+ ## Installation
25
+
26
+ ### Prerequisites
27
+
28
+ Install PyTorch with CUDA support:
29
+
30
+ ```bash
31
+ # Windows/Linux
32
+ pip install torch torchaudio --index-url https://download.pytorch.org/whl/cu118
33
+
34
+ # macOS (CPU only, no CUDA)
35
+ pip install torch torchaudio
36
+ ```
37
+
38
+ ### Windows
39
+
40
+ ```powershell
41
+ cd "E:\Lucas\STT Type"
42
+ .\install.ps1
43
+ ```
44
+
45
+ Then restart PowerShell.
46
+
47
+ ### Linux
48
+
49
+ ```bash
50
+ cd /path/to/stttype
51
+ chmod +x install.sh
52
+ ./install.sh
53
+ ```
54
+
55
+ If `sounddevice` fails, install PortAudio:
56
+ ```bash
57
+ # Debian/Ubuntu
58
+ sudo apt-get install portaudio19-dev
59
+
60
+ # Fedora
61
+ sudo dnf install portaudio-devel
62
+
63
+ # Arch
64
+ sudo pacman -S portaudio
65
+ ```
66
+
67
+ ### macOS
68
+
69
+ ```bash
70
+ cd /path/to/stttype
71
+ chmod +x install.sh
72
+ ./install.sh
73
+ ```
74
+
75
+ If `sounddevice` fails, install PortAudio:
76
+ ```bash
77
+ brew install portaudio
78
+ ```
79
+
80
+ **Note:** On macOS, you need to grant Accessibility permissions for `pynput` to capture global hotkeys. Go to **System Settings > Privacy & Security > Accessibility** and add your terminal application.
81
+
82
+ ## Commands
83
+
84
+ Once installed, `stttype` works from any terminal.
85
+
86
+ | Command | Description |
87
+ |---------|-------------|
88
+ | `stttype --start` | Start STT Type in background |
89
+ | `stttype --shutdown` | Stop all STT Type processes |
90
+ | `stttype --status` | Check if STT Type is running |
91
+ | `stttype --restart` | Restart STT Type |
92
+ | `stttype --addtostartup` | Add to startup |
93
+ | `stttype --rmtostartup` | Remove from startup |
94
+ | `stttype --model <size>` | Set Whisper model (tiny/base/small/medium/large-v3) |
95
+ | `stttype --lang <code>` | Set language (en/zh/auto/etc) |
96
+ | `stttype --help` | Show help |
97
+
98
+ ### Examples
99
+
100
+ ```bash
101
+ # Start with default settings
102
+ stttype --start
103
+
104
+ # Start with a larger model for better accuracy
105
+ stttype --start --model small
106
+
107
+ # Start with Chinese language
108
+ stttype --start --lang zh
109
+
110
+ # Start with small model and auto-detect language
111
+ stttype --start --model small --lang auto
112
+ ```
113
+
114
+ ## How It Works
115
+
116
+ 1. **Hold F2** - A semi-transparent red dot with "F2" appears in the top-right corner, microphone starts recording
117
+ 2. **Release F2** - Red dot disappears, recording stops
118
+ 3. **GPU transcribes** - Whisper processes audio on your NVIDIA GPU
119
+ 4. **Text is typed** - Result appears at your cursor position
120
+
121
+ ## Models
122
+
123
+ | Model | Size | VRAM | Speed | Accuracy |
124
+ |-------|------|------|-------|----------|
125
+ | `tiny` | 39 MB | ~1 GB | Fastest | Basic |
126
+ | `base` | 74 MB | ~1 GB | Fast | Good |
127
+ | `small` | 244 MB | ~2 GB | Medium | Better |
128
+ | `medium` | 769 MB | ~5 GB | Slower | Best |
129
+ | `large-v3` | 1550 MB | ~10 GB | Slowest | Excellent |
130
+
131
+ Default is `base` - a good balance of speed and accuracy.
132
+
133
+ ## Uninstall
134
+
135
+ ### Windows
136
+ ```powershell
137
+ cd "E:\Lucas\STT Type"
138
+ .\uninstall.ps1
139
+ ```
140
+
141
+ ### Linux/macOS
142
+ ```bash
143
+ cd /path/to/stttype
144
+ chmod +x uninstall.sh
145
+ ./uninstall.sh
146
+ ```
147
+
148
+ ## Troubleshooting
149
+
150
+ | Issue | Solution |
151
+ |-------|----------|
152
+ | `stttype` not found | Restart terminal after installation |
153
+ | "CUDA not available" | Install NVIDIA drivers and CUDA toolkit |
154
+ | No sound on start/stop | Check system volume |
155
+ | Text not typing | Make sure the target window is focused |
156
+ | Model download fails | Check internet connection |
157
+ | Hotkeys don't work (macOS) | Grant Accessibility permissions to your terminal |
158
+ | Hotkeys don't work (Linux) | Make sure you're running under X11 (not Wayland) |
159
+
160
+ ## Publish to PyPI
161
+
162
+ ```bash
163
+ # Install build tools
164
+ pip install build twine
165
+
166
+ # Build
167
+ cd /path/to/stttype
168
+ python -m build
169
+
170
+ # Upload
171
+ python -m twine upload dist/*
172
+ ```
173
+
174
+ When prompted:
175
+ - **Username**: `__token__`
176
+ - **Password**: Your PyPI API token
177
+
178
+ ---
179
+
180
+ **Author**: LucasApps
181
+ **Version**: 1.0.0
182
+ **License**: MIT
@@ -0,0 +1,60 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "stttype"
7
+ version = "1.0.0"
8
+ description = "Python based STT module running on GPU"
9
+ readme = "README.md"
10
+ requires-python = ">=3.9"
11
+ license = {text = "MIT"}
12
+ authors = [
13
+ {name = "LucasApps"}
14
+ ]
15
+ keywords = ["stt", "speech-to-text", "whisper", "voice", "typing", "keyboard"]
16
+ classifiers = [
17
+ "Development Status :: 4 - Beta",
18
+ "Intended Audience :: End Users/Desktop",
19
+ "License :: OSI Approved :: MIT License",
20
+ "Operating System :: OS Independent",
21
+ "Operating System :: Microsoft :: Windows",
22
+ "Operating System :: POSIX :: Linux",
23
+ "Operating System :: MacOS",
24
+ "Programming Language :: Python :: 3",
25
+ "Programming Language :: Python :: 3.9",
26
+ "Programming Language :: Python :: 3.10",
27
+ "Programming Language :: Python :: 3.11",
28
+ "Programming Language :: Python :: 3.12",
29
+ "Topic :: Multimedia :: Sound/Audio :: Speech",
30
+ "Topic :: Utilities",
31
+ ]
32
+
33
+ dependencies = [
34
+ "faster-whisper>=1.0.0",
35
+ "sounddevice>=0.4.6",
36
+ "soundfile>=0.12.1",
37
+ "numpy>=1.24.0",
38
+ "pynput>=1.7.0",
39
+ "pyautogui>=0.9.54",
40
+ "pyperclip>=1.8.2",
41
+ "pystray>=0.19.4",
42
+ "pillow>=10.0.0",
43
+ ]
44
+
45
+ [project.optional-dependencies]
46
+ gpu = [
47
+ "torch>=2.0.0",
48
+ "torchaudio>=2.0.0",
49
+ ]
50
+
51
+ [project.scripts]
52
+ stttype = "stttype.cli:main"
53
+
54
+ [project.urls]
55
+ Homepage = "https://github.com/LucasApps/stttype"
56
+ Issues = "https://github.com/LucasApps/stttype/issues"
57
+
58
+ [tool.setuptools.packages.find]
59
+ where = ["."]
60
+ include = ["stttype*"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,8 @@
1
+ """STT Type - Voice to Text Assistant
2
+
3
+ Hold F2 to record, release to transcribe and type.
4
+ GPU-accelerated using faster-whisper.
5
+ """
6
+
7
+ __version__ = "1.0.0"
8
+ __author__ = "STT Type"
@@ -0,0 +1,56 @@
1
+ """
2
+ Bell/sound notification module.
3
+ Cross-platform sound using system beep or platform-specific methods.
4
+ """
5
+ import platform
6
+ import sys
7
+
8
+ SYSTEM = platform.system()
9
+
10
+ if SYSTEM == "Windows":
11
+ try:
12
+ import winsound
13
+ except ImportError:
14
+ winsound = None
15
+ else:
16
+ winsound = None
17
+
18
+
19
+ def _beep(freq, duration):
20
+ """Cross-platform beep."""
21
+ if winsound:
22
+ winsound.Beep(freq, duration)
23
+ else:
24
+ # Unix fallback - print bell character
25
+ print("\a", end="", flush=True)
26
+ sys.stdout.flush()
27
+
28
+
29
+ def play_start_sound():
30
+ """Play a sound when recording starts (higher pitch beep)."""
31
+ if winsound:
32
+ winsound.MessageBeep(winsound.MB_ICONEXCLAMATION)
33
+ _beep(880, 150)
34
+ _beep(1100, 200)
35
+
36
+
37
+ def play_stop_sound():
38
+ """Play a sound when recording stops (lower pitch double beep)."""
39
+ _beep(880, 150)
40
+ _beep(660, 300)
41
+
42
+
43
+ def play_error_sound():
44
+ """Play an error sound."""
45
+ if winsound:
46
+ winsound.MessageBeep(winsound.MB_ICONHAND)
47
+ else:
48
+ print("\a\a", end="", flush=True)
49
+ sys.stdout.flush()
50
+
51
+
52
+ def play_success_sound():
53
+ """Play a success sound after transcription."""
54
+ _beep(523, 100)
55
+ _beep(659, 100)
56
+ _beep(784, 200)